Commit Graph

1052 Commits

Author SHA1 Message Date
Johannes Rieken
ec7952e66e fixes https://github.com/microsoft/vscode/issues/274789 (#275520) 2025-11-05 11:23:34 +01:00
Johannes Rieken
f3abd6a05a fixes https://github.com/microsoft/vscode/issues/275173 (#275512) 2025-11-05 10:30:43 +01:00
Johannes Rieken
1b7044d9ef add "don't ask again" option for inline chat to panel chat tool (#274730)
* add "don't ask again" option for inline chat to panel chat tool

* fix AI disabled test
2025-11-03 13:22:40 +00:00
Johannes Rieken
aced6a179e v2 - collapse selection on keep/undo (#274714) 2025-11-03 10:46:38 +00:00
Matt Bierner
a1f7be35bf More sessionId -> sessionResource conversation
- Adopting for code blocks
- Switching to use safer `LocalChatSessionUri.parseLocalSessionId` in a few more spots
- Adopting for some contexts and a few more apis
2025-10-31 11:25:00 -07:00
Matt Bierner
59e61b2ec3 Merge pull request #274385 from mjbvz/dev/mjbvz/outer-piranha
More sessionId -> sessionResource conversation
2025-10-31 10:36:13 -07:00
Matt Bierner
49c15a81d1 More sessionId -> sessionResource conversation
- Update todo list manager
- Update a few more events/apis to use resources
- Mark a few more sessionId props deprecated
2025-10-31 09:41:28 -07:00
Matt Bierner
c528d27937 Fix caller 2025-10-31 08:59:34 -07:00
Johannes Rieken
3628ca5516 Inline chat v2 UI work (#274338)
* disable auto-accept for inline chat

* hide inline chat via ESC more

* inline - render picker below input

* remove unneccessary v2 actions

* fix `Enter` to only accept from input when there is no new text typed

* custom placeholder, use prompt as placeholder while request is on

* no min width for inline chat widget
2025-10-31 12:54:32 +00:00
Matt Bierner
14e845d26c Switch many callers to use getWidgetBySessionResource (#274253)
This new version of the function should be preferred as it helps move us further along with using URIs for chat sessions
2025-10-31 08:50:36 +01:00
Matt Bierner
db5ee1e0f4 Convert ChatService to use uris instead of ids in public apis
Moves the chat service public APIs to use uris for identifying sessions instead of ids. These uris are preferred as they work correctly for both contributed and local session

This ends up touch a lot of the chat apis. In most cases, the change is simply to pass in the URI instead of the id. In a few cases where the URI hasn't been fully hooked up, I am using `LocalChatSessionUri` to do this conversation

For the chat session implementation, I also switched to use resource maps to store session specific information instead of a normal map
2025-10-30 17:38:33 -07:00
Johannes Rieken
be4289696c tweak border style (#274082) 2025-10-30 17:54:35 +01:00
Johannes Rieken
35d4ea1cd2 Inline chat v2 updates (#273986)
* wip - have a tool that allows inline chat to escape

* wip

* improve move session

* inline chat v2 UI tweaks

* pick up "selected" diagnostics and add them as attachments

* show inline chat widget always above selection

* tweak inline escape tool

* remove `hideOnRequest`

* use `inlineChatApplyEdit` when using inline chat

* make sure to position zone above changes if otherwise inbetween

* 💄

* add logging

* * add inline v2 specific execute toolbar
* add the minimun number of command only
* add keep/discard commands

* Update src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 22:21:45 +00:00
Benjamin Pasero
672c1c1d94 chat - tweak wording around chat and reduce use of copilot (#272839) 2025-10-23 11:40:49 +00:00
Bhavya U
d24017fdd4 fixup todo styling (#271454)
* Update todo styling

* Hide todo list container initially and manage its visibility during rendering

* Remove standalone ChatTodoListWidget and integrate todo UI into ChatInputPart

- Remove ChatTodoListWidget import, field, instantiation and DOM append
- Delegate render/clear of todo list to ChatInputPart (use inputPart.renderChatTodoListWidget / inputPart.clearTodoListWidget)
- Update content height and layout math to exclude removed standalone widget height
- Simplify and relocate todo-list CSS: reduce padding/margins, move widget container styling under .interactive-input-part, and remove the large global .chat-todo-list-widget rules

* Account for integrated todo list in chat input layout

- Include todoListWidgetContainerHeight in ChatInputPart contentHeight and layout calculations so the embedded todo UI is reserved in layout
- Rename ChatWidget.renderChatTodoListWidget to renderChatInputTodoListWidget and update the call site
- Increase bottom padding of .chat-editing-session-container to make space for the todo list

* update config

* Update icon size

* Remove standalone Chat Todo List Widget styles from chat.css

* Add onDidUpdateTodos to mock IChatTodoListService in inline chat tests
2025-10-21 19:12:31 -07:00
Martin Aeschlimann
ab73e46a31 rename mode to agent (#272282)
* rename mode to agent

* update

* update

* fix tests

* update

* update

* update

* update

* update

* update
2025-10-20 19:09:44 +00:00
Aaron Munger
a842708eab give inline notebook chat its own setting for using v2 controller (#270658)
* make notebook inline v2 usage independent

* try to adjust v1 vs v2 context keys

* fix conditionals, delay cell editor check

* fix v1 context key, editor still not always identified as cell editor

* create alternate inline chat contribs for notebooks

* Revert "create alternate inline chat contribs for notebooks"

This reverts commit f8667269cd.

* fix helper method, use it to get the notebook Editor

* override new method for test

* unused import
2025-10-15 07:57:31 -07:00
Rob Lourens
8882ed69e7 Make agent mode the real default 🚀 (#270592)
* Make agent mode the real default 🚀
Fix #268166

* Fix default mode

* Fix
2025-10-14 01:02:56 +00:00
Johannes Rieken
32036c573c immediately close inline chat UI when session is cancelled (#270742)
fixes https://github.com/microsoft/vscode/issues/265579
2025-10-10 10:02:22 +00:00
Matt Bierner
245265d15e Mark most Event properties as readonly
We want to prevent mistaken changes that do something like this:

```ts
foo.onEvent = () => { ... };
```

When they almost always mean:

```ts
foo.onEvent(() => { ... })
```
2025-10-09 13:59:00 -07:00
Matt Bierner
a396c67067 Move MarkdownRenderer into platform layer
For #206228

This moves the MarkdownRendererService from `editor` into `platform`

As part of this I had to add a `setDefaultCodeBlockRenderer` method that lets the editor register syntax highlighting support
2025-10-08 22:23:51 -07:00
Matt Bierner
0bece4825b Replace MarkdownRenderer
Final step of refactoring in this space. This change:

- Introduces an `IMarkdownRenderer` for cases where a top level component needs to control how other components render markdown

- Deletes `MarkdownRenderer`

- Makes chat adopt either `IMarkdownRenderer` for stuff in a response, or `IMarkdownRendererService` for rendering non-response content
2025-10-08 16:03:42 -07:00
Matt Bierner
a9b07902dd Move all markdown renderer options into render call
For #206228

This makes the MarkdownRenderer very close to a service interface. The next step will be converting it into a real service
2025-10-08 13:18:29 -07:00
Johannes Rieken
b1e37822fb fix hideOnRequest mode so that it doesn't show the inline chat for "good" responses (#270386)
Looks like `ChatResponse#onDidChange` fires with a modified response array after completion...
2025-10-08 09:10:41 -07:00
Logan Ramos
f80d7d85ad Clear bad model picker preference state (#270223) 2025-10-07 09:00:47 -07:00
Matt Bierner
2b636917ce Replace more ...args: any[] with unknown
Follow up on #269213

Typing only change to make `args` type safer
2025-10-06 14:12:10 -07:00
Matt Bierner
11c1e8cd34 Update most IAction.run calls to use unknown instead of any for args
Part of #269213

This prevents accessing arbitrary properties on the args without first doing a type check or type assertion
2025-10-06 11:30:03 -07:00
Johannes Rieken
49de261c1a fix a potential stale inline chat window cause (#269999)
re https://github.com/microsoft/vscode/issues/265579
2025-10-06 15:03:07 +02:00
Matt Bierner
360c9fd134 Add lint rule for as any and bulk ignore all existing breaks
For #269213

This adds a new eslint rule for `as any` and `<any>({... })`. We'd like to remove almost all of these, however right now the first goal is to prevent them in new code. That's why with this first PR I simply add `eslint-disable` comments for all breaks

Trying to get this change in soon after branching off for release to hopefully minimize disruption during debt week work
2025-10-02 23:38:33 -07:00
Megan Rogge
a4e7730f6e localize string (#269354)
follow up to #265735
2025-10-01 14:34:11 +00:00
Megan Rogge
5cb209f624 add command to focus last focused chat item, include important info in a11y help (#268362) 2025-09-25 14:11:02 -07:00
Benjamin Pasero
afe5914687 Chat: improve welcome for no-auth flow (#5872) (#268109)
* Chat: improve welcome for no-auth flow (#5872)

* nls key update
2025-09-24 18:01:27 -07:00
Megan Rogge
eb773667d3 improve notification for chat - make it location agnostic (#268215)
work for either chat location
2025-09-24 12:42:00 -07:00
Megan Rogge
bd5c9b95da add opt-in setting to show OS notification when a chat response is received (#268090)
chat part of #267459
2025-09-24 11:25:22 -07:00
Benjamin Pasero
50bd8991ff chat - tweak inline chat disclaimer condition (#267967) 2025-09-23 14:02:00 +00:00
Benjamin Pasero
13a8877af9 chat - anonymous disclaimer in inline chat (#267917) 2025-09-23 08:09:23 +00:00
Henning Dieterichs
dace6b32b3 Implements code-no-observable-get-in-reactive-context (#267526)
* Implements code-no-observable-get-in-reactive-context

* Improves code

* Fixes lint warnings
2025-09-20 20:29:58 +02:00
Connor Peet
ada50f7949 Add some learning prompts and "send to edit session" for inline chat (#267519)
* wip

* update learnings

* clean 1

* clean 2

* commit update-instructions.prompt.md

* swap back to normal model after being in delegate

* adding generation

* wip

* wip

* update

---------

Co-authored-by: Henning Dieterichs <hdieterichs@microsoft.com>
Co-authored-by: Anthony Kim <anthonykim@microsoft.com>
Co-authored-by: SteVen Batten <sbatten@microsoft.com>
2025-09-19 23:26:52 +02:00
Martin Aeschlimann
50b5aa8954 add ChatRequest.modeInstructions2 with mode metadata to try out things (#267303) 2025-09-17 21:25:37 -07:00
Benjamin Pasero
286a971eec chat - mention ToS in welcome for first time anonymous usage (#266202)
* chat - mention ToS in welcome for first time anonymous usage

* tests

* briefer warning

* refactor: update chat widget to replace experimental terminology with new user terminology

---------

Co-authored-by: Bhavya U <bhavyau@microsoft.com>
2025-09-12 14:18:40 -04:00
Bhavya U
061d0ed84b Add configuration for todo list widget position in chat and enable todo tool by default (#265942)
* Add configuration for todo list widget position in chat and enable todo tool by default

* Add mock implementation for IChatTodoListService in InlineChatController tests
2025-09-09 23:57:49 +00:00
Megan Rogge
8b5b18d87c Indicate inline chat status to screen reader users (#265735)
fix #265734
2025-09-09 12:05:54 -07:00
Benjamin Pasero
0488f64ff7 Layer breaker in src/vs/workbench/services/assignment/common/assignmentFilters.ts (fix #264280) (#265352) 2025-09-09 11:18:16 +02:00
Rob Lourens
3c409616d5 Rename TextEditor location to EditorInline (#265517)
* EditorInline

* comment
2025-09-07 09:31:09 +10:00
Rob Lourens
ece215ea9b Don't create chat sessions as "editor" location (#265516)
This means inline chat. I got into a state where a chat session was loaded in the panel instead of a chat editor and the location caused issues
2025-09-06 22:26:32 +00:00
Ladislau Szomoru
1e270afce2 Chat - fix chat layout in floating window (#265158) 2025-09-04 14:49:17 +00:00
Ladislau Szomoru
3484d4cfa0 Chat - extract font configuration into a separate service (#263833)
* Chat - extract font configuration into a separate service

* Fix tests
2025-08-28 14:48:56 +00:00
Henning Dieterichs
9e1f3e6df0 Implements editTelemetry.codeSuggested and editTelemetry.codeAccepted 2025-08-27 03:48:48 +02:00
Benjamin Pasero
2509d0f66d chat - use chatSparkle consistently (#263211)
cc @eli-w-king
2025-08-25 09:55:06 +02:00
Benjamin Pasero
333b2b7703 Let's revisit AI actions submenu (#255962) (#262902) 2025-08-22 12:56:05 +00:00