3 ms·
I very much need to know this also. First, tools [0] and prompts [1]. I'll get back to you in a minute while I back trace the calling path. One thing to note is
by dataviz1000 1y ago
I very much need to know this also. First, tools [0] and prompts [1]. I'll get back to you in a minute while I back trace the calling path. One thing to note is that they use .tsx for rendering the prompts and tool responses.
1. User selects ask or edit and AskAgentIntent.handleRequest or EditAgentIntent.handleRequest is called on character return.
2. DefaultIntentRequestHandler.getResult() -> createInstance(AskAgentIntentInvocation) -> getResult -> intent.invoke -> runWithToolCalling(intentInvocation) -> createInstance(DefaultToolCallingLoop) -> loop.onDidReceiveResponse -> emit _onDidReceiveResponse -> loop.run(this.stream, pauseCtrl) -> runOne() -> getAvailableTools -> createPromptContext -> buildPrompt2 -> buildPrompt -> [somewhere in here the correct tool gets called] -> responseProcessor.processResponse -> doProcessResponse -> applyDelta ->
[0] https://github.com/microsoft/vscode-copilot-chat/blob/main/src/extension/tools/node/createFileTool.tsx https://github.com/microsoft/vscode-copilot-chat/blob/main/s...
[1] https://github.com/microsoft/vscode-copilot-chat/blob/main/src/extension/prompts/node/panel/editCodePrompt.tsx https://github.com/microsoft/vscode-copilot-chat/blob/main/s...
[2] src/extension/intents/node/toolCallingLoop.ts
- _boffin_ 1y agoCare to also check if they do prompt decomposition into multiple prompts?
- dataviz1000 1y agoYou're asking if they break the user prompt into multiple chunks? All I can find is counting number of tokens and trimming to make sure the current turn conversation fits. I can not find any chunking logic to make multiple requests. This logic exists in the classes that extend IIntentInvocation which as buildPrompt() method.
- _boffin_ 1y agoI believe it's this paper, but... not certain: https://arxiv.org/abs/2210.02406 https://arxiv.org/abs/2210.02406 will update when i find more info.
- deleted 1y ago[deleted]
- chatmasta 1y agoSomething I’ve wanted to hack together for a while is a custom react-renderer and react-reconciler for prompt templating so that you can write prompts with JSX. I haven’t really thought about it beyond “JSX is a templating language and templating helps with prompt building and declarative is better than spaghetti code like LangChain.” But there’s probably some kernel of coolness there.
- sqs 1y agoPriompt might be what you're looking for: https://github.com/anysphere/priompt https://github.com/anysphere/priompt.
- dataviz1000 1y agoVSCode uses @vscode/prompt-tsx [0] They also provide documentation for all this. [1] VSCode also provides examples. [2] [0] https://github.com/microsoft/vscode-prompt-tsx https://github.com/microsoft/vscode-prompt-tsx [1] https://code.visualstudio.com/api/extension-guides/chat https://code.visualstudio.com/api/extension-guides/chat [2] https://github.com/microsoft/vscode-extension-samples/blob/main/chat-sample/src/play.tsx https://github.com/microsoft/vscode-extension-samples/blob/m...
- rightbyte 1y ago>> Quick > in a minute Honestly. Why the hurry?
- deleted 1y ago[deleted]