@theia/ai-claude-code 1.67.0-next.3 → 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.
Files changed (102) hide show
  1. package/README.md +1 -0
  2. package/package.json +10 -10
  3. package/lib/browser/claude-code-chat-agent.d.ts +0 -80
  4. package/lib/browser/claude-code-chat-agent.d.ts.map +0 -1
  5. package/lib/browser/claude-code-chat-agent.js +0 -517
  6. package/lib/browser/claude-code-chat-agent.js.map +0 -1
  7. package/lib/browser/claude-code-command-contribution.d.ts +0 -16
  8. package/lib/browser/claude-code-command-contribution.d.ts.map +0 -1
  9. package/lib/browser/claude-code-command-contribution.js +0 -86
  10. package/lib/browser/claude-code-command-contribution.js.map +0 -1
  11. package/lib/browser/claude-code-edit-tool-service.d.ts +0 -61
  12. package/lib/browser/claude-code-edit-tool-service.d.ts.map +0 -1
  13. package/lib/browser/claude-code-edit-tool-service.js +0 -220
  14. package/lib/browser/claude-code-edit-tool-service.js.map +0 -1
  15. package/lib/browser/claude-code-file-edit-backup-service.d.ts +0 -57
  16. package/lib/browser/claude-code-file-edit-backup-service.d.ts.map +0 -1
  17. package/lib/browser/claude-code-file-edit-backup-service.js +0 -92
  18. package/lib/browser/claude-code-file-edit-backup-service.js.map +0 -1
  19. package/lib/browser/claude-code-frontend-module.d.ts +0 -5
  20. package/lib/browser/claude-code-frontend-module.d.ts.map +0 -1
  21. package/lib/browser/claude-code-frontend-module.js +0 -83
  22. package/lib/browser/claude-code-frontend-module.js.map +0 -1
  23. package/lib/browser/claude-code-frontend-service.d.ts +0 -39
  24. package/lib/browser/claude-code-frontend-service.d.ts.map +0 -1
  25. package/lib/browser/claude-code-frontend-service.js +0 -189
  26. package/lib/browser/claude-code-frontend-service.js.map +0 -1
  27. package/lib/browser/claude-code-slash-commands-contribution.d.ts +0 -17
  28. package/lib/browser/claude-code-slash-commands-contribution.d.ts.map +0 -1
  29. package/lib/browser/claude-code-slash-commands-contribution.js +0 -155
  30. package/lib/browser/claude-code-slash-commands-contribution.js.map +0 -1
  31. package/lib/browser/claude-code-tool-call-content.d.ts +0 -8
  32. package/lib/browser/claude-code-tool-call-content.d.ts.map +0 -1
  33. package/lib/browser/claude-code-tool-call-content.js +0 -30
  34. package/lib/browser/claude-code-tool-call-content.js.map +0 -1
  35. package/lib/browser/renderers/bash-tool-renderer.d.ts +0 -10
  36. package/lib/browser/renderers/bash-tool-renderer.d.ts.map +0 -1
  37. package/lib/browser/renderers/bash-tool-renderer.js +0 -67
  38. package/lib/browser/renderers/bash-tool-renderer.js.map +0 -1
  39. package/lib/browser/renderers/collapsible-tool-renderer.d.ts +0 -13
  40. package/lib/browser/renderers/collapsible-tool-renderer.d.ts.map +0 -1
  41. package/lib/browser/renderers/collapsible-tool-renderer.js +0 -48
  42. package/lib/browser/renderers/collapsible-tool-renderer.js.map +0 -1
  43. package/lib/browser/renderers/edit-tool-renderer.d.ts +0 -16
  44. package/lib/browser/renderers/edit-tool-renderer.d.ts.map +0 -1
  45. package/lib/browser/renderers/edit-tool-renderer.js +0 -135
  46. package/lib/browser/renderers/edit-tool-renderer.js.map +0 -1
  47. package/lib/browser/renderers/glob-tool-renderer.d.ts +0 -14
  48. package/lib/browser/renderers/glob-tool-renderer.d.ts.map +0 -1
  49. package/lib/browser/renderers/glob-tool-renderer.js +0 -104
  50. package/lib/browser/renderers/glob-tool-renderer.js.map +0 -1
  51. package/lib/browser/renderers/grep-tool-renderer.d.ts +0 -14
  52. package/lib/browser/renderers/grep-tool-renderer.d.ts.map +0 -1
  53. package/lib/browser/renderers/grep-tool-renderer.js +0 -160
  54. package/lib/browser/renderers/grep-tool-renderer.js.map +0 -1
  55. package/lib/browser/renderers/ls-tool-renderer.d.ts +0 -16
  56. package/lib/browser/renderers/ls-tool-renderer.d.ts.map +0 -1
  57. package/lib/browser/renderers/ls-tool-renderer.js +0 -116
  58. package/lib/browser/renderers/ls-tool-renderer.js.map +0 -1
  59. package/lib/browser/renderers/multiedit-tool-renderer.d.ts +0 -16
  60. package/lib/browser/renderers/multiedit-tool-renderer.d.ts.map +0 -1
  61. package/lib/browser/renderers/multiedit-tool-renderer.js +0 -148
  62. package/lib/browser/renderers/multiedit-tool-renderer.js.map +0 -1
  63. package/lib/browser/renderers/read-tool-renderer.d.ts +0 -16
  64. package/lib/browser/renderers/read-tool-renderer.d.ts.map +0 -1
  65. package/lib/browser/renderers/read-tool-renderer.js +0 -124
  66. package/lib/browser/renderers/read-tool-renderer.js.map +0 -1
  67. package/lib/browser/renderers/todo-write-renderer.d.ts +0 -10
  68. package/lib/browser/renderers/todo-write-renderer.d.ts.map +0 -1
  69. package/lib/browser/renderers/todo-write-renderer.js +0 -133
  70. package/lib/browser/renderers/todo-write-renderer.js.map +0 -1
  71. package/lib/browser/renderers/web-fetch-tool-renderer.d.ts +0 -10
  72. package/lib/browser/renderers/web-fetch-tool-renderer.d.ts.map +0 -1
  73. package/lib/browser/renderers/web-fetch-tool-renderer.js +0 -83
  74. package/lib/browser/renderers/web-fetch-tool-renderer.js.map +0 -1
  75. package/lib/browser/renderers/write-tool-renderer.d.ts +0 -16
  76. package/lib/browser/renderers/write-tool-renderer.d.ts.map +0 -1
  77. package/lib/browser/renderers/write-tool-renderer.js +0 -114
  78. package/lib/browser/renderers/write-tool-renderer.js.map +0 -1
  79. package/lib/common/claude-code-preferences.d.ts +0 -5
  80. package/lib/common/claude-code-preferences.d.ts.map +0 -1
  81. package/lib/common/claude-code-preferences.js +0 -40
  82. package/lib/common/claude-code-preferences.js.map +0 -1
  83. package/lib/common/claude-code-service.d.ts +0 -235
  84. package/lib/common/claude-code-service.d.ts.map +0 -1
  85. package/lib/common/claude-code-service.js +0 -82
  86. package/lib/common/claude-code-service.js.map +0 -1
  87. package/lib/common/index.d.ts +0 -2
  88. package/lib/common/index.d.ts.map +0 -1
  89. package/lib/common/index.js +0 -20
  90. package/lib/common/index.js.map +0 -1
  91. package/lib/node/claude-code-backend-module.d.ts +0 -4
  92. package/lib/node/claude-code-backend-module.d.ts.map +0 -1
  93. package/lib/node/claude-code-backend-module.js +0 -35
  94. package/lib/node/claude-code-backend-module.js.map +0 -1
  95. package/lib/node/claude-code-service-impl.d.ts +0 -33
  96. package/lib/node/claude-code-service-impl.d.ts.map +0 -1
  97. package/lib/node/claude-code-service-impl.js +0 -468
  98. package/lib/node/claude-code-service-impl.js.map +0 -1
  99. package/lib/package.spec.d.ts +0 -1
  100. package/lib/package.spec.d.ts.map +0 -1
  101. package/lib/package.spec.js +0 -26
  102. package/lib/package.spec.js.map +0 -1
@@ -1,83 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const ai_chat_1 = require("@theia/ai-chat");
19
- const chat_response_part_renderer_1 = require("@theia/ai-chat-ui/lib/browser/chat-response-part-renderer");
20
- const ai_core_1 = require("@theia/ai-core");
21
- const core_1 = require("@theia/core");
22
- const browser_1 = require("@theia/core/lib/browser");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- require("../../src/browser/style/claude-code-tool-renderers.css");
25
- const claude_code_service_1 = require("../common/claude-code-service");
26
- const claude_code_preferences_1 = require("../common/claude-code-preferences");
27
- const claude_code_chat_agent_1 = require("./claude-code-chat-agent");
28
- const claude_code_edit_tool_service_1 = require("./claude-code-edit-tool-service");
29
- const claude_code_file_edit_backup_service_1 = require("./claude-code-file-edit-backup-service");
30
- const claude_code_frontend_service_1 = require("./claude-code-frontend-service");
31
- const bash_tool_renderer_1 = require("./renderers/bash-tool-renderer");
32
- const edit_tool_renderer_1 = require("./renderers/edit-tool-renderer");
33
- const glob_tool_renderer_1 = require("./renderers/glob-tool-renderer");
34
- const grep_tool_renderer_1 = require("./renderers/grep-tool-renderer");
35
- const ls_tool_renderer_1 = require("./renderers/ls-tool-renderer");
36
- const multiedit_tool_renderer_1 = require("./renderers/multiedit-tool-renderer");
37
- const read_tool_renderer_1 = require("./renderers/read-tool-renderer");
38
- const todo_write_renderer_1 = require("./renderers/todo-write-renderer");
39
- const web_fetch_tool_renderer_1 = require("./renderers/web-fetch-tool-renderer");
40
- const write_tool_renderer_1 = require("./renderers/write-tool-renderer");
41
- const claude_code_slash_commands_contribution_1 = require("./claude-code-slash-commands-contribution");
42
- const claude_code_command_contribution_1 = require("./claude-code-command-contribution");
43
- exports.default = new inversify_1.ContainerModule(bind => {
44
- bind(core_1.PreferenceContribution).toConstantValue({ schema: claude_code_preferences_1.ClaudeCodePreferencesSchema });
45
- bind(browser_1.FrontendApplicationContribution).to(claude_code_slash_commands_contribution_1.ClaudeCodeSlashCommandsContribution).inSingletonScope();
46
- bind(core_1.CommandContribution).to(claude_code_command_contribution_1.ClaudeCodeCommandContribution).inSingletonScope();
47
- bind(claude_code_frontend_service_1.ClaudeCodeFrontendService).toSelf().inSingletonScope();
48
- bind(claude_code_frontend_service_1.ClaudeCodeClientImpl).toSelf().inSingletonScope();
49
- bind(claude_code_service_1.ClaudeCodeClient).toService(claude_code_frontend_service_1.ClaudeCodeClientImpl);
50
- bind(claude_code_service_1.ClaudeCodeService).toDynamicValue(ctx => {
51
- const connection = ctx.container.get(browser_1.RemoteConnectionProvider);
52
- const backendClient = ctx.container.get(claude_code_service_1.ClaudeCodeClient);
53
- return connection.createProxy(claude_code_service_1.CLAUDE_CODE_SERVICE_PATH, backendClient);
54
- }).inSingletonScope();
55
- bind(claude_code_file_edit_backup_service_1.FileEditBackupServiceImpl).toSelf().inSingletonScope();
56
- bind(claude_code_file_edit_backup_service_1.FileEditBackupService).toService(claude_code_file_edit_backup_service_1.FileEditBackupServiceImpl);
57
- bind(claude_code_edit_tool_service_1.ClaudeCodeEditToolServiceImpl).toSelf().inSingletonScope();
58
- bind(claude_code_edit_tool_service_1.ClaudeCodeEditToolService).toService(claude_code_edit_tool_service_1.ClaudeCodeEditToolServiceImpl);
59
- bind(claude_code_chat_agent_1.ClaudeCodeChatAgent).toSelf().inSingletonScope();
60
- bind(ai_core_1.Agent).toService(claude_code_chat_agent_1.ClaudeCodeChatAgent);
61
- bind(ai_chat_1.ChatAgent).toService(claude_code_chat_agent_1.ClaudeCodeChatAgent);
62
- bind(todo_write_renderer_1.TodoWriteRenderer).toSelf().inSingletonScope();
63
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(todo_write_renderer_1.TodoWriteRenderer);
64
- bind(read_tool_renderer_1.ReadToolRenderer).toSelf().inSingletonScope();
65
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(read_tool_renderer_1.ReadToolRenderer);
66
- bind(bash_tool_renderer_1.BashToolRenderer).toSelf().inSingletonScope();
67
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(bash_tool_renderer_1.BashToolRenderer);
68
- bind(ls_tool_renderer_1.LSToolRenderer).toSelf().inSingletonScope();
69
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(ls_tool_renderer_1.LSToolRenderer);
70
- bind(edit_tool_renderer_1.EditToolRenderer).toSelf().inSingletonScope();
71
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(edit_tool_renderer_1.EditToolRenderer);
72
- bind(grep_tool_renderer_1.GrepToolRenderer).toSelf().inSingletonScope();
73
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(grep_tool_renderer_1.GrepToolRenderer);
74
- bind(glob_tool_renderer_1.GlobToolRenderer).toSelf().inSingletonScope();
75
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(glob_tool_renderer_1.GlobToolRenderer);
76
- bind(write_tool_renderer_1.WriteToolRenderer).toSelf().inSingletonScope();
77
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(write_tool_renderer_1.WriteToolRenderer);
78
- bind(multiedit_tool_renderer_1.MultiEditToolRenderer).toSelf().inSingletonScope();
79
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(multiedit_tool_renderer_1.MultiEditToolRenderer);
80
- bind(web_fetch_tool_renderer_1.WebFetchToolRenderer).toSelf().inSingletonScope();
81
- bind(chat_response_part_renderer_1.ChatResponsePartRenderer).toService(web_fetch_tool_renderer_1.WebFetchToolRenderer);
82
- });
83
- //# sourceMappingURL=claude-code-frontend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-frontend-module.js","sourceRoot":"","sources":["../../src/browser/claude-code-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,4CAA2C;AAC3C,2GAAqG;AACrG,4CAAuC;AACvC,sCAA0E;AAC1E,qDAA+H;AAC/H,4DAA+D;AAC/D,kEAAgE;AAChE,uEAIuC;AACvC,+EAAgF;AAChF,qEAA+D;AAC/D,mFAA2G;AAC3G,iGAA0G;AAC1G,iFAAiG;AACjG,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,mEAA8D;AAC9D,iFAA4E;AAC5E,uEAAkE;AAClE,yEAAoE;AACpE,iFAA2E;AAC3E,yEAAoE;AACpE,uGAAgG;AAChG,yFAAmF;AAEnF,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,6BAAsB,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;IACpD,IAAI,CAAC,sDAAwB,CAAC,CAAC,SAAS,CAAC,uCAAiB,CAAC,CAAC;IAE5D,IAAI,CAAC,+CAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACxD,IAAI,CAAC,sDAAwB,CAAC,CAAC,SAAS,CAAC,+CAAqB,CAAC,CAAC;IAEhE,IAAI,CAAC,8CAAoB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACvD,IAAI,CAAC,sDAAwB,CAAC,CAAC,SAAS,CAAC,8CAAoB,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC"}
@@ -1,39 +0,0 @@
1
- import { CancellationToken, ILogger, PreferenceService } from '@theia/core';
2
- import { OutputChannel, OutputChannelManager } from '@theia/output/lib/browser/output-channel';
3
- import { WorkspaceService } from '@theia/workspace/lib/browser';
4
- import { ClaudeCodeClient, ClaudeCodeRequest, ClaudeCodeService, StreamMessage, ToolApprovalResponseMessage } from '../common/claude-code-service';
5
- export declare class ClaudeCodeClientImpl implements ClaudeCodeClient {
6
- protected tokenHandlers: Map<string, (token?: StreamMessage) => void>;
7
- protected errorHandlers: Map<string, (error: Error) => void>;
8
- sendToken(streamId: string, token?: StreamMessage): void;
9
- sendError(streamId: string, error: Error): void;
10
- registerTokenHandler(streamId: string, handler: (token?: StreamMessage) => void): void;
11
- registerErrorHandler(streamId: string, handler: (error: Error) => void): void;
12
- unregisterHandlers(streamId: string): void;
13
- }
14
- interface StreamState {
15
- id: string;
16
- tokens: (StreamMessage | undefined)[];
17
- isComplete: boolean;
18
- hasError: boolean;
19
- error?: Error;
20
- pendingResolve?: () => void;
21
- pendingReject?: (error: Error) => void;
22
- }
23
- export declare class ClaudeCodeFrontendService {
24
- protected claudeCodeBackendService: ClaudeCodeService;
25
- protected client: ClaudeCodeClientImpl;
26
- protected readonly workspaceService: WorkspaceService;
27
- protected preferenceService: PreferenceService;
28
- protected readonly outputChannelManager: OutputChannelManager;
29
- protected logger: ILogger;
30
- protected streams: Map<string, StreamState>;
31
- send(request: ClaudeCodeRequest, cancellationToken?: CancellationToken): Promise<AsyncIterable<StreamMessage>>;
32
- protected generateStreamId(): string;
33
- protected setupStreamHandlers(streamState: StreamState): void;
34
- protected createAsyncIterable(streamState: StreamState): AsyncIterable<StreamMessage>;
35
- sendApprovalResponse(response: ToolApprovalResponseMessage): void;
36
- protected getOutputChannel(): OutputChannel | undefined;
37
- }
38
- export {};
39
- //# sourceMappingURL=claude-code-frontend-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-frontend-service.d.ts","sourceRoot":"","sources":["../../src/browser/claude-code-frontend-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAgB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG1F,OAAO,EACH,aAAa,EACb,oBAAoB,EAEvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EACH,gBAAgB,EAEhB,iBAAiB,EACjB,iBAAiB,EAEjB,aAAa,EACb,2BAA2B,EAC9B,MAAM,+BAA+B,CAAC;AAGvC,qBACa,oBAAqB,YAAW,gBAAgB;IACzD,SAAS,CAAC,aAAa,uBAA4B,aAAa,KAAK,IAAI,EAAI;IAC7E,SAAS,CAAC,aAAa,sBAA2B,KAAK,KAAK,IAAI,EAAI;IAGpE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI;IAQxD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAO/C,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI;IAItF,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE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
3
- // Copyright (C) 2025 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ClaudeCodeFrontendService = exports.ClaudeCodeClientImpl = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const file_uri_1 = require("@theia/core/lib/common/file-uri");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const output_channel_1 = require("@theia/output/lib/browser/output-channel");
24
- const browser_1 = require("@theia/workspace/lib/browser");
25
- const claude_code_service_1 = require("../common/claude-code-service");
26
- const claude_code_preferences_1 = require("../common/claude-code-preferences");
27
- let ClaudeCodeClientImpl = class ClaudeCodeClientImpl {
28
- constructor() {
29
- this.tokenHandlers = new Map();
30
- this.errorHandlers = new Map();
31
- }
32
- // invoked by the backend
33
- sendToken(streamId, token) {
34
- const handler = this.tokenHandlers.get(streamId);
35
- if (handler) {
36
- handler(token);
37
- }
38
- }
39
- // invoked by the backend
40
- sendError(streamId, error) {
41
- const handler = this.errorHandlers.get(streamId);
42
- if (handler) {
43
- handler(error);
44
- }
45
- }
46
- registerTokenHandler(streamId, handler) {
47
- this.tokenHandlers.set(streamId, handler);
48
- }
49
- registerErrorHandler(streamId, handler) {
50
- this.errorHandlers.set(streamId, handler);
51
- }
52
- unregisterHandlers(streamId) {
53
- this.tokenHandlers.delete(streamId);
54
- this.errorHandlers.delete(streamId);
55
- }
56
- };
57
- exports.ClaudeCodeClientImpl = ClaudeCodeClientImpl;
58
- exports.ClaudeCodeClientImpl = ClaudeCodeClientImpl = tslib_1.__decorate([
59
- (0, inversify_1.injectable)()
60
- ], ClaudeCodeClientImpl);
61
- let ClaudeCodeFrontendService = class ClaudeCodeFrontendService {
62
- constructor() {
63
- this.streams = new Map();
64
- }
65
- async send(request, cancellationToken) {
66
- var _a;
67
- const streamState = {
68
- id: this.generateStreamId(),
69
- tokens: [],
70
- isComplete: false,
71
- hasError: false
72
- };
73
- this.streams.set(streamState.id, streamState);
74
- this.setupStreamHandlers(streamState);
75
- cancellationToken === null || cancellationToken === void 0 ? void 0 : cancellationToken.onCancellationRequested(() => this.claudeCodeBackendService.cancel(streamState.id));
76
- const roots = await this.workspaceService.roots;
77
- const rootsUris = roots.map(root => file_uri_1.FileUri.fsPath(root.resource.toString()));
78
- const prompt = request.prompt;
79
- const apiKey = this.preferenceService.get(claude_code_preferences_1.CLAUDE_CODE_API_KEY_PREF, undefined);
80
- const claudeCodePath = this.preferenceService.get(claude_code_preferences_1.CLAUDE_CODE_EXECUTABLE_PATH_PREF, undefined);
81
- (_a = this.getOutputChannel()) === null || _a === void 0 ? void 0 : _a.appendLine(JSON.stringify(request, undefined, 2));
82
- await this.claudeCodeBackendService.send({
83
- prompt,
84
- apiKey,
85
- claudeCodePath,
86
- options: {
87
- cwd: rootsUris[0],
88
- ...request.options
89
- }
90
- }, streamState.id);
91
- return this.createAsyncIterable(streamState);
92
- }
93
- generateStreamId() {
94
- return (0, core_1.generateUuid)();
95
- }
96
- setupStreamHandlers(streamState) {
97
- this.client.registerTokenHandler(streamState.id, (token) => {
98
- var _a;
99
- if (token === undefined) {
100
- streamState.isComplete = true;
101
- }
102
- else {
103
- (_a = this.getOutputChannel()) === null || _a === void 0 ? void 0 : _a.appendLine(JSON.stringify(token, undefined, 2));
104
- streamState.tokens.push(token);
105
- }
106
- // Resolve any pending iterator
107
- if (streamState.pendingResolve) {
108
- streamState.pendingResolve();
109
- streamState.pendingResolve = undefined;
110
- }
111
- });
112
- this.client.registerErrorHandler(streamState.id, (error) => {
113
- var _a;
114
- streamState.hasError = true;
115
- streamState.error = error;
116
- (_a = this.getOutputChannel()) === null || _a === void 0 ? void 0 : _a.appendLine(JSON.stringify(error, undefined, 2), output_channel_1.OutputChannelSeverity.Error);
117
- // Reject any pending iterator
118
- if (streamState.pendingReject) {
119
- streamState.pendingReject(error);
120
- streamState.pendingReject = undefined;
121
- }
122
- });
123
- }
124
- async *createAsyncIterable(streamState) {
125
- let currentIndex = 0;
126
- while (true) {
127
- // Check for available tokens
128
- if (currentIndex < streamState.tokens.length) {
129
- const token = streamState.tokens[currentIndex];
130
- currentIndex++;
131
- if (token !== undefined) {
132
- yield token;
133
- }
134
- continue;
135
- }
136
- if (streamState.isComplete) {
137
- break;
138
- }
139
- if (streamState.hasError && streamState.error) {
140
- throw streamState.error;
141
- }
142
- // Wait for next token
143
- await new Promise((resolve, reject) => {
144
- streamState.pendingResolve = resolve;
145
- streamState.pendingReject = reject;
146
- });
147
- }
148
- // Cleanup
149
- this.client.unregisterHandlers(streamState.id);
150
- this.streams.delete(streamState.id);
151
- }
152
- sendApprovalResponse(response) {
153
- var _a;
154
- (_a = this.getOutputChannel()) === null || _a === void 0 ? void 0 : _a.appendLine(JSON.stringify(response, undefined, 2));
155
- this.claudeCodeBackendService.handleApprovalResponse(response);
156
- }
157
- getOutputChannel() {
158
- return this.outputChannelManager.getChannel('Claude Code');
159
- }
160
- };
161
- exports.ClaudeCodeFrontendService = ClaudeCodeFrontendService;
162
- tslib_1.__decorate([
163
- (0, inversify_1.inject)(claude_code_service_1.ClaudeCodeService),
164
- tslib_1.__metadata("design:type", Object)
165
- ], ClaudeCodeFrontendService.prototype, "claudeCodeBackendService", void 0);
166
- tslib_1.__decorate([
167
- (0, inversify_1.inject)(new inversify_1.LazyServiceIdentifier(() => ClaudeCodeClientImpl)),
168
- tslib_1.__metadata("design:type", ClaudeCodeClientImpl)
169
- ], ClaudeCodeFrontendService.prototype, "client", void 0);
170
- tslib_1.__decorate([
171
- (0, inversify_1.inject)(browser_1.WorkspaceService),
172
- tslib_1.__metadata("design:type", browser_1.WorkspaceService)
173
- ], ClaudeCodeFrontendService.prototype, "workspaceService", void 0);
174
- tslib_1.__decorate([
175
- (0, inversify_1.inject)(core_1.PreferenceService),
176
- tslib_1.__metadata("design:type", Object)
177
- ], ClaudeCodeFrontendService.prototype, "preferenceService", void 0);
178
- tslib_1.__decorate([
179
- (0, inversify_1.inject)(output_channel_1.OutputChannelManager),
180
- tslib_1.__metadata("design:type", output_channel_1.OutputChannelManager)
181
- ], ClaudeCodeFrontendService.prototype, "outputChannelManager", void 0);
182
- tslib_1.__decorate([
183
- (0, inversify_1.inject)(core_1.ILogger),
184
- tslib_1.__metadata("design:type", Object)
185
- ], ClaudeCodeFrontendService.prototype, "logger", void 0);
186
- exports.ClaudeCodeFrontendService = ClaudeCodeFrontendService = tslib_1.__decorate([
187
- (0, inversify_1.injectable)()
188
- ], ClaudeCodeFrontendService);
189
- //# sourceMappingURL=claude-code-frontend-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-frontend-service.js","sourceRoot":"","sources":["../../src/browser/claude-code-frontend-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,sCAA0F;AAC1F,8DAA0D;AAC1D,4DAAyF;AACzF,6EAIkD;AAClD,0DAAgE;AAChE,uEAQuC;AACvC,+EAA+G;AAGxG,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAA1B;QACO,kBAAa,GAAG,IAAI,GAAG,EAA2C,CAAC;QACnE,kBAAa,GAAG,IAAI,GAAG,EAAkC,CAAC;IA8BxE,CAAC;IA5BG,yBA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AC;CAEJ,CAAA;AAlIY,8DAAyB;AAGxB;IADT,IAAA,kBAAM,EAAC,uCAAiB,CAAC;;2EAC4B;AAG5C;IADT,IAAA,kBAAM,EAAC,IAAI,iCAAqB,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC;sCAC5C,oBAAoB;yDAAC;AAGpB;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACY,0BAAgB;mEAAC;AAG5C;IADT,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;oEACqB;AAG5B;IADlB,IAAA,kBAAM,EAAC,qCAAoB,CAAC;sCACY,qCAAoB;uEAAC;AAGpD;IADT,IAAA,kBAAM,EAAC,cAAO,CAAC;;yDACU;oCAlBjB,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAkIrC"}
@@ -1,17 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
3
- import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
4
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
5
- import * as monaco from '@theia/monaco-editor-core';
6
- import { WorkspaceService } from '@theia/workspace/lib/browser';
7
- export declare class ClaudeCodeSlashCommandsContribution implements FrontendApplicationContribution {
8
- private readonly staticCommands;
9
- protected readonly contextKeyService: ContextKeyService;
10
- protected readonly workspaceService: WorkspaceService;
11
- protected readonly fileService: FileService;
12
- onStart(): void;
13
- protected provideSlashCompletions(model: monaco.editor.ITextModel, position: monaco.Position): Promise<monaco.languages.CompletionList>;
14
- protected getCompletionRange(model: monaco.editor.ITextModel, position: monaco.Position, triggerCharacter: string): monaco.Range | undefined;
15
- protected listFilesDirectly(uri: URI): Promise<string[]>;
16
- }
17
- //# sourceMappingURL=claude-code-slash-commands-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-slash-commands-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/claude-code-slash-commands-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAUhE,qBACa,mCAAoC,YAAW,+BAA+B;IAEvF,OAAO,CAAC,QAAQ,CAAC,cAAc,CA6B7B;IAGF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAE5C,OAAO,IAAI,IAAI;cAQC,uBAAuB,CACnC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,EAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;IAqD3C,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS;cAkB5H,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAgBjE"}
@@ -1,155 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ClaudeCodeSlashCommandsContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const chat_view_language_contribution_1 = require("@theia/ai-chat-ui/lib/browser/chat-view-language-contribution");
21
- const core_1 = require("@theia/core");
22
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
25
- const monaco = require("@theia/monaco-editor-core");
26
- const browser_1 = require("@theia/workspace/lib/browser");
27
- const claude_code_chat_agent_1 = require("./claude-code-chat-agent");
28
- const CLAUDE_COMMANDS = '.claude/commands';
29
- let ClaudeCodeSlashCommandsContribution = class ClaudeCodeSlashCommandsContribution {
30
- constructor() {
31
- this.staticCommands = [
32
- {
33
- name: 'clear',
34
- description: core_1.nls.localize('theia/ai/claude-code/clearCommand/description', 'Create a new session'),
35
- },
36
- {
37
- name: 'compact',
38
- description: core_1.nls.localize('theia/ai/claude-code/compactCommand/description', 'Compact conversation with optional focus instructions'),
39
- },
40
- {
41
- name: 'config',
42
- description: core_1.nls.localize('theia/ai/claude-code/configCommand/description', 'Open Claude Code Configuration'),
43
- },
44
- {
45
- name: 'init',
46
- description: core_1.nls.localize('theia/ai/claude-code/initCommand/description', 'Initialize project with CLAUDE.md guide'),
47
- },
48
- {
49
- name: 'memory',
50
- description: core_1.nls.localize('theia/ai/claude-code/memoryCommand/description', 'Edit CLAUDE.md memory file'),
51
- },
52
- {
53
- name: 'review',
54
- description: core_1.nls.localize('theia/ai/claude-code/reviewCommand/description', 'Request code review'),
55
- },
56
- {
57
- name: 'resume',
58
- description: core_1.nls.localize('theia/ai/claude-code/resumeCommand/description', 'Resume a session'),
59
- }
60
- ];
61
- }
62
- onStart() {
63
- monaco.languages.registerCompletionItemProvider(chat_view_language_contribution_1.CHAT_VIEW_LANGUAGE_ID, {
64
- triggerCharacters: ['/'],
65
- provideCompletionItems: (model, position, _context, _token) => this.provideSlashCompletions(model, position),
66
- });
67
- }
68
- async provideSlashCompletions(model, position) {
69
- const isClaudeCode = this.contextKeyService.match(`chatInputReceivingAgent == '${claude_code_chat_agent_1.CLAUDE_CHAT_AGENT_ID}'`);
70
- if (!isClaudeCode) {
71
- return { suggestions: [] };
72
- }
73
- const completionRange = this.getCompletionRange(model, position, '/');
74
- if (completionRange === undefined) {
75
- return { suggestions: [] };
76
- }
77
- try {
78
- const suggestions = [];
79
- // Add static commands
80
- this.staticCommands.forEach(command => {
81
- suggestions.push({
82
- insertText: `${command.name} `,
83
- kind: monaco.languages.CompletionItemKind.Function,
84
- label: command.name,
85
- range: completionRange,
86
- detail: command.description
87
- });
88
- });
89
- // Add dynamic commands from .claude/commands directory
90
- const roots = this.workspaceService.tryGetRoots();
91
- if (roots.length >= 1) {
92
- const uri = roots[0].resource;
93
- const claudeCommandsUri = uri.resolve(CLAUDE_COMMANDS);
94
- const files = await this.listFilesDirectly(claudeCommandsUri);
95
- const commands = files
96
- .filter(file => file.endsWith('.md'))
97
- .map(file => file.replace(/\.md$/, ''));
98
- commands.forEach(commandName => {
99
- suggestions.push({
100
- insertText: `${commandName} `,
101
- kind: monaco.languages.CompletionItemKind.Function,
102
- label: commandName,
103
- range: completionRange,
104
- detail: core_1.nls.localize('theia/ai/claude-code/commandDetail', 'Claude command: {0}', commandName)
105
- });
106
- });
107
- }
108
- return { suggestions };
109
- }
110
- catch (error) {
111
- console.error('Error in Claude completion provider:', error);
112
- return { suggestions: [] };
113
- }
114
- }
115
- getCompletionRange(model, position, triggerCharacter) {
116
- const wordInfo = model.getWordUntilPosition(position);
117
- const lineContent = model.getLineContent(position.lineNumber);
118
- // one to the left, and -1 for 0-based index
119
- const characterBeforeCurrentWord = lineContent[wordInfo.startColumn - 1 - 1];
120
- if (characterBeforeCurrentWord !== triggerCharacter) {
121
- return undefined;
122
- }
123
- return new monaco.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, position.column);
124
- }
125
- async listFilesDirectly(uri) {
126
- const result = [];
127
- if (!await this.fileService.exists(uri)) {
128
- return result;
129
- }
130
- const stat = await this.fileService.resolve(uri);
131
- if (stat && stat.isDirectory && stat.children) {
132
- for (const child of stat.children) {
133
- result.push(child.resource.path.base);
134
- }
135
- }
136
- return result;
137
- }
138
- };
139
- exports.ClaudeCodeSlashCommandsContribution = ClaudeCodeSlashCommandsContribution;
140
- tslib_1.__decorate([
141
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
142
- tslib_1.__metadata("design:type", Object)
143
- ], ClaudeCodeSlashCommandsContribution.prototype, "contextKeyService", void 0);
144
- tslib_1.__decorate([
145
- (0, inversify_1.inject)(browser_1.WorkspaceService),
146
- tslib_1.__metadata("design:type", browser_1.WorkspaceService)
147
- ], ClaudeCodeSlashCommandsContribution.prototype, "workspaceService", void 0);
148
- tslib_1.__decorate([
149
- (0, inversify_1.inject)(file_service_1.FileService),
150
- tslib_1.__metadata("design:type", file_service_1.FileService)
151
- ], ClaudeCodeSlashCommandsContribution.prototype, "fileService", void 0);
152
- exports.ClaudeCodeSlashCommandsContribution = ClaudeCodeSlashCommandsContribution = tslib_1.__decorate([
153
- (0, inversify_1.injectable)()
154
- ], ClaudeCodeSlashCommandsContribution);
155
- //# sourceMappingURL=claude-code-slash-commands-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-slash-commands-contribution.js","sourceRoot":"","sources":["../../src/browser/claude-code-slash-commands-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EA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';
3
- export declare class ClaudeCodeToolCallChatResponseContent extends ToolCallChatResponseContentImpl {
4
- static readonly type = "claude-code-tool-call";
5
- constructor(id?: string, name?: string, arg_string?: string, finished?: boolean, result?: ToolCallResult);
6
- static is(content: unknown): content is ClaudeCodeToolCallChatResponseContent;
7
- }
8
- //# sourceMappingURL=claude-code-tool-call-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-tool-call-content.d.ts","sourceRoot":"","sources":["../../src/browser/claude-code-tool-call-content.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,qBAAa,qCAAsC,SAAQ,+BAA+B;IACtF,MAAM,CAAC,QAAQ,CAAC,IAAI,2BAA2B;gBAEnC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,cAAc;IAIxG,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qCAAqC;CAGhF"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ClaudeCodeToolCallChatResponseContent = void 0;
19
- const common_1 = require("@theia/ai-chat/lib/common");
20
- class ClaudeCodeToolCallChatResponseContent extends common_1.ToolCallChatResponseContentImpl {
21
- constructor(id, name, arg_string, finished, result) {
22
- super(id, name, arg_string, finished, result);
23
- }
24
- static is(content) {
25
- return content instanceof ClaudeCodeToolCallChatResponseContent;
26
- }
27
- }
28
- exports.ClaudeCodeToolCallChatResponseContent = ClaudeCodeToolCallChatResponseContent;
29
- ClaudeCodeToolCallChatResponseContent.type = 'claude-code-tool-call';
30
- //# sourceMappingURL=claude-code-tool-call-content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-code-tool-call-content.js","sourceRoot":"","sources":["../../src/browser/claude-code-tool-call-content.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,sDAA4E;AAG5E,MAAa,qCAAsC,SAAQ,wCAA+B;IAGtF,YAAY,EAAW,EAAE,IAAa,EAAE,UAAmB,EAAE,QAAkB,EAAE,MAAuB;QACpG,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,EAAE,CAAC,OAAgB;QACtB,OAAO,OAAO,YAAY,qCAAqC,CAAC;IACpE,CAAC;;AATL,sFAUC;AATmB,0CAAI,GAAG,uBAAuB,CAAC"}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { ChatResponsePartRenderer } from '@theia/ai-chat-ui/lib/browser/chat-response-part-renderer';
3
- import { ResponseNode } from '@theia/ai-chat-ui/lib/browser/chat-tree-view';
4
- import { ChatResponseContent, ToolCallChatResponseContent } from '@theia/ai-chat/lib/common';
5
- import { ReactNode } from '@theia/core/shared/react';
6
- export declare class BashToolRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
7
- canHandle(response: ChatResponseContent): number;
8
- render(response: ToolCallChatResponseContent, parentNode: ResponseNode): ReactNode;
9
- }
10
- //# sourceMappingURL=bash-tool-renderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bash-tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/bash-tool-renderer.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAI7F,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAWrD,qBACa,gBAAiB,YAAW,wBAAwB,CAAC,2BAA2B,CAAC;IAE1F,SAAS,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAOhD,MAAM,CAAC,QAAQ,EAAE,2BAA2B,EAAE,UAAU,EAAE,YAAY,GAAG,SAAS;CASrF"}