Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

uinstinct
Copy link
Contributor

@uinstinct uinstinct commented May 23, 2025

Description

Added tools key in chatInteraction dev data with the name of the function call tools. This key is only added when it is in agent mode

here 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

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

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.

  • Dependencies
    • Updated data schemas to include agentInteraction for all relevant versions.

@uinstinct uinstinct requested a review from a team as a code owner May 23, 2025 06:02
@uinstinct uinstinct requested review from RomneyDa and removed request for a team May 23, 2025 06:02
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 23, 2025
Copy link

netlify bot commented May 23, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit 04109e6
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/683468cdfea5a50008181dcb

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 23, 2025
Copy link
Collaborator

@RomneyDa RomneyDa left a 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?

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs May 23, 2025
@uinstinct
Copy link
Contributor Author

uinstinct commented May 26, 2025

@uinstinct what are the thoughts behind this update?

Was just playing around with dev data and came across this issue. Hence wanted to add this option.

@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).

Thanks for the heads up! Just saw that commit now. Will make changes accordingly.

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?

Agree. I will add the "tools" key with the name of the tools.
Should we move it to a new schema?

@uinstinct uinstinct changed the title feat: add agentinteraction dev data feat: add tools in chatInteraction dev data May 26, 2025
@continue-code-review
Copy link

🚨 Code Review Error

GitHub API error (422): Unprocessable Entity

Please check the logs or contact the maintainers for assistance.

Copy link

@continue-code-review continue-code-review bot left a 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

@uinstinct uinstinct requested a review from RomneyDa May 26, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Differentiate types of chat interactions in the local telemetry data
2 participants