-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcode-talk-as-tool.yaml
More file actions
76 lines (62 loc) · 2.29 KB
/
code-talk-as-tool.yaml
File metadata and controls
76 lines (62 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# =============================================================================
# Example: Using code-talk as an AI Custom Tool
# =============================================================================
#
# This example shows how to use the code-talk workflow as an AI tool,
# allowing an AI assistant to explore your codebase on demand.
#
# Usage:
# visor --config examples/code-talk-as-tool.yaml --message "Help me understand the codebase"
#
# =============================================================================
version: "1.0"
imports:
- visor://code-talk.yaml
# Define a project-specific wrapper that can be used as a tool
checks:
# Get user request
get-request:
type: human-input
prompt: "What would you like help with?"
placeholder: "e.g., Help me understand how the API endpoints work"
# AI assistant with code exploration tool
assistant:
type: ai
depends_on: [get-request]
ai:
skip_code_context: true
prompt_type: general
prompt: |
You are a helpful assistant for this project.
The user asked: {{ outputs['get-request'].text }}
You have access to the code-talk tool which can explore the codebase
and answer technical questions with code references.
Use the code-talk tool when you need to:
- Find specific implementations
- Understand how components work
- Locate relevant code files
- Answer technical questions about the codebase
After getting information from the tool, provide a clear and helpful response.
ai_custom_tools:
# Use code-talk directly as a tool
- workflow: code-talk
args:
# Pre-configure with your project settings
architecture: |
# Project Architecture
Describe your project here.
projects:
- id: my-project
repo: your-org/your-repo
description: Main project codebase
max_projects: 1
# Show the result
show-result:
type: log
depends_on: [assistant]
message: |
===============================================================
Assistant Response
===============================================================
{{ outputs['assistant'].content }}
===============================================================