Posted by ulugbekna 5 days ago
I was not aware that was a thing and useful to know. Thanks!
Also it's all Microsoft, they made both the AI and the editor. I appreciate that they don't do anything extra in the editor to favor their own extensions.
Have you even used any of their products lately? Where "lately" = the last 15 years...
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/s...
[1] https://github.com/microsoft/vscode-copilot-chat/blob/main/s...
[2] src/extension/intents/node/toolCallingLoop.ts
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.
They also provide documentation for all this. [1]
VSCode also provides examples. [2]
[0] https://github.com/microsoft/vscode-prompt-tsx
[1] https://code.visualstudio.com/api/extension-guides/chat
[2] https://github.com/microsoft/vscode-extension-samples/blob/m...
> in a minute
Honestly. Why the hurry?
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.
will update when i find more info.
I'm no fan of Microsoft but that's a massive maintenance burden. They must have multiple people working on this full time.
Of course the majority are from Microsoft, they do seem to merge in a fair amount of PRs from the community though.
gh pr list --repo microsoft/vscode --state merged --limit 1000 --json author,mergedAt,title
Then you can do:
jq -r '.[] | [.author.login, .author.name] | @tsv' 1kprs.json | sort | uniq -c | sort -nr
And see there's only 63 authors and > 90% of the merged PRs are from Microsoft (which.. fair, it's their product).
I think the signal is strong enough that you can legitimately reach the same conclusion by mk 1 eyeball.
NOTE: I'm not criticising, it's a Microsoft-driven project and I am fine with that. The _do_ merge things from "random" contributors (yay) but they are overwhelmingly things that a) fix a bug while b) being less than 5 lines of code. If that is your desired contribution then things will go well for you and arguably they do well at accepting such. But they are very unlikely to accept a complex or interesting new feature from an outsider. All of this is seems totally reasonable and expected.
I get it might not be perfect, but "nonsensical mess" is maybe in bad faith here.
Historically, setting syntax colors has sucked too, but I don't remember the current state of that.
All the good FOSS vibes, without any of the hard FOSS work...
These repo's will usually have half a dozen or more Microsoft Employees with "Project Manager" titles and the like - extremely "top heavy". All development, decision making, roadmap and more are done behind closed doors. PR's go dormant for months or years... Issues get some sort of cursory "thanks for the input" response from a PM... then crickets.
I'm not arguing all open source needs to be a community and accept contributions. But let's be honest - this is deliberate on Microsoft's part. They want the "good vibes" of being open source friendly - but corporate Microsoft still isn't ready to embrace open source. ie, it's fake open source.
Not sure for VSCode, but for .NET 9 they claim: "There were over 26,000 contributions from over 9,000 community members! "
https://github.com/microsoft/vscode/pulls?q=is%3Apr+is%3Aclo...