@theia/ai-claude-code 1.75.0-next.8 → 1.76.0-next.0
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/lib/browser/claude-code-chat-agent.js +1 -1
- package/lib/browser/claude-code-chat-agent.js.map +1 -1
- package/lib/browser/claude-code-edit-tool-service.js +1 -1
- package/lib/browser/claude-code-edit-tool-service.js.map +1 -1
- package/lib/browser/claude-code-file-edit-backup-service.js +1 -1
- package/lib/browser/claude-code-file-edit-backup-service.js.map +1 -1
- package/lib/browser/claude-code-frontend-service.d.ts +1 -1
- package/lib/browser/claude-code-frontend-service.d.ts.map +1 -1
- package/lib/browser/claude-code-frontend-service.js +1 -0
- package/lib/browser/claude-code-frontend-service.js.map +1 -1
- package/lib/browser/claude-code-slash-commands-contribution.js +1 -1
- package/lib/browser/claude-code-slash-commands-contribution.js.map +1 -1
- package/lib/browser/renderers/bash-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/bash-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/bash-tool-renderer.js +12 -36
- package/lib/browser/renderers/bash-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/collapsible-tool-renderer.js +7 -10
- package/lib/browser/renderers/collapsible-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/edit-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/edit-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/edit-tool-renderer.js +18 -52
- package/lib/browser/renderers/edit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/glob-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/glob-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/glob-tool-renderer.js +14 -40
- package/lib/browser/renderers/glob-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/grep-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/grep-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/grep-tool-renderer.js +14 -56
- package/lib/browser/renderers/grep-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/ls-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/ls-tool-renderer.js +12 -45
- package/lib/browser/renderers/ls-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/multiedit-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/multiedit-tool-renderer.js +14 -58
- package/lib/browser/renderers/multiedit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/read-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/read-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/read-tool-renderer.js +16 -45
- package/lib/browser/renderers/read-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/todo-write-renderer.d.ts +2 -0
- package/lib/browser/renderers/todo-write-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/todo-write-renderer.js +19 -44
- package/lib/browser/renderers/todo-write-renderer.js.map +1 -1
- package/lib/browser/renderers/web-fetch-tool-renderer.d.ts +2 -0
- package/lib/browser/renderers/web-fetch-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/web-fetch-tool-renderer.js +12 -38
- package/lib/browser/renderers/web-fetch-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/write-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/write-tool-renderer.js +10 -40
- package/lib/browser/renderers/write-tool-renderer.js.map +1 -1
- package/lib/common/claude-code-preferences.d.ts.map +1 -1
- package/lib/common/claude-code-preferences.js +1 -0
- package/lib/common/claude-code-preferences.js.map +1 -1
- package/lib/node/claude-code-service-impl.d.ts +2 -1
- package/lib/node/claude-code-service-impl.d.ts.map +1 -1
- package/lib/node/claude-code-service-impl.js +1 -1
- package/lib/node/claude-code-service-impl.js.map +1 -1
- package/package.json +11 -11
- package/src/browser/claude-code-chat-agent.ts +1 -1
- package/src/browser/claude-code-edit-tool-service.ts +1 -1
- package/src/browser/claude-code-file-edit-backup-service.ts +1 -1
- package/src/browser/claude-code-frontend-service.ts +3 -3
- package/src/browser/claude-code-slash-commands-contribution.ts +1 -1
- package/src/browser/renderers/bash-tool-renderer.tsx +6 -3
- package/src/browser/renderers/edit-tool-renderer.tsx +10 -5
- package/src/browser/renderers/glob-tool-renderer.tsx +6 -3
- package/src/browser/renderers/grep-tool-renderer.tsx +6 -3
- package/src/browser/renderers/ls-tool-renderer.tsx +4 -2
- package/src/browser/renderers/multiedit-tool-renderer.tsx +5 -3
- package/src/browser/renderers/read-tool-renderer.tsx +10 -5
- package/src/browser/renderers/todo-write-renderer.tsx +6 -3
- package/src/browser/renderers/web-fetch-tool-renderer.tsx +6 -3
- package/src/browser/renderers/write-tool-renderer.tsx +4 -2
- package/src/common/claude-code-preferences.ts +2 -1
- package/src/node/claude-code-service-impl.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiedit-tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/multiedit-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;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EAAO,OAAO,EAAE,MAAM,aAAa,CAAC;AAa3C,qBACa,qBAAsB,YAAW,wBAAwB,CAAC,2BAA2B,CAAC;IAG/F,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAGhD,SAAS,CAAC,Q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";
|
|
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.MultiEditToolRenderer = void 0;
|
|
19
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
20
6
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
7
|
const uri_1 = require("@theia/core/lib/common/uri");
|
|
22
8
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
@@ -36,11 +22,11 @@ let MultiEditToolRenderer = class MultiEditToolRenderer {
|
|
|
36
22
|
render(response, parentNode) {
|
|
37
23
|
try {
|
|
38
24
|
const input = JSON.parse(response.arguments || '{}');
|
|
39
|
-
return
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(MultiEditToolComponent, { input: input, workspaceService: this.workspaceService, labelProvider: this.labelProvider, editorManager: this.editorManager, logger: this.logger });
|
|
40
26
|
}
|
|
41
27
|
catch (error) {
|
|
42
28
|
this.logger.warn('Failed to parse MultiEdit tool input:', error);
|
|
43
|
-
return
|
|
29
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseMultiEditToolData', 'Failed to parse MultiEdit tool data') });
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
};
|
|
@@ -65,7 +51,7 @@ tslib_1.__decorate([
|
|
|
65
51
|
exports.MultiEditToolRenderer = MultiEditToolRenderer = tslib_1.__decorate([
|
|
66
52
|
(0, inversify_1.injectable)()
|
|
67
53
|
], MultiEditToolRenderer);
|
|
68
|
-
const MultiEditToolComponent = ({ input, workspaceService, labelProvider, editorManager }) => {
|
|
54
|
+
const MultiEditToolComponent = ({ input, workspaceService, labelProvider, editorManager, logger }) => {
|
|
69
55
|
const getFileName = (filePath) => filePath.split('/').pop() || filePath;
|
|
70
56
|
const getWorkspaceRelativePath = async (filePath) => {
|
|
71
57
|
try {
|
|
@@ -92,7 +78,7 @@ const MultiEditToolComponent = ({ input, workspaceService, labelProvider, editor
|
|
|
92
78
|
await editorManager.open(uri);
|
|
93
79
|
}
|
|
94
80
|
catch (error) {
|
|
95
|
-
|
|
81
|
+
logger.error('Failed to open file:', error);
|
|
96
82
|
}
|
|
97
83
|
};
|
|
98
84
|
const [relativePath, setRelativePath] = React.useState('');
|
|
@@ -110,44 +96,14 @@ const MultiEditToolComponent = ({ input, workspaceService, labelProvider, editor
|
|
|
110
96
|
};
|
|
111
97
|
const replaceAllCount = input.edits.filter(edit => edit.replace_all).length;
|
|
112
98
|
const totalEdits = input.edits.length;
|
|
113
|
-
const compactHeader = (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
getChangeInfo().totalOldLines),
|
|
123
|
-
React.createElement("span", { className: "claude-code-tool badge added" },
|
|
124
|
-
"+",
|
|
125
|
-
getChangeInfo().totalNewLines),
|
|
126
|
-
React.createElement("span", { className: "claude-code-tool badge" }, totalEdits === 1
|
|
127
|
-
? core_1.nls.localize('theia/ai/claude-code/oneEdit', '1 edit')
|
|
128
|
-
: core_1.nls.localize('theia/ai/claude-code/editsCount', '{0} edits', totalEdits)),
|
|
129
|
-
replaceAllCount > 0 && (React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/replaceAllCount', '{0} replace-all', replaceAllCount))))));
|
|
130
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
131
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
132
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/filePath', 'File Path')),
|
|
133
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.file_path)),
|
|
134
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
135
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/totalEdits', 'Total Edits')),
|
|
136
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, totalEdits)),
|
|
137
|
-
input.edits.map((edit, index) => (React.createElement("div", { key: index, className: "claude-code-tool edit-preview" },
|
|
138
|
-
React.createElement("div", { className: "claude-code-tool edit-preview-header" },
|
|
139
|
-
React.createElement("span", { className: "claude-code-tool edit-preview-title" }, core_1.nls.localize('theia/ai/claude-code/edit', 'Edit {0}', index + 1)),
|
|
140
|
-
edit.replace_all && (React.createElement("span", { className: "claude-code-tool edit-preview-badge" }, core_1.nls.localizeByDefault('Replace All')))),
|
|
141
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
142
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/from', 'From')),
|
|
143
|
-
React.createElement("pre", { className: "claude-code-tool detail-value code-preview" }, edit.old_string.length > 100
|
|
144
|
-
? edit.old_string.substring(0, 100) + '...'
|
|
145
|
-
: edit.old_string)),
|
|
146
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
147
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/to', 'To')),
|
|
148
|
-
React.createElement("pre", { className: "claude-code-tool detail-value code-preview" }, edit.new_string.length > 100
|
|
149
|
-
? edit.new_string.substring(0, 100) + '...'
|
|
150
|
-
: edit.new_string)))))));
|
|
151
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
99
|
+
const compactHeader = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-left", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool title", children: core_1.nls.localize('theia/ai/claude-code/multiEditing', 'Multi-editing') }), (0, jsx_runtime_1.jsx)("span", { className: `${getIcon(input.file_path)} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool file-name clickable-element", onClick: handleOpenFile, title: core_1.nls.localize('theia/ai/claude-code/openFileTooltip', 'Click to open file in editor'), children: getFileName(input.file_path) }), relativePath && (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool relative-path", title: relativePath, children: relativePath })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-right", children: [(0, jsx_runtime_1.jsxs)("span", { className: "claude-code-tool badge deleted", children: ["-", getChangeInfo().totalOldLines] }), (0, jsx_runtime_1.jsxs)("span", { className: "claude-code-tool badge added", children: ["+", getChangeInfo().totalNewLines] }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: totalEdits === 1
|
|
100
|
+
? core_1.nls.localize('theia/ai/claude-code/oneEdit', '1 edit')
|
|
101
|
+
: core_1.nls.localize('theia/ai/claude-code/editsCount', '{0} edits', totalEdits) }), replaceAllCount > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/replaceAllCount', '{0} replace-all', replaceAllCount) }))] })] }));
|
|
102
|
+
const expandedContent = ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/filePath', 'File Path') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.file_path })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/totalEdits', 'Total Edits') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: totalEdits })] }), input.edits.map((edit, index) => ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool edit-preview", children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool edit-preview-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool edit-preview-title", children: core_1.nls.localizeByDefault('Edit {0}', index + 1) }), edit.replace_all && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool edit-preview-badge", children: core_1.nls.localizeByDefault('Replace All') }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/from', 'From') }), (0, jsx_runtime_1.jsx)("pre", { className: "claude-code-tool detail-value code-preview", children: edit.old_string.length > 100
|
|
103
|
+
? edit.old_string.substring(0, 100) + '...'
|
|
104
|
+
: edit.old_string })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/to', 'To') }), (0, jsx_runtime_1.jsx)("pre", { className: "claude-code-tool detail-value code-preview", children: edit.new_string.length > 100
|
|
105
|
+
? edit.new_string.substring(0, 100) + '...'
|
|
106
|
+
: edit.new_string })] })] }, index)))] }));
|
|
107
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
152
108
|
};
|
|
153
109
|
//# sourceMappingURL=multiedit-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiedit-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/multiedit-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multiedit-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/multiedit-tool-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAwD;AACxD,oDAAiD;AACjD,4DAAyE;AACzE,kDAAkD;AAElD,uDAA0D;AAC1D,0DAAgE;AAChE,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AAcpC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAc9B,SAAS,CAAC,QAA6B;QACnC,IAAI,qEAAqC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACtF,OAAO,EAAE,CAAC,CAAC,gDAAgD;QAC/D,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IAED,MAAM,CAAC,QAAqC,EAAE,UAAwB;QAClE,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,IAAI,IAAI,CAAuB,CAAC;YAC3E,OAAO,uBAAC,sBAAsB,IAC1B,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,MAAM,EAAE,IAAI,CAAC,MAAM,GACrB,CAAC;QACP,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,C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C,iCAAM,SAAS,EAAC,+BAA+B,YAAE,UAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,IAAI,CAAC,GAAQ,EACtG,gCAAK,SAAS,EAAC,4CAA4C,YACtD,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,GAAG;oCACzB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK;oCAC3C,CAAC,CAAC,IAAI,CAAC,UAAU,GACnB,IACJ,KAxBA,KAAK,CAyBT,CACT,CAAC,IACA,CACT,CAAC;IAEF,OAAO,CACH,uBAAC,mDAAuB,IACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -5,10 +5,12 @@ import { LabelProvider } from '@theia/core/lib/browser';
|
|
|
5
5
|
import { ReactNode } from '@theia/core/shared/react';
|
|
6
6
|
import { EditorManager } from '@theia/editor/lib/browser';
|
|
7
7
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
8
|
+
import { ILogger } from '@theia/core';
|
|
8
9
|
export declare class ReadToolRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
|
|
9
10
|
protected readonly workspaceService: WorkspaceService;
|
|
10
11
|
protected readonly labelProvider: LabelProvider;
|
|
11
12
|
protected readonly editorManager: EditorManager;
|
|
13
|
+
protected readonly logger: ILogger;
|
|
12
14
|
canHandle(response: ChatResponseContent): number;
|
|
13
15
|
render(response: ToolCallChatResponseContent, parentNode: ResponseNode): ReactNode;
|
|
14
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/read-tool-renderer.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OA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@@ -1,22 +1,8 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.ReadToolRenderer = void 0;
|
|
19
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
20
6
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
7
|
const uri_1 = require("@theia/core/lib/common/uri");
|
|
22
8
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
@@ -36,11 +22,11 @@ let ReadToolRenderer = class ReadToolRenderer {
|
|
|
36
22
|
render(response, parentNode) {
|
|
37
23
|
try {
|
|
38
24
|
const input = JSON.parse(response.arguments || '{}');
|
|
39
|
-
return
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(ReadToolComponent, { input: input, workspaceService: this.workspaceService, labelProvider: this.labelProvider, editorManager: this.editorManager, logger: this.logger });
|
|
40
26
|
}
|
|
41
27
|
catch (error) {
|
|
42
|
-
|
|
43
|
-
return
|
|
28
|
+
this.logger.warn('Failed to parse Read tool input:', error);
|
|
29
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseReadToolData', 'Failed to parse Read tool data') });
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
};
|
|
@@ -57,10 +43,15 @@ tslib_1.__decorate([
|
|
|
57
43
|
(0, inversify_1.inject)(browser_2.EditorManager),
|
|
58
44
|
tslib_1.__metadata("design:type", browser_2.EditorManager)
|
|
59
45
|
], ReadToolRenderer.prototype, "editorManager", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
48
|
+
(0, inversify_1.named)('ai-claude-code:ReadToolRenderer'),
|
|
49
|
+
tslib_1.__metadata("design:type", Object)
|
|
50
|
+
], ReadToolRenderer.prototype, "logger", void 0);
|
|
60
51
|
exports.ReadToolRenderer = ReadToolRenderer = tslib_1.__decorate([
|
|
61
52
|
(0, inversify_1.injectable)()
|
|
62
53
|
], ReadToolRenderer);
|
|
63
|
-
const ReadToolComponent = ({ input, workspaceService, labelProvider, editorManager }) => {
|
|
54
|
+
const ReadToolComponent = ({ input, workspaceService, labelProvider, editorManager, logger }) => {
|
|
64
55
|
const getFileName = (filePath) => filePath.split('/').pop() || filePath;
|
|
65
56
|
const getWorkspaceRelativePath = async (filePath) => {
|
|
66
57
|
try {
|
|
@@ -87,7 +78,7 @@ const ReadToolComponent = ({ input, workspaceService, labelProvider, editorManag
|
|
|
87
78
|
await editorManager.open(uri);
|
|
88
79
|
}
|
|
89
80
|
catch (error) {
|
|
90
|
-
|
|
81
|
+
logger.error('Failed to open file:', error);
|
|
91
82
|
}
|
|
92
83
|
};
|
|
93
84
|
const [relativePath, setRelativePath] = React.useState('');
|
|
@@ -95,30 +86,10 @@ const ReadToolComponent = ({ input, workspaceService, labelProvider, editorManag
|
|
|
95
86
|
getWorkspaceRelativePath(input.file_path).then(setRelativePath);
|
|
96
87
|
}, [input.file_path]);
|
|
97
88
|
const isEntireFile = !input.limit && !input.offset;
|
|
98
|
-
const compactHeader = (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
relativePath && React.createElement("span", { className: "claude-code-tool relative-path" }, relativePath)),
|
|
104
|
-
React.createElement("div", { className: "claude-code-tool header-right" },
|
|
105
|
-
isEntireFile && (React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/entireFile', 'Entire File'))),
|
|
106
|
-
!isEntireFile && (React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/partial', 'Partial'))))));
|
|
107
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
108
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
109
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/filePath', 'File Path')),
|
|
110
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.file_path)),
|
|
111
|
-
input.offset && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
112
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/startingLine', 'Starting Line')),
|
|
113
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.offset))),
|
|
114
|
-
input.limit && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
115
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/lineLimit', 'Line Limit')),
|
|
116
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.limit))),
|
|
117
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
118
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/readMode', 'Read Mode')),
|
|
119
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, isEntireFile
|
|
120
|
-
? core_1.nls.localize('theia/ai/claude-code/entireFile', 'Entire File')
|
|
121
|
-
: core_1.nls.localize('theia/ai/claude-code/partial', 'Partial')))));
|
|
122
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
89
|
+
const compactHeader = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-left", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool title", children: core_1.nls.localize('theia/ai/claude-code/reading', 'Reading') }), (0, jsx_runtime_1.jsx)("span", { className: `${getIcon(input.file_path)} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool file-name clickable-element", onClick: handleOpenFile, title: core_1.nls.localize('theia/ai/claude-code/openFileTooltip', 'Click to open file in editor'), children: getFileName(input.file_path) }), relativePath && (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool relative-path", children: relativePath })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-right", children: [isEntireFile && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/entireFile', 'Entire File') })), !isEntireFile && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/partial', 'Partial') }))] })] }));
|
|
90
|
+
const expandedContent = ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/filePath', 'File Path') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.file_path })] }), input.offset && ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/startingLine', 'Starting Line') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.offset })] })), input.limit && ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/lineLimit', 'Line Limit') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.limit })] })), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localize('theia/ai/claude-code/readMode', 'Read Mode') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: isEntireFile
|
|
91
|
+
? core_1.nls.localize('theia/ai/claude-code/entireFile', 'Entire File')
|
|
92
|
+
: core_1.nls.localize('theia/ai/claude-code/partial', 'Partial') })] })] }));
|
|
93
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
123
94
|
};
|
|
124
95
|
//# sourceMappingURL=read-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/read-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/read-tool-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAwD;AACxD,oDAAiD;AACjD,4DAAyE;AACzE,kDAAkD;AAElD,uDAA0D;AAC1D,0DAAgE;AAChE,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AASpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAczB,SAAS,CAAC,QAA6B;QACnC,IAAI,qEAAqC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACjF,OAAO,EAAE,CAAC,CAAC,gDAAgD;QAC/D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S,EAAC,6BAA6B,aACxC,iCAAM,SAAS,EAAC,+BAA+B,YAAE,UAAG,CAAC,QAAQ,CAAC,mCAAmC,EAAE,eAAe,CAAC,GAAQ,EAC3H,iCAAM,SAAS,EAAC,+BAA+B,YAAE,KAAK,CAAC,MAAM,GAAQ,IACnE,CACT,EACA,KAAK,CAAC,KAAK,IAAI,CACZ,iCAAK,SAAS,EAAC,6BAA6B,aACxC,iCAAM,SAAS,EAAC,+BAA+B,YAAE,UAAG,CAAC,QAAQ,CAAC,gCAAgC,EAAE,YAAY,CAAC,GAAQ,EACrH,iCAAM,SAAS,EAAC,+BAA+B,YAAE,KAAK,CAAC,KAAK,GAAQ,IAClE,CACT,EACD,iCAAK,SAAS,EAAC,6BAA6B,aACxC,iCAAM,SAAS,EAAC,+BAA+B,YAAE,UAAG,CAAC,QAAQ,CAAC,+BAA+B,EAAE,WAAW,CAAC,GAAQ,EACnH,iCAAM,SAAS,EAAC,+BAA+B,YAAE,YAAY;4BACzD,CAAC,CAAC,UAAG,CAAC,QAAQ,CAAC,iCAAiC,EAAE,aAAa,CAAC;4BAChE,CAAC,CAAC,UAAG,CAAC,QAAQ,CAAC,8BAA8B,EAAE,SAAS,CAAC,GAAQ,IACnE,IACJ,CACT,CAAC;IAEF,OAAO,CACH,uBAAC,mDAAuB,IACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,7 +2,9 @@ import { ChatResponsePartRenderer } from '@theia/ai-chat-ui/lib/browser/chat-res
|
|
|
2
2
|
import { ResponseNode } from '@theia/ai-chat-ui/lib/browser/chat-tree-view';
|
|
3
3
|
import { ChatResponseContent, ToolCallChatResponseContent } from '@theia/ai-chat/lib/common';
|
|
4
4
|
import { ReactNode } from '@theia/core/shared/react';
|
|
5
|
+
import { ILogger } from '@theia/core';
|
|
5
6
|
export declare class TodoWriteRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
|
|
7
|
+
protected readonly logger: ILogger;
|
|
6
8
|
canHandle(response: ChatResponseContent): number;
|
|
7
9
|
render(response: ToolCallChatResponseContent, parentNode: ResponseNode): ReactNode;
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo-write-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/todo-write-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;
|
|
1
|
+
{"version":3,"file":"todo-write-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/todo-write-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;AAGrD,OAAO,EAAO,OAAO,EAAE,MAAM,aAAa,CAAC;AAmD3C,qBACa,iBAAkB,YAAW,wBAAwB,CAAC,2BAA2B,CAAC;IAG3F,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,SAAS,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAOhD,MAAM,CAAC,QAAQ,EAAE,2BAA2B,EAAE,UAAU,EAAE,YAAY,GAAG,SAAS;CASrF"}
|
|
@@ -1,22 +1,8 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.TodoWriteRenderer = void 0;
|
|
19
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
20
6
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
7
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
8
|
const React = require("@theia/core/shared/react");
|
|
@@ -66,15 +52,20 @@ let TodoWriteRenderer = class TodoWriteRenderer {
|
|
|
66
52
|
render(response, parentNode) {
|
|
67
53
|
try {
|
|
68
54
|
const input = JSON.parse(response.arguments || '{}');
|
|
69
|
-
return
|
|
55
|
+
return (0, jsx_runtime_1.jsx)(TodoListComponent, { todos: input.todos || [], sessionId: parentNode.sessionId });
|
|
70
56
|
}
|
|
71
57
|
catch (error) {
|
|
72
|
-
|
|
73
|
-
return
|
|
58
|
+
this.logger.warn('Failed to parse TodoWrite input:', error);
|
|
59
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool todo-list-error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseTodoListData', 'Failed to parse todo list data') });
|
|
74
60
|
}
|
|
75
61
|
}
|
|
76
62
|
};
|
|
77
63
|
exports.TodoWriteRenderer = TodoWriteRenderer;
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
66
|
+
(0, inversify_1.named)('ai-claude-code:TodoWriteRenderer'),
|
|
67
|
+
tslib_1.__metadata("design:type", Object)
|
|
68
|
+
], TodoWriteRenderer.prototype, "logger", void 0);
|
|
78
69
|
exports.TodoWriteRenderer = TodoWriteRenderer = tslib_1.__decorate([
|
|
79
70
|
(0, inversify_1.injectable)()
|
|
80
71
|
], TodoWriteRenderer);
|
|
@@ -94,40 +85,24 @@ const TodoListComponent = ({ todos, sessionId }) => {
|
|
|
94
85
|
const getStatusIcon = (status) => {
|
|
95
86
|
switch (status) {
|
|
96
87
|
case 'completed':
|
|
97
|
-
return
|
|
88
|
+
return (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('check')} claude-code-tool todo-status-icon completed` });
|
|
98
89
|
case 'in_progress':
|
|
99
|
-
return
|
|
90
|
+
return (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('loading')} claude-code-tool todo-status-icon in-progress theia-animation-spin` });
|
|
100
91
|
case 'pending':
|
|
101
92
|
default:
|
|
102
|
-
return
|
|
93
|
+
return (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('circle-outline')} claude-code-tool todo-status-icon pending` });
|
|
103
94
|
}
|
|
104
95
|
};
|
|
105
|
-
const getPriorityBadge = (priority) => (
|
|
96
|
+
const getPriorityBadge = (priority) => ((0, jsx_runtime_1.jsx)("span", { className: `claude-code-tool todo-priority priority-${priority}`, children: TODO_PRIORITIES[priority] }));
|
|
106
97
|
if (!todos || todos.length === 0) {
|
|
107
|
-
return (
|
|
108
|
-
React.createElement("div", { className: "claude-code-tool todo-list-header" },
|
|
109
|
-
React.createElement("span", { className: `${(0, browser_1.codicon)('checklist')} claude-code-tool todo-list-icon` }),
|
|
110
|
-
React.createElement("span", { className: "claude-code-tool todo-list-title" }, core_1.nls.localize('theia/ai/claude-code/todoList', 'Todo List'))),
|
|
111
|
-
React.createElement("div", { className: "claude-code-tool todo-list-empty" }, core_1.nls.localize('theia/ai/claude-code/emptyTodoList', 'No todos available'))));
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool todo-list-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool todo-list-header", children: [(0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('checklist')} claude-code-tool todo-list-icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool todo-list-title", children: core_1.nls.localize('theia/ai/claude-code/todoList', 'Todo List') })] }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool todo-list-empty", children: core_1.nls.localize('theia/ai/claude-code/emptyTodoList', 'No todos available') })] }));
|
|
112
99
|
}
|
|
113
100
|
const completedCount = todos.filter(todo => todo.status === 'completed').length;
|
|
114
101
|
const totalCount = todos.length;
|
|
115
|
-
const compactHeader = (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
React.createElement("div", { className: "claude-code-tool header-right" },
|
|
121
|
-
React.createElement("span", { className: "claude-code-tool badge" }, totalCount === 1
|
|
122
|
-
? core_1.nls.localize('theia/ai/claude-code/oneItem', '1 item')
|
|
123
|
-
: core_1.nls.localize('theia/ai/claude-code/itemCount', '{0} items', totalCount)))));
|
|
124
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
125
|
-
React.createElement("div", { className: "claude-code-tool todo-list-items" }, todos.map(todo => (React.createElement("div", { key: todo.id || todo.content, className: `claude-code-tool todo-item status-${todo.status}` },
|
|
126
|
-
React.createElement("div", { className: "claude-code-tool todo-item-main" },
|
|
127
|
-
React.createElement("div", { className: "claude-code-tool todo-item-status" }, getStatusIcon(todo.status)),
|
|
128
|
-
React.createElement("div", { className: "claude-code-tool todo-item-content" },
|
|
129
|
-
React.createElement("span", { className: "claude-code-tool todo-item-text" }, todo.content),
|
|
130
|
-
getPriorityBadge(todo.priority)))))))));
|
|
131
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent, defaultExpanded: true }));
|
|
102
|
+
const compactHeader = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-left", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool title", children: core_1.nls.localize('theia/ai/claude-code/todoList', 'Todo List') }), (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('checklist')} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool progress-text", children: core_1.nls.localize('theia/ai/claude-code/completedCount', '{0}/{1} completed', completedCount, totalCount) })] }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool header-right", children: (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: totalCount === 1
|
|
103
|
+
? core_1.nls.localize('theia/ai/claude-code/oneItem', '1 item')
|
|
104
|
+
: core_1.nls.localize('theia/ai/claude-code/itemCount', '{0} items', totalCount) }) })] }));
|
|
105
|
+
const expandedContent = ((0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool details", children: (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool todo-list-items", children: todos.map(todo => ((0, jsx_runtime_1.jsx)("div", { className: `claude-code-tool todo-item status-${todo.status}`, children: (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool todo-item-main", children: [(0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool todo-item-status", children: getStatusIcon(todo.status) }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool todo-item-content", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool todo-item-text", children: todo.content }), getPriorityBadge(todo.priority)] })] }) }, todo.id || todo.content))) }) }));
|
|
106
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent, defaultExpanded: true }));
|
|
132
107
|
};
|
|
133
108
|
//# sourceMappingURL=todo-write-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo-write-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/todo-write-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"todo-write-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/todo-write-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAkD;AAClD,4DAAyE;AACzE,kDAAkD;AAElD,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AAS3C,MAAM,eAAe,GAAG;IACpB,MAAM,EAAE,UAAG,CAAC,QAAQ,CAAC,wCAAwC,EAAE,MAAM,CAAC;IACtE,QAAQ,EAAE,UAAG,CAAC,QAAQ,CAAC,0CAA0C,EAAE,QAAQ,CAAC;IAC5E,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,uCAAuC,EAAE,KAAK,CAAC;CACtE,CAAC;AAMF,4EAA4E;AAC5E,MAAM,iBAAiB;aACJ,qBAAgB,GAAiC,IAAI,GAAG,EAAE,CAAC;IAE1E,MAAM,CAAC,QAAQ,CAAC,SAAiB,EAAE,MAAkB;QACjD,+CAA+C;QAC/C,IAAI,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACtD,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;YACvB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACrD,CAAC;QAED,8CAA8C;QAC9C,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/B,6BAA6B;QAC7B,UAAU,CAAC,KAAK,EAAE,CAAC;QACnB,uBAAuB;QACvB,UAAU,CAAC,GAAG,CAAC,M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CAAC,8BAA8B,EAAE,QAAQ,CAAC;wBACxD,CAAC,CAAC,UAAG,CAAC,QAAQ,CAAC,gCAAgC,EAAE,WAAW,EAAE,UAAU,CAAC,GAAQ,GACnF,IACP,CACN,CAAC;IAEF,MAAM,eAAe,GAAG,CACpB,gCAAK,SAAS,EAAC,0BAA0B,YACrC,gCAAK,SAAS,EAAC,kCAAkC,YAC5C,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACf,gCAAmC,SAAS,EAAE,qCAAqC,IAAI,CAAC,MAAM,EAAE,YAC5F,iCAAK,SAAS,EAAC,iCAAiC,aAC5C,gCAAK,SAAS,EAAC,mCAAmC,YAC7C,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,GACzB,EACN,iCAAK,SAAS,EAAC,oCAAoC,aAC/C,iCAAM,SAAS,EAAC,iCAAiC,YAAE,IAAI,CAAC,OAAO,GAAQ,EACtE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAC9B,IACJ,IATA,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,OAAO,CAU3B,CACT,CAAC,GACA,GACJ,CACT,CAAC;IAEF,OAAO,CACH,uBAAC,mDAAuB,IACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,IAAI,GACvB,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,7 +2,9 @@ import { ChatResponsePartRenderer } from '@theia/ai-chat-ui/lib/browser/chat-res
|
|
|
2
2
|
import { ResponseNode } from '@theia/ai-chat-ui/lib/browser/chat-tree-view';
|
|
3
3
|
import { ChatResponseContent, ToolCallChatResponseContent } from '@theia/ai-chat/lib/common';
|
|
4
4
|
import { ReactNode } from '@theia/core/shared/react';
|
|
5
|
+
import { ILogger } from '@theia/core';
|
|
5
6
|
export declare class WebFetchToolRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
|
|
7
|
+
protected readonly logger: ILogger;
|
|
6
8
|
canHandle(response: ChatResponseContent): number;
|
|
7
9
|
render(response: ToolCallChatResponseContent, parentNode: ResponseNode): ReactNode;
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-fetch-tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/web-fetch-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;
|
|
1
|
+
{"version":3,"file":"web-fetch-tool-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/renderers/web-fetch-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;AAGrD,OAAO,EAAO,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,qBACa,oBAAqB,YAAW,wBAAwB,CAAC,2BAA2B,CAAC;IAG9F,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,SAAS,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAOhD,MAAM,CAAC,QAAQ,EAAE,2BAA2B,EAAE,UAAU,EAAE,YAAY,GAAG,SAAS;CASrF"}
|
|
@@ -1,25 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.WebFetchToolRenderer = void 0;
|
|
19
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
20
6
|
const browser_1 = require("@theia/core/lib/browser");
|
|
21
7
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const React = require("@theia/core/shared/react");
|
|
23
8
|
const claude_code_tool_call_content_1 = require("../claude-code-tool-call-content");
|
|
24
9
|
const collapsible_tool_renderer_1 = require("./collapsible-tool-renderer");
|
|
25
10
|
const core_1 = require("@theia/core");
|
|
@@ -33,15 +18,20 @@ let WebFetchToolRenderer = class WebFetchToolRenderer {
|
|
|
33
18
|
render(response, parentNode) {
|
|
34
19
|
try {
|
|
35
20
|
const input = JSON.parse(response.arguments || '{}');
|
|
36
|
-
return
|
|
21
|
+
return (0, jsx_runtime_1.jsx)(WebFetchToolComponent, { input: input });
|
|
37
22
|
}
|
|
38
23
|
catch (error) {
|
|
39
|
-
|
|
40
|
-
return
|
|
24
|
+
this.logger.warn('Failed to parse WebFetch tool input:', error);
|
|
25
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseWebFetchToolData', 'Failed to parse WebFetch tool data') });
|
|
41
26
|
}
|
|
42
27
|
}
|
|
43
28
|
};
|
|
44
29
|
exports.WebFetchToolRenderer = WebFetchToolRenderer;
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
32
|
+
(0, inversify_1.named)('ai-claude-code:WebFetchToolRenderer'),
|
|
33
|
+
tslib_1.__metadata("design:type", Object)
|
|
34
|
+
], WebFetchToolRenderer.prototype, "logger", void 0);
|
|
45
35
|
exports.WebFetchToolRenderer = WebFetchToolRenderer = tslib_1.__decorate([
|
|
46
36
|
(0, inversify_1.injectable)()
|
|
47
37
|
], WebFetchToolRenderer);
|
|
@@ -60,24 +50,8 @@ const WebFetchToolComponent = ({ input }) => {
|
|
|
60
50
|
}
|
|
61
51
|
return prompt.substring(0, maxLength) + '...';
|
|
62
52
|
};
|
|
63
|
-
const compactHeader = (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
React.createElement("span", { className: `${(0, browser_1.codicon)('globe')} claude-code-tool icon` }),
|
|
67
|
-
React.createElement("span", { className: "claude-code-tool command" }, getDomain(input.url)),
|
|
68
|
-
React.createElement("span", { className: "claude-code-tool description", title: input.prompt }, truncatePrompt(input.prompt))),
|
|
69
|
-
React.createElement("div", { className: "claude-code-tool header-right" },
|
|
70
|
-
React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/webFetch', 'Web Fetch')))));
|
|
71
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
72
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
73
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('URL')),
|
|
74
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.url)),
|
|
75
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
76
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Domain')),
|
|
77
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, getDomain(input.url))),
|
|
78
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
79
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Prompt')),
|
|
80
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.prompt))));
|
|
81
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
53
|
+
const compactHeader = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool header-left", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool title", children: core_1.nls.localize('theia/ai/claude-code/fetching', 'Fetching') }), (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('globe')} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool command", children: getDomain(input.url) }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool description", title: input.prompt, children: truncatePrompt(input.prompt) })] }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool header-right", children: (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/webFetch', 'Web Fetch') }) })] }));
|
|
54
|
+
const expandedContent = ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localizeByDefault('URL') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.url })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localizeByDefault('Domain') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: getDomain(input.url) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool detail-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-label", children: core_1.nls.localizeByDefault('Prompt') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.prompt })] })] }));
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
82
56
|
};
|
|
83
57
|
//# sourceMappingURL=web-fetch-tool-renderer.js.map
|