-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: add tools
in chatInteraction dev data
#5812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for continuedev canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uinstinct what are the thoughts behind this update? @Patrick-Erichsen is doing some work that may result in Agent being more of a toggle than a mode (Edit might be demoted a bit/moved out of the list).
Also given chat and agent have the same schema it seems like the value in adding an event might not be worth upsetting things users have already built around "chatInteraction" events
Maybe we could add an "agent" boolean to the chat Interaction? Or simply "tools" with just the names of the tools?
Was just playing around with dev data and came across this issue. Hence wanted to add this option.
Thanks for the heads up! Just saw that commit now. Will make changes accordingly.
Agree. I will add the "tools" key with the name of the tools. |
tools
in chatInteraction dev data
🚨 Code Review Error GitHub API error (422): Unprocessable Entity Please check the logs or contact the maintainers for assistance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Incremental review for latest commit: Found 1 issues in the latest commit
Description
Added
tools
key inchatInteraction
dev data with the name of the function call tools. This key is only added when it is in agent modehere is an example
{
name: 'chatInteraction',
data: {
timestamp: '2025-05-26T13:11:34.075Z',
userId: '',
userAgent: 'Visual Studio Code/1.100.2 (Continue/1.1.40)',
selectedProfileId: 'file:///Users/instinct/Desktop/continue/manual-testing-sandbox/.continue/assistants/sample-config.yaml',
eventName: 'chatInteraction',
schema: '0.2.0',
prompt: '\n' +
'<important_rules>\n' +
' You are in agent mode.\n' +
'\n' +
' Always include the language and file name in the info string when you write code blocks.\n' +
' If you are editing "src/main.py" for example, your code block should start with '
python src/main.py\'\n' + '\n' + ' When addressing code modification requests, present a concise code snippet that\n' + ' emphasizes only the necessary changes and uses abbreviated placeholders for\n' + ' unmodified sections. For example:\n' + '\n' + '
language /path/to/file\n' +' // ... existing code ...\n' +
'\n' +
' {{ modified code here }}\n' +
'\n' +
' // ... existing code ...\n' +
'\n' +
' {{ another modification }}\n' +
'\n' +
' // ... rest of code ...\n' +
'
\n' + '\n' + ' In existing files, you should always restate the function or class that the snippet belongs to:\n' + '\n' + '
language /path/to/file\n' +' // ... existing code ...\n' +
'\n' +
' function exampleFunction() {\n' +
' // ... existing code ...\n' +
'\n' +
' {{ modified code here }}\n' +
'\n' +
' // ... rest of function ...\n' +
' }\n' +
'\n' +
' // ... rest of code ...\n' +
'
\n' + '\n' + ' Since users have access to their complete file, they prefer reading only the\n' + " relevant modifications. It's perfectly acceptable to omit unmodified portions\n" + ' at the beginning, middle, or end of files using these "lazy" comments. Only\n' + ' provide the complete file when explicitly requested. Include a concise explanation\n' + ' of changes unless the user specifically asks for code only.\n' + '\n' + '</important_rules>\n' + '\n' + 'use comments for explaining complex code only.\n' + '\n' + '<user>\n' + '\n' + '\n' + '
js test.js (10-12)\n' +' subtract(number) {\n' +
' return this;\n' +
' }\n' +
'
\n' + 'correct this\n' + '\n', completion: '
js test.js\n' +'// ... existing code ...\n' +
'\n' +
' subtract(number) {\n' +
" // Assuming 'subtract' modifies or returns a calculation based on 'number'\n" +
" return this.value - number; // Replace 'this.value' with the appropriate property or method if needed\n" +
' }\n' +
'\n' +
'// ... rest of code ...\n' +
'```',
modelTitle: 'My GPT-4o',
modelProvider: 'openai',
sessionId: '92a2b9f5-2f7a-4403-bbb0-c170553f7a73',
tools: [
'builtin_read_file',
'builtin_edit_existing_file',
'builtin_create_new_file',
'builtin_run_terminal_command',
'builtin_grep_search',
'builtin_file_glob_search',
'builtin_search_web',
'builtin_view_diff',
'builtin_read_currently_open_file',
'builtin_ls',
'builtin_create_rule_block'
]
},
schema: '0.2.0',
level: 'all',
profileId: 'file:///Users/instinct/Desktop/continue/manual-testing-sandbox/.continue/assistants/sample-config.yaml'
}
closes #5429
Checklist
Screenshots
[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Added support for logging agent interactions as agentInteraction events when in agent mode, using the same schema as chatInteraction.