Commit Graph

1020 Commits

Author SHA1 Message Date
Ladislau Szomoru
975e05cd1c DiffInformation API - cleanup + renames (#234248)
* Refactoring + renaming things

* Renamed TextEditorDiffKind to TextEditorChangeKind
2024-11-20 14:46:04 +05:30
Megan Rogge
a7ba900c98 add kind, kind to icon map 2024-11-19 14:07:54 -05:00
Megan Rogge
346a744203 adjust api 2024-11-19 13:40:38 -05:00
Megan Rogge
417f23b545 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-18 10:26:11 -05:00
Ladislau Szomoru
30043071a3 TextEditorDiffInformation API proposal (#233896)
* WIP - initial implementation

* Introduce the diff model service

* Remove code that is not needed

* Handle DiffEditor

* Performance optimization

* Refactor code

* More cleanup (V1)

* More cleanup (V2)

* More cleanup (V2.1)

* Pull request feedback

* Remove debugging statements

* Update mock proxy to fix tests

* Add proposed api check
2024-11-18 15:38:21 +01:00
Aaron Munger
b8ad8f5101 put fix/explain with copilot directly in the status bar (#233927)
* put copilot fix and explain in status bar

* fix up actions

* watch for execution error within the viewmodel

* make observable publicly readonly

* remove unused service

* fix tests

* remove unused import
2024-11-15 11:36:12 -08:00
Megan Rogge
45e4fda6e8 clean up 2024-11-13 11:03:14 -06:00
Megan Rogge
0385106215 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-13 08:51:12 -06:00
Joyce Er
89f3c39493 feat: allow chat related file providers to specify a description at registration and for results (#233731) 2024-11-12 23:08:34 +01:00
Megan Rogge
0dab339ce8 Merge branch 'main' into merogge/terminal-suggest-wip 2024-11-12 15:22:27 -06:00
Joyce Er
8fd40e611f feat: scaffold chat editing related files provider api (#233451) 2024-11-08 15:21:48 -08:00
Megan Rogge
3ba1f40022 add trigger character 2024-11-07 15:26:52 -06:00
Tyler James Leonhardt
15333a70d8 Implement a handle property that is a string (#233267)
* Implement a `handle` property that is a string

For Microsoft auth

* fix integration tests
2024-11-07 09:44:37 -08:00
Megan Rogge
f2084174d6 add replacement index / length to completion item, fix issue 2024-11-05 14:28:08 -06:00
Megan Rogge
cc74cd4274 major refactor 2 2024-10-31 15:44:56 -05:00
Megan Rogge
9b1da41996 Merge branch 'main' into merogge/start-terminal-suggest 2024-10-31 11:35:19 -05:00
Andrea Mah
3551cb01fa edit API names and remove findFiles2New and aiTextSearchProviderNew (#232431)
* remove references to findfiles2New and aiTextSearchProviderNew
2024-10-29 18:41:23 -07:00
Andrea Mah
ff48b17c8b move search APIs from using new to 2 (#232443)
* move search APIs from using `new` to `2`
2024-10-28 13:59:56 -07:00
Megan Rogge
fb17cc4974 Merge branch 'main' into merogge/start-terminal-suggest 2024-10-25 13:27:22 -05:00
Rob Lourens
bc0eb008a1 Finalize lmTools (#231788)
* @returns

* Finalize it

* small tweaks

* add `LanguageModelTextPart` to chat message and its factory functions

* update `LanguageModelChatResponse` docs

* more doc tweaks

* LangModelChatMessage.content always array

* Optional cancel token

* parameters notes

* Updates

---------

Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com>
2024-10-21 18:21:43 -07:00
Rob Lourens
bcf6a6af1c Add LanguageModelIgnoredFileProvider (#231696) 2024-10-18 14:05:43 -07:00
Rob Lourens
21219a938e lmTools API updates and LanguageModelPromptTsxPart (#231544)
* Try LanguageModelToolResultItem

* Implement it

* lmTools API updates
Resolve TODOs

* Fix build

* Doc

* More content type -> mime type

* More edits

* Fixes

* Add LanguageModelChatToolMode

* Add implementation

* New thing

* note

* API version bump

* Finish it

* Updates

* Properly convert tool result content parts
2024-10-18 13:31:58 -07:00
Rob Lourens
cd24be84d5 Rename tool id to 'name' 2024-10-11 10:37:41 -07:00
Rob Lourens
6148e1487a lmTools API polish (#230847)
* Simplify lmTools part names

* Remove unneeded isError

* Remove text/plain requirement for tools

* One more

* Bump API version

* Fix build
2024-10-09 13:28:01 +09:00
Joyce Er
3709bf2387 feat: instrument accepting and rejecting chat edits (#230748)
* feat: instrument accepting and rejecting chat edits

* eslint

* Fix compile
2024-10-08 09:29:59 +02:00
Rob Lourens
de557e7b66 lmTools docs, tweaks (#230351)
* Tools API updates

* Add tool tags

* lmtools docs and tweaks

* Update src/vscode-dts/vscode.proposed.lmTools.d.ts

Co-authored-by: Joyce Er <joyce.er@microsoft.com>

* Update src/vscode-dts/vscode.proposed.lmTools.d.ts

Co-authored-by: Joyce Er <joyce.er@microsoft.com>

* Fix build

---------

Co-authored-by: Joyce Er <joyce.er@microsoft.com>
2024-10-02 19:02:38 -07:00
Justin Chen
7bbd14551f properly convert/send image type to extension (#230166)
* properly convert and send type to ext

* switch to new type that includes mimeType

* add new type

* use thenable

* change to proposed

* fix whitespace
2024-10-01 16:02:01 -07:00
Matt Bierner
d3596df9eb More type assertion fixes (#230181)
For #211878

Also adds a few suppressions
2024-09-30 16:21:12 -07:00
Rob Lourens
ef69ffe1cb Correctly pass user selected LM for intent detection (#230014) (#230028)
Fix #229616
2024-09-28 01:18:40 +02:00
Rob Lourens
6aadaf13bd Use a full LanguageModelChat for the user selection (#228905)
* Use a full LanguageModelChat for the user selection

* Move proposal check
2024-09-18 20:27:31 +02:00
meganrogge
54a6fa63e6 rename 2024-09-18 09:55:14 -07:00
Tyler James Leonhardt
7241eea610 Move to new account preference concept (#228897)
* Move to new account preference concept

Previously, session preference was at a per-"set of scopes" bases. This means that an extension could ask for scopes A,B,C and get account 1... but then ask for scopes E,F and get account 2.

Thinking on this more, it really doesn't make sense. An extension should have a preference wholistically since we also don't surface scopes to the user.

This PR:
* changes that model (while keeping the old model for migration purposes for now)
* allows the user to change that value via the gear icon in the Trusted Extensions quick pick
* hooks up the extension event for when the user changes that
* lastly introduces a product.json entry that allows an extension to be a "child" of another extension's preference. This will be useful for GitHub Copilot & GitHub Copilot Chat sharing the same preference.

Out of scope:
* Adding entries to the extension editor to get to this quick pick (it'll come later, but I wanted to get these changes in now)

* placeholder
2024-09-17 18:20:53 -07:00
meganrogge
927cbbba38 pass in shellType, commandLine 2024-09-17 14:31:21 -07:00
meganrogge
dffafc6042 start work 2024-09-17 12:46:46 -07:00
Alexandru Dima
c4efe1dc9e Merge pull request #228683 from microsoft/aeschli/respectable-sailfish-565
registerMappedEditsProvider2
2024-09-17 00:11:25 +02:00
Joyce Er
6a81a01ead WIP 2024-09-16 18:08:43 +02:00
Benjamin Pasero
e00035b4dc watcher - massage requests in the extension host instead of window (#228712) 2024-09-16 16:22:20 +02:00
Martin Aeschlimann
8732ffbe89 registerMappedEditsProvider2 2024-09-15 22:09:46 +02:00
Joyce Er
e7ca87c15d feat: associate URIs with markdown code blocks for codemapper consumption (#228145) 2024-09-10 23:16:42 +02:00
Andrea Mah
747880f051 add tests for search api from extHost (#227636)
* add tests for search api from extHost

* wait for completion
2024-09-04 15:56:20 -07:00
Benjamin Pasero
6b924c5152 ESM merge to main (#227184)
Co-authored-by: Johannes Rieken <jrieken@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2024-08-30 10:31:46 +02:00
Rob Lourens
ed4db37c58 Tools API updates (#226493)
* Tools API updates
Support toolCallId, tool call parts in content2

* Fix
2024-08-23 15:48:14 -07:00
Connor Peet
aca1518b48 api: some slight lmtools polish (#226371)
- Have `countTokens` only take a string for now, since that's all that
  tool elements in tsx should currently omit (not chat messages with
	roles.) String counting is a much easier interface to satisfy.
- Joyce pointed out that it's "invocation" not "invokation", for reasons
  unfathomable to me. I will open an issue with the English language.
2024-08-23 07:16:02 +02:00
andreamah
afde5137a2 properly connect search providers and handle undefined includes in findtextinfilesnew 2024-08-22 15:41:33 -07:00
Connor Peet
2bf25ee2fd lm: a second rendition of returning data from LM tools (#225634)
* lm: a second rendition of returning data from LM tools

This is an alternative to #225454. It allows the tool caller to pass
through token budget and counting information to the tool, and the
tool can then 'do its thing.'

Most of the actual implementation is in prompt-tsx with a new method to
render elements into a JSON-serializable form, and then splice them back
into the tree by the consumer. The implementation can be found here:

https://github.com/microsoft/vscode-prompt-tsx/tree/connor4312/tools-api-v2

On the tool side, this looks like:

```ts
vscode.lm.registerTool('myTestTool', {
	async invoke(context, token): Promise<vscode.LanguageModelToolResult> {
		return {
			// context includes the token info:
			'mytype': await renderElementJSON(MyCustomPrompt, {}, context, token),
			toString() {
				return 'hello world!'
			}
		};
	},
});
```

I didn't make any nice wrappers yet, but the MVP consumer side looks like:

```
export class TestPrompt extends PromptElement {
    async render(_state: void, sizing: PromptSizing) {
        const result = await vscode.lm.invokeTool('myTestTool', {
			parameters: {},
			tokenBudget: sizing.tokenBudget,
            countTokens: (v, token) => tokenizer.countTokens(v, token),
		}, new vscode.CancellationTokenSource().token);

        return (
            <>
                <elementJSON data={result.mytype} />
            </>
        );
    }
}
```

I like this approach better. It avoids bleeding knowledge of TSX into
the extension host and comparatively simple.

* address comments

* address comments
2024-08-22 09:41:31 -07:00
Andrea Mah
c2aa3c4625 let findfiles2new use an array of includes/excludes (#226103)
* let findfiles2new use an array of includes/excludes
2024-08-21 19:14:01 -07:00
Andrea Mah
c3dca4e740 support multiple findTextInFiles filesToInclude (#225821) 2024-08-19 11:50:53 -07:00
Andrea Mah
c5ef039cd8 Adopt new internal Search query shapes for new API shape (#214041)
Creating `New` versions of all Search APIs (ie: `TextSearchProviderNew`) to support the new API shape.

Since this new shape requires a new internal query shape, this is quite a big change.
2024-08-16 09:26:43 -07:00
Ulugbek Abdullaev
60cfd4ddec WIP: move-able inline chat 2024-08-15 11:00:08 +02:00
Rob Lourens
a9046c89b4 Remove obsolete api _version number (#225541) 2024-08-13 16:19:58 -07:00