@theia/ai-ide 1.67.0-next.13 → 1.67.0-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +21 -21
- package/src/browser/ai-configuration/agent-configuration-widget.tsx +3 -3
- package/src/browser/file-changeset-functions.spec.ts +13 -13
- package/src/browser/file-changeset-functions.ts +9 -9
- package/src/browser/frontend-module.ts +7 -4
- package/src/browser/ide-chat-welcome-message-provider.tsx +64 -70
- package/src/browser/remember-command-contribution.ts +105 -0
- package/src/common/ai-ide-preferences.ts +1 -1
- package/src/common/coder-replace-prompt-template.ts +8 -9
- package/src/common/command-prompt-template.ts +5 -5
- package/src/common/file-changeset-function-ids.ts +15 -1
- package/src/common/orchestrator-chat-agent.ts +2 -2
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -41
- package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -333
- package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-service.d.ts +0 -18
- package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-service.js +0 -53
- package/lib/browser/ai-configuration/ai-configuration-service.js.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +0 -14
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +0 -67
- package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +0 -29
- package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/ai-configuration-widget.js +0 -118
- package/lib/browser/ai-configuration/ai-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/language-model-renderer.d.ts +0 -13
- package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +0 -1
- package/lib/browser/ai-configuration/language-model-renderer.js +0 -104
- package/lib/browser/ai-configuration/language-model-renderer.js.map +0 -1
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +0 -43
- package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/mcp-configuration-widget.js +0 -302
- package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -41
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -226
- package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -141
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
- package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -10
- package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
- package/lib/browser/ai-configuration/template-settings-renderer.js +0 -48
- package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -22
- package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -156
- package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -30
- package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -150
- package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -19
- package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
- package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -99
- package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
- package/lib/browser/ai-ide-activation-service.d.ts +0 -18
- package/lib/browser/ai-ide-activation-service.d.ts.map +0 -1
- package/lib/browser/ai-ide-activation-service.js +0 -71
- package/lib/browser/ai-ide-activation-service.js.map +0 -1
- package/lib/browser/ai-terminal-functions.d.ts +0 -13
- package/lib/browser/ai-terminal-functions.d.ts.map +0 -1
- package/lib/browser/ai-terminal-functions.js +0 -114
- package/lib/browser/ai-terminal-functions.js.map +0 -1
- package/lib/browser/app-tester-chat-agent.d.ts +0 -35
- package/lib/browser/app-tester-chat-agent.d.ts.map +0 -1
- package/lib/browser/app-tester-chat-agent.js +0 -142
- package/lib/browser/app-tester-chat-agent.js.map +0 -1
- package/lib/browser/app-tester-chat-functions.d.ts +0 -25
- package/lib/browser/app-tester-chat-functions.d.ts.map +0 -1
- package/lib/browser/app-tester-chat-functions.js +0 -170
- package/lib/browser/app-tester-chat-functions.js.map +0 -1
- package/lib/browser/app-tester-prompt-template.d.ts +0 -6
- package/lib/browser/app-tester-prompt-template.d.ts.map +0 -1
- package/lib/browser/app-tester-prompt-template.js +0 -83
- package/lib/browser/app-tester-prompt-template.js.map +0 -1
- package/lib/browser/architect-agent.d.ts +0 -15
- package/lib/browser/architect-agent.d.ts.map +0 -1
- package/lib/browser/architect-agent.js +0 -68
- package/lib/browser/architect-agent.js.map +0 -1
- package/lib/browser/coder-agent.d.ts +0 -15
- package/lib/browser/coder-agent.d.ts.map +0 -1
- package/lib/browser/coder-agent.js +0 -81
- package/lib/browser/coder-agent.js.map +0 -1
- package/lib/browser/context-file-validation-service-impl.d.ts +0 -13
- package/lib/browser/context-file-validation-service-impl.d.ts.map +0 -1
- package/lib/browser/context-file-validation-service-impl.js +0 -123
- package/lib/browser/context-file-validation-service-impl.js.map +0 -1
- package/lib/browser/context-file-validation-service-impl.spec.d.ts +0 -2
- package/lib/browser/context-file-validation-service-impl.spec.d.ts.map +0 -1
- package/lib/browser/context-file-validation-service-impl.spec.js +0 -340
- package/lib/browser/context-file-validation-service-impl.spec.js.map +0 -1
- package/lib/browser/context-functions.d.ts +0 -16
- package/lib/browser/context-functions.d.ts.map +0 -1
- package/lib/browser/context-functions.js +0 -166
- package/lib/browser/context-functions.js.map +0 -1
- package/lib/browser/context-functions.spec.d.ts +0 -2
- package/lib/browser/context-functions.spec.d.ts.map +0 -1
- package/lib/browser/context-functions.spec.js +0 -213
- package/lib/browser/context-functions.spec.js.map +0 -1
- package/lib/browser/file-changeset-function.spec.d.ts +0 -2
- package/lib/browser/file-changeset-function.spec.d.ts.map +0 -1
- package/lib/browser/file-changeset-function.spec.js +0 -45
- package/lib/browser/file-changeset-function.spec.js.map +0 -1
- package/lib/browser/file-changeset-functions.d.ts +0 -87
- package/lib/browser/file-changeset-functions.d.ts.map +0 -1
- package/lib/browser/file-changeset-functions.js +0 -645
- package/lib/browser/file-changeset-functions.js.map +0 -1
- package/lib/browser/file-changeset-functions.spec.d.ts +0 -2
- package/lib/browser/file-changeset-functions.spec.d.ts.map +0 -1
- package/lib/browser/file-changeset-functions.spec.js +0 -179
- package/lib/browser/file-changeset-functions.spec.js.map +0 -1
- package/lib/browser/frontend-module.d.ts +0 -5
- package/lib/browser/frontend-module.d.ts.map +0 -1
- package/lib/browser/frontend-module.js +0 -218
- package/lib/browser/frontend-module.js.map +0 -1
- package/lib/browser/github-chat-agent.d.ts +0 -48
- package/lib/browser/github-chat-agent.d.ts.map +0 -1
- package/lib/browser/github-chat-agent.js +0 -222
- package/lib/browser/github-chat-agent.js.map +0 -1
- package/lib/browser/github-prompt-template.d.ts +0 -6
- package/lib/browser/github-prompt-template.d.ts.map +0 -1
- package/lib/browser/github-prompt-template.js +0 -53
- package/lib/browser/github-prompt-template.js.map +0 -1
- package/lib/browser/github-repo-variable-contribution.d.ts +0 -15
- package/lib/browser/github-repo-variable-contribution.d.ts.map +0 -1
- package/lib/browser/github-repo-variable-contribution.js +0 -82
- package/lib/browser/github-repo-variable-contribution.js.map +0 -1
- package/lib/browser/ide-chat-welcome-message-provider.d.ts +0 -11
- package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +0 -1
- package/lib/browser/ide-chat-welcome-message-provider.js +0 -142
- package/lib/browser/ide-chat-welcome-message-provider.js.map +0 -1
- package/lib/browser/project-info-agent.d.ts +0 -13
- package/lib/browser/project-info-agent.d.ts.map +0 -1
- package/lib/browser/project-info-agent.js +0 -45
- package/lib/browser/project-info-agent.js.map +0 -1
- package/lib/browser/summarize-session-command-contribution.d.ts +0 -19
- package/lib/browser/summarize-session-command-contribution.d.ts.map +0 -1
- package/lib/browser/summarize-session-command-contribution.js +0 -118
- package/lib/browser/summarize-session-command-contribution.js.map +0 -1
- package/lib/browser/task-background-summary-variable.d.ts +0 -9
- package/lib/browser/task-background-summary-variable.d.ts.map +0 -1
- package/lib/browser/task-background-summary-variable.js +0 -60
- package/lib/browser/task-background-summary-variable.js.map +0 -1
- package/lib/browser/task-context-agent.d.ts +0 -13
- package/lib/browser/task-context-agent.d.ts.map +0 -1
- package/lib/browser/task-context-agent.js +0 -45
- package/lib/browser/task-context-agent.js.map +0 -1
- package/lib/browser/task-context-file-storage-service.d.ts +0 -40
- package/lib/browser/task-context-file-storage-service.d.ts.map +0 -1
- package/lib/browser/task-context-file-storage-service.js +0 -232
- package/lib/browser/task-context-file-storage-service.js.map +0 -1
- package/lib/browser/template-preference-contribution.d.ts +0 -17
- package/lib/browser/template-preference-contribution.d.ts.map +0 -1
- package/lib/browser/template-preference-contribution.js +0 -94
- package/lib/browser/template-preference-contribution.js.map +0 -1
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +0 -2
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +0 -1
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +0 -52
- package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +0 -1
- package/lib/browser/workspace-functions.d.ts +0 -78
- package/lib/browser/workspace-functions.d.ts.map +0 -1
- package/lib/browser/workspace-functions.js +0 -697
- package/lib/browser/workspace-functions.js.map +0 -1
- package/lib/browser/workspace-functions.spec.d.ts +0 -2
- package/lib/browser/workspace-functions.spec.d.ts.map +0 -1
- package/lib/browser/workspace-functions.spec.js +0 -161
- package/lib/browser/workspace-functions.spec.js.map +0 -1
- package/lib/browser/workspace-launch-provider.d.ts +0 -24
- package/lib/browser/workspace-launch-provider.d.ts.map +0 -1
- package/lib/browser/workspace-launch-provider.js +0 -216
- package/lib/browser/workspace-launch-provider.js.map +0 -1
- package/lib/browser/workspace-launch-provider.spec.d.ts +0 -2
- package/lib/browser/workspace-launch-provider.spec.d.ts.map +0 -1
- package/lib/browser/workspace-launch-provider.spec.js +0 -245
- package/lib/browser/workspace-launch-provider.spec.js.map +0 -1
- package/lib/browser/workspace-search-provider.d.ts +0 -15
- package/lib/browser/workspace-search-provider.d.ts.map +0 -1
- package/lib/browser/workspace-search-provider.js +0 -204
- package/lib/browser/workspace-search-provider.js.map +0 -1
- package/lib/browser/workspace-search-provider.spec.d.ts +0 -2
- package/lib/browser/workspace-search-provider.spec.d.ts.map +0 -1
- package/lib/browser/workspace-search-provider.spec.js +0 -82
- package/lib/browser/workspace-search-provider.spec.js.map +0 -1
- package/lib/browser/workspace-task-provider.d.ts +0 -15
- package/lib/browser/workspace-task-provider.d.ts.map +0 -1
- package/lib/browser/workspace-task-provider.js +0 -138
- package/lib/browser/workspace-task-provider.js.map +0 -1
- package/lib/browser/workspace-task-provider.spec.d.ts +0 -2
- package/lib/browser/workspace-task-provider.spec.d.ts.map +0 -1
- package/lib/browser/workspace-task-provider.spec.js +0 -109
- package/lib/browser/workspace-task-provider.spec.js.map +0 -1
- package/lib/common/ai-configuration-preferences.d.ts +0 -8
- package/lib/common/ai-configuration-preferences.d.ts.map +0 -1
- package/lib/common/ai-configuration-preferences.js +0 -41
- package/lib/common/ai-configuration-preferences.js.map +0 -1
- package/lib/common/ai-ide-preferences.d.ts +0 -5
- package/lib/common/ai-ide-preferences.d.ts.map +0 -1
- package/lib/common/ai-ide-preferences.js +0 -53
- package/lib/common/ai-ide-preferences.js.map +0 -1
- package/lib/common/ai-terminal-functions.d.ts +0 -2
- package/lib/common/ai-terminal-functions.d.ts.map +0 -1
- package/lib/common/ai-terminal-functions.js +0 -20
- package/lib/common/ai-terminal-functions.js.map +0 -1
- package/lib/common/app-tester-chat-functions.d.ts +0 -5
- package/lib/common/app-tester-chat-functions.d.ts.map +0 -1
- package/lib/common/app-tester-chat-functions.js +0 -23
- package/lib/common/app-tester-chat-functions.js.map +0 -1
- package/lib/common/architect-prompt-template.d.ts +0 -3
- package/lib/common/architect-prompt-template.d.ts.map +0 -1
- package/lib/common/architect-prompt-template.js +0 -81
- package/lib/common/architect-prompt-template.js.map +0 -1
- package/lib/common/browser-automation-protocol.d.ts +0 -15
- package/lib/common/browser-automation-protocol.d.ts.map +0 -1
- package/lib/common/browser-automation-protocol.js +0 -22
- package/lib/common/browser-automation-protocol.js.map +0 -1
- package/lib/common/coder-replace-prompt-template.d.ts +0 -11
- package/lib/common/coder-replace-prompt-template.d.ts.map +0 -1
- package/lib/common/coder-replace-prompt-template.js +0 -295
- package/lib/common/coder-replace-prompt-template.js.map +0 -1
- package/lib/common/command-chat-agents.d.ts +0 -36
- package/lib/common/command-chat-agents.d.ts.map +0 -1
- package/lib/common/command-chat-agents.js +0 -122
- package/lib/common/command-chat-agents.js.map +0 -1
- package/lib/common/command-prompt-template.d.ts +0 -3
- package/lib/common/command-prompt-template.d.ts.map +0 -1
- package/lib/common/command-prompt-template.js +0 -226
- package/lib/common/command-prompt-template.js.map +0 -1
- package/lib/common/context-files-variable.d.ts +0 -9
- package/lib/common/context-files-variable.d.ts.map +0 -1
- package/lib/common/context-files-variable.js +0 -52
- package/lib/common/context-files-variable.js.map +0 -1
- package/lib/common/context-functions.d.ts +0 -4
- package/lib/common/context-functions.d.ts.map +0 -1
- package/lib/common/context-functions.js +0 -22
- package/lib/common/context-functions.js.map +0 -1
- package/lib/common/context-variables.d.ts +0 -3
- package/lib/common/context-variables.d.ts.map +0 -1
- package/lib/common/context-variables.js +0 -21
- package/lib/common/context-variables.js.map +0 -1
- package/lib/common/file-changeset-function-ids.d.ts +0 -8
- package/lib/common/file-changeset-function-ids.d.ts.map +0 -1
- package/lib/common/file-changeset-function-ids.js +0 -26
- package/lib/common/file-changeset-function-ids.js.map +0 -1
- package/lib/common/github-repo-protocol.d.ts +0 -15
- package/lib/common/github-repo-protocol.d.ts.map +0 -1
- package/lib/common/github-repo-protocol.js +0 -21
- package/lib/common/github-repo-protocol.js.map +0 -1
- package/lib/common/orchestrator-chat-agent.d.ts +0 -36
- package/lib/common/orchestrator-chat-agent.d.ts.map +0 -1
- package/lib/common/orchestrator-chat-agent.js +0 -167
- package/lib/common/orchestrator-chat-agent.js.map +0 -1
- package/lib/common/orchestrator-prompt-template.d.ts +0 -3
- package/lib/common/orchestrator-prompt-template.d.ts.map +0 -1
- package/lib/common/orchestrator-prompt-template.js +0 -55
- package/lib/common/orchestrator-prompt-template.js.map +0 -1
- package/lib/common/project-info-prompt-template.d.ts +0 -6
- package/lib/common/project-info-prompt-template.d.ts.map +0 -1
- package/lib/common/project-info-prompt-template.js +0 -145
- package/lib/common/project-info-prompt-template.js.map +0 -1
- package/lib/common/summarize-session-commands.d.ts +0 -4
- package/lib/common/summarize-session-commands.d.ts.map +0 -1
- package/lib/common/summarize-session-commands.js +0 -28
- package/lib/common/summarize-session-commands.js.map +0 -1
- package/lib/common/task-context-prompt-template.d.ts +0 -8
- package/lib/common/task-context-prompt-template.d.ts.map +0 -1
- package/lib/common/task-context-prompt-template.js +0 -217
- package/lib/common/task-context-prompt-template.js.map +0 -1
- package/lib/common/universal-chat-agent.d.ts +0 -17
- package/lib/common/universal-chat-agent.d.ts.map +0 -1
- package/lib/common/universal-chat-agent.js +0 -47
- package/lib/common/universal-chat-agent.js.map +0 -1
- package/lib/common/universal-prompt-template.d.ts +0 -4
- package/lib/common/universal-prompt-template.d.ts.map +0 -1
- package/lib/common/universal-prompt-template.js +0 -32
- package/lib/common/universal-prompt-template.js.map +0 -1
- package/lib/common/workspace-functions.d.ts +0 -12
- package/lib/common/workspace-functions.d.ts.map +0 -1
- package/lib/common/workspace-functions.js +0 -30
- package/lib/common/workspace-functions.js.map +0 -1
- package/lib/common/workspace-preferences.d.ts +0 -10
- package/lib/common/workspace-preferences.d.ts.map +0 -1
- package/lib/common/workspace-preferences.js +0 -89
- package/lib/common/workspace-preferences.js.map +0 -1
- package/lib/common/workspace-search-provider-util.d.ts +0 -17
- package/lib/common/workspace-search-provider-util.d.ts.map +0 -1
- package/lib/common/workspace-search-provider-util.js +0 -51
- package/lib/common/workspace-search-provider-util.js.map +0 -1
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts +0 -18
- package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +0 -1
- package/lib/node/app-tester-agent/browser-automation-impl.js +0 -96
- package/lib/node/app-tester-agent/browser-automation-impl.js.map +0 -1
- package/lib/node/backend-module.d.ts +0 -4
- package/lib/node/backend-module.d.ts.map +0 -1
- package/lib/node/backend-module.js +0 -45
- package/lib/node/backend-module.js.map +0 -1
- package/lib/node/github-repo-service-impl.d.ts +0 -7
- package/lib/node/github-repo-service-impl.d.ts.map +0 -1
- package/lib/node/github-repo-service-impl.js +0 -86
- package/lib/node/github-repo-service-impl.js.map +0 -1
- package/lib/package.spec.d.ts +0 -1
- package/lib/package.spec.d.ts.map +0 -1
- package/lib/package.spec.js +0 -26
- package/lib/package.spec.js.map +0 -1
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ The package provides a configuration view that enables you to adjust settings re
|
|
|
34
34
|
|
|
35
35
|
## Additional Information
|
|
36
36
|
|
|
37
|
+
- [API documentation for `@theia/ai-ide`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_ai-ide.html)
|
|
37
38
|
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
38
39
|
- [Theia - Website](https://theia-ide.org/)
|
|
39
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/ai-ide",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.56+d8f18cc386c",
|
|
4
4
|
"description": "AI IDE Agents Extension",
|
|
5
5
|
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
"theia-extension"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@theia/ai-chat": "1.67.0-next.
|
|
19
|
-
"@theia/ai-chat-ui": "1.67.0-next.
|
|
20
|
-
"@theia/ai-core": "1.67.0-next.
|
|
21
|
-
"@theia/ai-mcp": "1.67.0-next.
|
|
22
|
-
"@theia/core": "1.67.0-next.
|
|
23
|
-
"@theia/debug": "1.67.0-next.
|
|
24
|
-
"@theia/editor": "1.67.0-next.
|
|
25
|
-
"@theia/filesystem": "1.67.0-next.
|
|
26
|
-
"@theia/markers": "1.67.0-next.
|
|
27
|
-
"@theia/monaco": "1.67.0-next.
|
|
28
|
-
"@theia/navigator": "1.67.0-next.
|
|
29
|
-
"@theia/preferences": "1.67.0-next.
|
|
30
|
-
"@theia/scm": "1.67.0-next.
|
|
31
|
-
"@theia/search-in-workspace": "1.67.0-next.
|
|
32
|
-
"@theia/task": "1.67.0-next.
|
|
33
|
-
"@theia/terminal": "1.67.0-next.
|
|
34
|
-
"@theia/workspace": "1.67.0-next.
|
|
18
|
+
"@theia/ai-chat": "1.67.0-next.56+d8f18cc386c",
|
|
19
|
+
"@theia/ai-chat-ui": "1.67.0-next.56+d8f18cc386c",
|
|
20
|
+
"@theia/ai-core": "1.67.0-next.56+d8f18cc386c",
|
|
21
|
+
"@theia/ai-mcp": "1.67.0-next.56+d8f18cc386c",
|
|
22
|
+
"@theia/core": "1.67.0-next.56+d8f18cc386c",
|
|
23
|
+
"@theia/debug": "1.67.0-next.56+d8f18cc386c",
|
|
24
|
+
"@theia/editor": "1.67.0-next.56+d8f18cc386c",
|
|
25
|
+
"@theia/filesystem": "1.67.0-next.56+d8f18cc386c",
|
|
26
|
+
"@theia/markers": "1.67.0-next.56+d8f18cc386c",
|
|
27
|
+
"@theia/monaco": "1.67.0-next.56+d8f18cc386c",
|
|
28
|
+
"@theia/navigator": "1.67.0-next.56+d8f18cc386c",
|
|
29
|
+
"@theia/preferences": "1.67.0-next.56+d8f18cc386c",
|
|
30
|
+
"@theia/scm": "1.67.0-next.56+d8f18cc386c",
|
|
31
|
+
"@theia/search-in-workspace": "1.67.0-next.56+d8f18cc386c",
|
|
32
|
+
"@theia/task": "1.67.0-next.56+d8f18cc386c",
|
|
33
|
+
"@theia/terminal": "1.67.0-next.56+d8f18cc386c",
|
|
34
|
+
"@theia/workspace": "1.67.0-next.56+d8f18cc386c",
|
|
35
35
|
"date-fns": "^4.1.0",
|
|
36
36
|
"ignore": "^6.0.0",
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@theia/cli": "1.67.0-next.
|
|
47
|
-
"@theia/test": "1.67.0-next.
|
|
46
|
+
"@theia/cli": "1.67.0-next.56+d8f18cc386c",
|
|
47
|
+
"@theia/test": "1.67.0-next.56+d8f18cc386c"
|
|
48
48
|
},
|
|
49
49
|
"theiaExtensions": [
|
|
50
50
|
{
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"nyc": {
|
|
69
69
|
"extends": "../../configs/nyc.json"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
|
|
72
72
|
}
|
|
@@ -347,16 +347,16 @@ export class AIAgentConfigurationWidget extends ReactWidget {
|
|
|
347
347
|
this.updateParsedPromptParts();
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
private toggleAgentEnabled = () => {
|
|
350
|
+
private toggleAgentEnabled = async () => {
|
|
351
351
|
const agent = this.aiConfigurationSelectionService.getActiveAgent();
|
|
352
352
|
if (!agent) {
|
|
353
353
|
return false;
|
|
354
354
|
}
|
|
355
355
|
const enabled = this.agentService.isEnabled(agent.id);
|
|
356
356
|
if (enabled) {
|
|
357
|
-
this.agentService.disableAgent(agent.id);
|
|
357
|
+
await this.agentService.disableAgent(agent.id);
|
|
358
358
|
} else {
|
|
359
|
-
this.agentService.enableAgent(agent.id);
|
|
359
|
+
await this.agentService.enableAgent(agent.id);
|
|
360
360
|
}
|
|
361
361
|
this.update();
|
|
362
362
|
};
|
|
@@ -25,14 +25,14 @@ import {
|
|
|
25
25
|
SuggestFileContent,
|
|
26
26
|
WriteFileContent,
|
|
27
27
|
SuggestFileReplacements,
|
|
28
|
+
SuggestFileReplacements_Simple,
|
|
28
29
|
WriteFileReplacements,
|
|
29
30
|
ClearFileChanges,
|
|
30
31
|
GetProposedFileState,
|
|
31
32
|
ReplaceContentInFileFunctionHelper,
|
|
32
33
|
FileChangeSetTitleProvider,
|
|
33
34
|
DefaultFileChangeSetTitleProvider,
|
|
34
|
-
ReplaceContentInFileFunctionHelperV2
|
|
35
|
-
SuggestFileReplacements_Next
|
|
35
|
+
ReplaceContentInFileFunctionHelperV2
|
|
36
36
|
} from './file-changeset-functions';
|
|
37
37
|
import { MutableChatRequestModel, MutableChatResponseModel, ChangeSet, ChangeSetElement, MutableChatModel } from '@theia/ai-chat';
|
|
38
38
|
import { Container } from '@theia/core/shared/inversify';
|
|
@@ -106,12 +106,12 @@ describe('File Changeset Functions Cancellation Tests', () => {
|
|
|
106
106
|
container.bind(ReplaceContentInFileFunctionHelper).toSelf();
|
|
107
107
|
container.bind(SuggestFileContent).toSelf();
|
|
108
108
|
container.bind(WriteFileContent).toSelf();
|
|
109
|
+
container.bind(SuggestFileReplacements_Simple).toSelf();
|
|
109
110
|
container.bind(SuggestFileReplacements).toSelf();
|
|
110
111
|
container.bind(WriteFileReplacements).toSelf();
|
|
111
112
|
container.bind(ClearFileChanges).toSelf();
|
|
112
113
|
container.bind(GetProposedFileState).toSelf();
|
|
113
114
|
container.bind(ReplaceContentInFileFunctionHelperV2).toSelf();
|
|
114
|
-
container.bind(SuggestFileReplacements_Next).toSelf();
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
afterEach(() => {
|
|
@@ -140,11 +140,11 @@ describe('File Changeset Functions Cancellation Tests', () => {
|
|
|
140
140
|
expect(jsonResponse.error).to.equal('Operation cancelled by user');
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
-
it('
|
|
144
|
-
const
|
|
143
|
+
it('SuggestFileReplacements_Simple should respect cancellation token', async () => {
|
|
144
|
+
const suggestFileReplacementsSimple = container.get(SuggestFileReplacements_Simple);
|
|
145
145
|
cancellationTokenSource.cancel();
|
|
146
146
|
|
|
147
|
-
const handler =
|
|
147
|
+
const handler = suggestFileReplacementsSimple.getTool().handler;
|
|
148
148
|
const result = await handler(
|
|
149
149
|
JSON.stringify({
|
|
150
150
|
path: 'test.txt',
|
|
@@ -214,11 +214,11 @@ describe('File Changeset Functions Cancellation Tests', () => {
|
|
|
214
214
|
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
it('
|
|
218
|
-
const
|
|
217
|
+
it('SuggestFileReplacements should respect cancellation token with V2 implementation', async () => {
|
|
218
|
+
const suggestFileReplacements = container.get(SuggestFileReplacements);
|
|
219
219
|
cancellationTokenSource.cancel();
|
|
220
220
|
|
|
221
|
-
const handler =
|
|
221
|
+
const handler = suggestFileReplacements.getTool().handler;
|
|
222
222
|
const result = await handler(
|
|
223
223
|
JSON.stringify({
|
|
224
224
|
path: 'test.txt',
|
|
@@ -231,9 +231,9 @@ describe('File Changeset Functions Cancellation Tests', () => {
|
|
|
231
231
|
expect(jsonResponse.error).to.equal('Operation cancelled by user');
|
|
232
232
|
});
|
|
233
233
|
|
|
234
|
-
it('
|
|
235
|
-
const
|
|
236
|
-
expect(
|
|
237
|
-
expect(
|
|
234
|
+
it('SuggestFileReplacements should have correct ID', () => {
|
|
235
|
+
const suggestFileReplacements = container.get(SuggestFileReplacements);
|
|
236
|
+
expect(SuggestFileReplacements.ID).to.equal('suggestFileReplacements');
|
|
237
|
+
expect(suggestFileReplacements.getTool().id).to.equal('suggestFileReplacements');
|
|
238
238
|
});
|
|
239
239
|
});
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
SUGGEST_FILE_REPLACEMENTS_ID,
|
|
32
32
|
WRITE_FILE_CONTENT_ID,
|
|
33
33
|
WRITE_FILE_REPLACEMENTS_ID,
|
|
34
|
-
|
|
34
|
+
SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID
|
|
35
35
|
} from '../common/file-changeset-function-ids';
|
|
36
36
|
|
|
37
37
|
export const FileChangeSetTitleProvider = Symbol('FileChangeSetTitleProvider');
|
|
@@ -492,16 +492,16 @@ export class SimpleWriteFileReplacements implements ToolProvider {
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
@injectable()
|
|
495
|
-
export class
|
|
496
|
-
static ID =
|
|
495
|
+
export class SuggestFileReplacements_Simple implements ToolProvider {
|
|
496
|
+
static ID = SUGGEST_FILE_REPLACEMENTS_SIMPLE_ID;
|
|
497
497
|
@inject(ReplaceContentInFileFunctionHelper)
|
|
498
498
|
protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelper;
|
|
499
499
|
|
|
500
500
|
getTool(): ToolRequest {
|
|
501
501
|
const metadata = this.replaceContentInFileFunctionHelper.getToolMetadata(true);
|
|
502
502
|
return {
|
|
503
|
-
id:
|
|
504
|
-
name:
|
|
503
|
+
id: SuggestFileReplacements_Simple.ID,
|
|
504
|
+
name: SuggestFileReplacements_Simple.ID,
|
|
505
505
|
description: metadata.description,
|
|
506
506
|
parameters: metadata.parameters,
|
|
507
507
|
handler: async (args: string, ctx: MutableChatRequestModel): Promise<string> => {
|
|
@@ -611,8 +611,8 @@ export class ReplaceContentInFileFunctionHelperV2 extends ReplaceContentInFileFu
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
@injectable()
|
|
614
|
-
export class
|
|
615
|
-
static ID =
|
|
614
|
+
export class SuggestFileReplacements implements ToolProvider {
|
|
615
|
+
static ID = SUGGEST_FILE_REPLACEMENTS_ID;
|
|
616
616
|
|
|
617
617
|
@inject(ReplaceContentInFileFunctionHelperV2)
|
|
618
618
|
protected readonly replaceContentInFileFunctionHelper: ReplaceContentInFileFunctionHelperV2;
|
|
@@ -620,8 +620,8 @@ export class SuggestFileReplacements_Next implements ToolProvider {
|
|
|
620
620
|
getTool(): ToolRequest {
|
|
621
621
|
const metadata = this.replaceContentInFileFunctionHelper.getToolMetadata(true);
|
|
622
622
|
return {
|
|
623
|
-
id:
|
|
624
|
-
name:
|
|
623
|
+
id: SuggestFileReplacements.ID,
|
|
624
|
+
name: SuggestFileReplacements.ID,
|
|
625
625
|
description: `Proposes to replace sections of content in an existing file by providing a list of replacements.
|
|
626
626
|
Each replacement consists of oldContent to be matched and newContent to insert in its place.
|
|
627
627
|
By default, a single occurrence of each oldContent is expected. If the 'multiple' flag is set to true, all occurrences will be replaced.
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
GetProposedFileState,
|
|
51
51
|
ReplaceContentInFileFunctionHelper,
|
|
52
52
|
SuggestFileReplacements,
|
|
53
|
+
SuggestFileReplacements_Simple,
|
|
53
54
|
SimpleSuggestFileReplacements,
|
|
54
55
|
SuggestFileContent,
|
|
55
56
|
WriteFileContent,
|
|
@@ -57,8 +58,7 @@ import {
|
|
|
57
58
|
SimpleWriteFileReplacements,
|
|
58
59
|
FileChangeSetTitleProvider,
|
|
59
60
|
DefaultFileChangeSetTitleProvider,
|
|
60
|
-
ReplaceContentInFileFunctionHelperV2
|
|
61
|
-
SuggestFileReplacements_Next
|
|
61
|
+
ReplaceContentInFileFunctionHelperV2
|
|
62
62
|
} from './file-changeset-functions';
|
|
63
63
|
import { OrchestratorChatAgent, OrchestratorChatAgentId } from '../common/orchestrator-chat-agent';
|
|
64
64
|
import { UniversalChatAgent, UniversalChatAgentId } from '../common/universal-chat-agent';
|
|
@@ -98,6 +98,7 @@ import { ProjectInfoAgent } from './project-info-agent';
|
|
|
98
98
|
import { SuggestTerminalCommand } from './ai-terminal-functions';
|
|
99
99
|
import { ContextFileValidationService } from '@theia/ai-chat/lib/browser/context-file-validation-service';
|
|
100
100
|
import { ContextFileValidationServiceImpl } from './context-file-validation-service-impl';
|
|
101
|
+
import { RememberCommandContribution } from './remember-command-contribution';
|
|
101
102
|
|
|
102
103
|
export default new ContainerModule((bind, _unbind, _isBound, rebind) => {
|
|
103
104
|
bind(PreferenceContribution).toConstantValue({ schema: aiIdePreferenceSchema });
|
|
@@ -167,10 +168,10 @@ export default new ContainerModule((bind, _unbind, _isBound, rebind) => {
|
|
|
167
168
|
bindToolProvider(LaunchStopProvider, bind);
|
|
168
169
|
bind(ReplaceContentInFileFunctionHelper).toSelf().inSingletonScope();
|
|
169
170
|
bind(FileChangeSetTitleProvider).to(DefaultFileChangeSetTitleProvider).inSingletonScope();
|
|
171
|
+
bind(ReplaceContentInFileFunctionHelperV2).toSelf().inSingletonScope();
|
|
170
172
|
bindToolProvider(SuggestFileReplacements, bind);
|
|
173
|
+
bindToolProvider(SuggestFileReplacements_Simple, bind);
|
|
171
174
|
bindToolProvider(WriteFileReplacements, bind);
|
|
172
|
-
bind(ReplaceContentInFileFunctionHelperV2).toSelf().inSingletonScope();
|
|
173
|
-
bindToolProvider(SuggestFileReplacements_Next, bind);
|
|
174
175
|
bindToolProvider(ListChatContext, bind);
|
|
175
176
|
bindToolProvider(ResolveChatContext, bind);
|
|
176
177
|
bind(AIConfigurationSelectionService).toSelf().inSingletonScope();
|
|
@@ -275,4 +276,6 @@ export default new ContainerModule((bind, _unbind, _isBound, rebind) => {
|
|
|
275
276
|
|
|
276
277
|
bind(ContextFileValidationServiceImpl).toSelf().inSingletonScope();
|
|
277
278
|
bind(ContextFileValidationService).toService(ContextFileValidationServiceImpl);
|
|
279
|
+
|
|
280
|
+
bind(FrontendApplicationContribution).to(RememberCommandContribution);
|
|
278
281
|
});
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { ChatWelcomeMessageProvider
|
|
17
|
+
import { ChatWelcomeMessageProvider } from '@theia/ai-chat-ui/lib/browser/chat-tree-view';
|
|
18
18
|
import * as React from '@theia/core/shared/react';
|
|
19
19
|
import { nls } from '@theia/core/lib/common/nls';
|
|
20
20
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { CommonCommands, LocalizedMarkdown, MarkdownRenderer } from '@theia/core/lib/browser';
|
|
22
|
+
import { OPEN_AI_CONFIG_VIEW } from './ai-configuration/ai-configuration-view-contribution';
|
|
23
23
|
|
|
24
24
|
const TheiaIdeAiLogo = ({ width = 200, height = 200, className = '' }) =>
|
|
25
25
|
<svg
|
|
@@ -57,30 +57,34 @@ const TheiaIdeAiLogo = ({ width = 200, height = 200, className = '' }) =>
|
|
|
57
57
|
@injectable()
|
|
58
58
|
export class IdeChatWelcomeMessageProvider implements ChatWelcomeMessageProvider {
|
|
59
59
|
|
|
60
|
-
@inject(
|
|
61
|
-
protected
|
|
60
|
+
@inject(MarkdownRenderer)
|
|
61
|
+
protected readonly markdownRenderer: MarkdownRenderer;
|
|
62
62
|
|
|
63
|
-
renderWelcomeMessage
|
|
63
|
+
renderWelcomeMessage(): React.ReactNode {
|
|
64
64
|
return <div className={'theia-WelcomeMessage'}>
|
|
65
65
|
<TheiaIdeAiLogo width={200} height={200} className="theia-WelcomeMessage-Logo" />
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
<LocalizedMarkdown
|
|
67
|
+
localizationKey="theia/ai/ide/chatWelcomeMessage"
|
|
68
|
+
defaultMarkdown={`
|
|
69
|
+
# Ask the Theia IDE AI
|
|
70
|
+
|
|
71
|
+
To talk to a specialized agent, simply start your message with *@* followed by the agent's name: *@{0}*, *@{1}*, *@{2}*, and more.
|
|
72
|
+
|
|
73
|
+
Attach context: use variables, like *#{3}*, *#{4}* (current file), *#{5}* or click {6}.
|
|
74
|
+
|
|
75
|
+
Lean more in the [documentation](https://theia-ide.org/docs/user_ai/#chat).
|
|
76
|
+
`}
|
|
77
|
+
args={['Coder', 'Architect', 'Universal', 'file', '_f', 'selectedText', '<span class="codicon codicon-add"></span>']}
|
|
78
|
+
markdownRenderer={this.markdownRenderer}
|
|
79
|
+
className="theia-WelcomeMessage-Content"
|
|
80
|
+
markdownOptions={{ supportHtml: true }}
|
|
81
|
+
/>
|
|
80
82
|
</div>;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
renderDisabledMessage
|
|
85
|
+
renderDisabledMessage(): React.ReactNode {
|
|
86
|
+
const openAiHistory = 'aiHistory:open';
|
|
87
|
+
|
|
84
88
|
return <div className={'theia-ResponseNode'}>
|
|
85
89
|
<div className='theia-ResponseNode-Content' key={'disabled-message'}>
|
|
86
90
|
<div className="disable-message">
|
|
@@ -93,59 +97,49 @@ export class IdeChatWelcomeMessageProvider implements ChatWelcomeMessageProvider
|
|
|
93
97
|
<div className="section-title">
|
|
94
98
|
<p>{nls.localize('theia/ai/chat-ui/chat-view-tree-widget/howToEnable', 'How to Enable the AI Features:')}</p>
|
|
95
99
|
</div>
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
100
|
+
<LocalizedMarkdown
|
|
101
|
+
localizationKey="theia/ai/ide/chatDisabledMessage/howToEnable"
|
|
102
|
+
defaultMarkdown={`
|
|
103
|
+
To enable the AI features, please go to the AI features section of [the settings menu]({0}) and
|
|
104
|
+
1. Toggle the switch for **Ai-features: Enable**.
|
|
105
|
+
2. Provide at least one LLM provider (e.g. OpenAI). See [the documentation](https://theia-ide.org/docs/user_ai/) for more information.
|
|
106
|
+
|
|
107
|
+
This will activate the AI capabilities in the app. Please remember, these features are **in a beta state**, so they may change and we are working on improving them 🚧.\\
|
|
108
|
+
Please support us by [providing feedback](https://github.com/eclipse-theia/theia)!
|
|
109
|
+
`}
|
|
110
|
+
args={[`command:${CommonCommands.OPEN_PREFERENCES.id}?ai-features`]}
|
|
111
|
+
markdownRenderer={this.markdownRenderer}
|
|
112
|
+
className="section-content"
|
|
113
|
+
markdownOptions={{ isTrusted: { enabledCommands: [CommonCommands.OPEN_PREFERENCES.id] } }}
|
|
114
|
+
/>
|
|
111
115
|
|
|
112
116
|
<div className="section-title">
|
|
113
|
-
<p>Currently Supported Views and Features
|
|
114
|
-
</div>
|
|
115
|
-
<div className="section-content">
|
|
116
|
-
<p>Once the AI features are enabled, you can access the following views and features:</p>
|
|
117
|
-
<ul>
|
|
118
|
-
<li>Code Completion</li>
|
|
119
|
-
<li>Terminal Assistance (via CTRL+I in a terminal)</li>
|
|
120
|
-
<li>This Chat View (features the following agents):
|
|
121
|
-
<ul>
|
|
122
|
-
<li>Universal Chat Agent</li>
|
|
123
|
-
<li>Coder Chat Agent</li>
|
|
124
|
-
<li>Architect Chat Agent</li>
|
|
125
|
-
<li>Command Chat Agent</li>
|
|
126
|
-
<li>Orchestrator Chat Agent</li>
|
|
127
|
-
</ul>
|
|
128
|
-
</li>
|
|
129
|
-
<li>{this.renderLinkButton(nls.localize('theia/ai/chat-ui/chat-view-tree-widget/aiHistoryView', 'AI History View'), 'aiHistory:open')}</li>
|
|
130
|
-
<li>{this.renderLinkButton(
|
|
131
|
-
nls.localize('theia/ai/chat-ui/chat-view-tree-widget/aiConfigurationView', 'AI Configuration View'), 'aiConfiguration:open')}
|
|
132
|
-
</li>
|
|
133
|
-
</ul>
|
|
134
|
-
<p>See <a href="https://theia-ide.org/docs/user_ai/" target="_blank">the documentation</a> for more information.</p>
|
|
117
|
+
<p>{nls.localize('theia/ai/ide/chatDisabledMessage/featuresTitle', 'Currently Supported Views and Features:')}</p>
|
|
135
118
|
</div>
|
|
119
|
+
<LocalizedMarkdown
|
|
120
|
+
localizationKey="theia/ai/ide/chatDisabledMessage/features"
|
|
121
|
+
defaultMarkdown={`
|
|
122
|
+
Once the AI features are enabled, you can access the following views and features:
|
|
123
|
+
- Code Completion
|
|
124
|
+
- Terminal Assistance (via CTRL+I in a terminal)
|
|
125
|
+
- This Chat View (features the following agents):
|
|
126
|
+
* Universal Chat Agent
|
|
127
|
+
* Coder Chat Agent
|
|
128
|
+
* Architect Chat Agent
|
|
129
|
+
* Command Chat Agent
|
|
130
|
+
* Orchestrator Chat Agent
|
|
131
|
+
- [AI History View]({0})
|
|
132
|
+
- [AI Configuration View]({1})
|
|
133
|
+
|
|
134
|
+
See [the documentation](https://theia-ide.org/docs/user_ai/) for more information.
|
|
135
|
+
`}
|
|
136
|
+
args={[`command:${openAiHistory}`, `command:${OPEN_AI_CONFIG_VIEW.id}`]}
|
|
137
|
+
markdownRenderer={this.markdownRenderer}
|
|
138
|
+
className="section-content"
|
|
139
|
+
markdownOptions={{ isTrusted: { enabledCommands: [openAiHistory, OPEN_AI_CONFIG_VIEW.id] } }}
|
|
140
|
+
/>
|
|
136
141
|
</div>
|
|
137
142
|
</div>
|
|
138
|
-
</div
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
protected renderLinkButton(title: string, openCommandId: string, ...commandArgs: unknown[]): React.ReactNode {
|
|
142
|
-
return <a
|
|
143
|
-
role={'button'}
|
|
144
|
-
tabIndex={0}
|
|
145
|
-
onClick={() => this.commandRegistry.executeCommand(openCommandId, ...commandArgs)}
|
|
146
|
-
onKeyDown={e => isEnterKey(e) && this.commandRegistry.executeCommand(openCommandId)}>
|
|
147
|
-
{title}
|
|
148
|
-
</a>;
|
|
143
|
+
</div>;
|
|
149
144
|
}
|
|
150
|
-
|
|
151
145
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 EclipseSource GmbH.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
18
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { PromptService } from '@theia/ai-core/lib/common';
|
|
20
|
+
import { nls } from '@theia/core';
|
|
21
|
+
import { AGENT_DELEGATION_FUNCTION_ID } from '@theia/ai-chat/lib/browser/agent-delegation-tool';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Contribution that registers the `/remember` slash command for AI chat agents.
|
|
25
|
+
*
|
|
26
|
+
* This command allows Architect and Coder agents to extract important topics
|
|
27
|
+
* from the current conversation and delegate to the ProjectInfo agent to update
|
|
28
|
+
* the persistent project context file.
|
|
29
|
+
*/
|
|
30
|
+
@injectable()
|
|
31
|
+
export class RememberCommandContribution implements FrontendApplicationContribution {
|
|
32
|
+
|
|
33
|
+
@inject(PromptService)
|
|
34
|
+
protected readonly promptService: PromptService;
|
|
35
|
+
|
|
36
|
+
onStart(): void {
|
|
37
|
+
this.registerRememberCommand();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
protected registerRememberCommand(): void {
|
|
41
|
+
const commandTemplate = this.buildCommandTemplate();
|
|
42
|
+
|
|
43
|
+
this.promptService.addBuiltInPromptFragment({
|
|
44
|
+
id: 'remember-conversation-context',
|
|
45
|
+
template: commandTemplate,
|
|
46
|
+
isCommand: true,
|
|
47
|
+
commandName: 'remember',
|
|
48
|
+
commandDescription: nls.localize(
|
|
49
|
+
'theia/ai-ide/rememberCommand/description',
|
|
50
|
+
'Extract topics from conversation and update project info'
|
|
51
|
+
),
|
|
52
|
+
commandArgumentHint: nls.localize(
|
|
53
|
+
'theia/ai-ide/rememberCommand/argumentHint',
|
|
54
|
+
'[topic-hint]'
|
|
55
|
+
),
|
|
56
|
+
commandAgents: ['Architect', 'Coder']
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
protected buildCommandTemplate(): string {
|
|
61
|
+
return `You have been asked to extract and remember important information from the current conversation.
|
|
62
|
+
|
|
63
|
+
## Task Overview
|
|
64
|
+
Review the conversation history and identify specific information that should be added to the persistent project context.
|
|
65
|
+
|
|
66
|
+
## Focus Area
|
|
67
|
+
$ARGUMENTS
|
|
68
|
+
|
|
69
|
+
## What to Extract
|
|
70
|
+
**If a focus area is provided above**: ONLY extract information related to that specific focus area. Ignore all other topics.
|
|
71
|
+
|
|
72
|
+
**If no focus area is provided**: Look specifically for information where the user had to correct you or provide clarification:
|
|
73
|
+
- **User corrections**: When the user corrected your assumptions about the codebase, architecture, or processes
|
|
74
|
+
- **User-provided context**: Information the user explicitly provided that you couldn't discover yourself
|
|
75
|
+
- **Project-specific knowledge**: Details about the project that the user shared when you made incorrect assumptions
|
|
76
|
+
|
|
77
|
+
**Do NOT extract**:
|
|
78
|
+
- General information you discovered through code analysis
|
|
79
|
+
- Standard coding practices you identified yourself
|
|
80
|
+
- Information you found by exploring the codebase
|
|
81
|
+
- Common knowledge or widely-known patterns
|
|
82
|
+
- Details that are already well-documented in the code
|
|
83
|
+
|
|
84
|
+
## Instructions
|
|
85
|
+
1. **Analyze the conversation**: Review messages for the specific criteria above
|
|
86
|
+
2. **Extract only relevant information**: For each qualifying item, prepare a clear description that captures:
|
|
87
|
+
- What the user corrected or clarified
|
|
88
|
+
- Why your initial understanding was incomplete
|
|
89
|
+
- The specific project context that was provided
|
|
90
|
+
3. **Delegate to ProjectInfo agent**: Use the ~{${AGENT_DELEGATION_FUNCTION_ID}} tool to send the extracted information to the ProjectInfo agent:
|
|
91
|
+
- Agent ID: 'ProjectInfo'
|
|
92
|
+
- Prompt: Ask the ProjectInfo agent to review the extracted information and update the project information file
|
|
93
|
+
|
|
94
|
+
## Example Delegation
|
|
95
|
+
\`\`\`
|
|
96
|
+
Please review and incorporate the following user corrections/clarifications into the project context:
|
|
97
|
+
|
|
98
|
+
[Your extracted corrections and user-provided context here]
|
|
99
|
+
|
|
100
|
+
Update /.prompts/project-info.prompttemplate by adding this information to the appropriate sections. Focus on information that prevents future misunderstandings.
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
Remember: Only extract information that prevents future AI agents from making the same mistakes or assumptions you made that were corrected by the user.`;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -28,8 +28,7 @@ import {
|
|
|
28
28
|
SUGGEST_FILE_REPLACEMENTS_ID,
|
|
29
29
|
WRITE_FILE_REPLACEMENTS_ID,
|
|
30
30
|
CLEAR_FILE_CHANGES_ID,
|
|
31
|
-
GET_PROPOSED_CHANGES_ID
|
|
32
|
-
SUGGEST_FILE_REPLACEMENTS_NEXT_ID
|
|
31
|
+
GET_PROPOSED_CHANGES_ID
|
|
33
32
|
} from './file-changeset-function-ids';
|
|
34
33
|
|
|
35
34
|
export const CODER_SYSTEM_PROMPT_ID = 'coder-system';
|
|
@@ -161,7 +160,7 @@ You are an autonomous AI agent. Do not stop until:
|
|
|
161
160
|
};
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
function getCoderEditPromptTemplate(
|
|
163
|
+
function getCoderEditPromptTemplate(): string {
|
|
165
164
|
return `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
|
|
166
165
|
Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
|
|
167
166
|
https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
|
|
@@ -189,9 +188,9 @@ This also applies for newly created files!
|
|
|
189
188
|
- **Always Retrieve Current Content**: Use getFileContent to get the original content of the target file.
|
|
190
189
|
- **View Pending Changes**: Use ~{${GET_PROPOSED_CHANGES_ID}} to see the current proposed state of a file, including all pending changes.
|
|
191
190
|
- **Change Content**: Use one of these methods to propose changes:
|
|
192
|
-
- ~{${
|
|
193
|
-
- ~{${SUGGEST_FILE_CONTENT_ID}}: For complete file rewrites when you need to replace the entire content.
|
|
194
|
-
- If ~{${
|
|
191
|
+
- ~{${SUGGEST_FILE_REPLACEMENTS_ID}}: For targeted replacements of specific text sections. Multiple calls will merge changes unless you set the reset parameter to true.
|
|
192
|
+
- ~{${SUGGEST_FILE_CONTENT_ID}}: For complete file rewrites when you need to replace the entire content.
|
|
193
|
+
- If ~{${SUGGEST_FILE_REPLACEMENTS_ID}} continuously fails use ~{${SUGGEST_FILE_CONTENT_ID}}.
|
|
195
194
|
- ~{${CLEAR_FILE_CHANGES_ID}}: To clear all pending changes for a file and start fresh.
|
|
196
195
|
|
|
197
196
|
The changes will be presented as an applicable diff to the user in any case. The user can then accept or reject each change individually. Before you run tasks that depend on the \
|
|
@@ -235,14 +234,14 @@ You have previously proposed changes for the following files. Some suggestions m
|
|
|
235
234
|
export function getCoderPromptTemplateEdit(): BasePromptFragment {
|
|
236
235
|
return {
|
|
237
236
|
id: CODER_EDIT_TEMPLATE_ID,
|
|
238
|
-
template: getCoderEditPromptTemplate(
|
|
237
|
+
template: getCoderEditPromptTemplate()
|
|
239
238
|
};
|
|
240
239
|
}
|
|
241
|
-
|
|
240
|
+
// Currently, the next template is identical to the regular edit prompt
|
|
242
241
|
export function getCoderPromptTemplateEditNext(): BasePromptFragment {
|
|
243
242
|
return {
|
|
244
243
|
id: CODER_EDIT_NEXT_TEMPLATE_ID,
|
|
245
|
-
template: getCoderEditPromptTemplate(
|
|
244
|
+
template: getCoderEditPromptTemplate(),
|
|
246
245
|
...({ variantOf: CODER_EDIT_TEMPLATE_ID })
|
|
247
246
|
};
|
|
248
247
|
}
|
|
@@ -33,25 +33,25 @@ Never under any circumstances may you reply with just the command-id!
|
|
|
33
33
|
|
|
34
34
|
## Example 1
|
|
35
35
|
|
|
36
|
-
This reply is to tell the user to execute the \`
|
|
36
|
+
This reply is to tell the user to execute the \`preferences:open\` command that is available in the Theia command registry.
|
|
37
37
|
|
|
38
38
|
\`\`\`json
|
|
39
39
|
{
|
|
40
40
|
"type": "theia-command",
|
|
41
|
-
"commandId": "
|
|
41
|
+
"commandId": "preferences:open"
|
|
42
42
|
}
|
|
43
43
|
\`\`\`
|
|
44
44
|
|
|
45
45
|
## Example 2
|
|
46
46
|
|
|
47
|
-
This reply is to tell the user to execute the \`
|
|
47
|
+
This reply is to tell the user to execute the \`preferences:open\` command that is available in the Theia command registry,
|
|
48
48
|
when the user want to pass arguments to the command.
|
|
49
49
|
|
|
50
50
|
\`\`\`json
|
|
51
51
|
{
|
|
52
52
|
"type": "theia-command",
|
|
53
|
-
"commandId": "
|
|
54
|
-
"arguments": ["
|
|
53
|
+
"commandId": "preferences:open",
|
|
54
|
+
"arguments": ["ai-features"]
|
|
55
55
|
}
|
|
56
56
|
\`\`\`
|
|
57
57
|
|