@theia/ai-claude-code 1.75.0-next.42 → 1.75.0-next.43
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/renderers/bash-tool-renderer.js +6 -35
- 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.js +10 -49
- package/lib/browser/renderers/edit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/glob-tool-renderer.js +8 -39
- package/lib/browser/renderers/glob-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/grep-tool-renderer.js +8 -55
- package/lib/browser/renderers/grep-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/ls-tool-renderer.js +10 -43
- package/lib/browser/renderers/ls-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/multiedit-tool-renderer.js +12 -56
- package/lib/browser/renderers/multiedit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/read-tool-renderer.js +8 -42
- package/lib/browser/renderers/read-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/todo-write-renderer.js +13 -43
- package/lib/browser/renderers/todo-write-renderer.js.map +1 -1
- package/lib/browser/renderers/web-fetch-tool-renderer.js +6 -37
- package/lib/browser/renderers/web-fetch-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/write-tool-renderer.js +8 -38
- package/lib/browser/renderers/write-tool-renderer.js.map +1 -1
- package/package.json +10 -10
|
@@ -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.BashToolRenderer = 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,11 +18,11 @@ let BashToolRenderer = class BashToolRenderer {
|
|
|
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)(BashToolComponent, { input: input });
|
|
37
22
|
}
|
|
38
23
|
catch (error) {
|
|
39
24
|
this.logger.warn('Failed to parse Bash tool input:', error);
|
|
40
|
-
return
|
|
25
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseBashToolData', 'Failed to parse Bash tool data') });
|
|
41
26
|
}
|
|
42
27
|
}
|
|
43
28
|
};
|
|
@@ -51,22 +36,8 @@ exports.BashToolRenderer = BashToolRenderer = tslib_1.__decorate([
|
|
|
51
36
|
(0, inversify_1.injectable)()
|
|
52
37
|
], BashToolRenderer);
|
|
53
38
|
const BashToolComponent = ({ input }) => {
|
|
54
|
-
const compactHeader = (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
React.createElement("span", { className: `${(0, browser_1.codicon)('terminal')} claude-code-tool icon` }),
|
|
58
|
-
React.createElement("span", { className: "claude-code-tool command" }, input.command)),
|
|
59
|
-
React.createElement("div", { className: "claude-code-tool header-right" }, input.timeout && (React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/timeoutInMs', 'Timeout: {0}ms', input.timeout))))));
|
|
60
|
-
const expandedContent = input.description ? (React.createElement("div", { className: "claude-code-tool details" },
|
|
61
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
62
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Command')),
|
|
63
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.command)),
|
|
64
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
65
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Description')),
|
|
66
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.description)),
|
|
67
|
-
input.timeout && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
68
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/timeout', 'Timeout')),
|
|
69
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, core_1.nls.localizeByDefault('{0}ms', input.timeout)))))) : undefined;
|
|
70
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
39
|
+
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.localizeByDefault('Terminal') }), (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('terminal')} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool command", children: input.command })] }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool header-right", children: input.timeout && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/timeoutInMs', 'Timeout: {0}ms', input.timeout) })) })] }));
|
|
40
|
+
const expandedContent = input.description ? ((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('Command') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.command })] }), (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('Description') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.description })] }), input.timeout && ((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/timeout', 'Timeout') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: core_1.nls.localizeByDefault('{0}ms', input.timeout) })] }))] })) : undefined;
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
71
42
|
};
|
|
72
43
|
//# sourceMappingURL=bash-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/bash-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":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ACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollapsibleToolRenderer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
|
|
2
5
|
// *****************************************************************************
|
|
3
6
|
// Copyright (C) 2025 EclipseSource GmbH.
|
|
4
7
|
//
|
|
@@ -14,8 +17,6 @@
|
|
|
14
17
|
//
|
|
15
18
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
19
|
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CollapsibleToolRenderer = void 0;
|
|
19
20
|
const browser_1 = require("@theia/core/lib/browser");
|
|
20
21
|
const React = require("@theia/core/shared/react");
|
|
21
22
|
const CollapsibleToolRenderer = ({ compactHeader, expandedContent, onHeaderClick, headerStyle, defaultExpanded = false }) => {
|
|
@@ -35,14 +36,10 @@ const CollapsibleToolRenderer = ({ compactHeader, expandedContent, onHeaderClick
|
|
|
35
36
|
}
|
|
36
37
|
onHeaderClick?.();
|
|
37
38
|
};
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} },
|
|
43
|
-
hasExpandableContent && (React.createElement("span", { className: `${(0, browser_1.codicon)(isExpanded ? 'chevron-down' : 'chevron-right')} claude-code-tool expand-icon` })),
|
|
44
|
-
compactHeader),
|
|
45
|
-
hasExpandableContent && isExpanded && (React.createElement("div", { className: "claude-code-tool expanded-content" }, expandedContent))));
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "claude-code-tool container", children: [(0, jsx_runtime_1.jsxs)("div", { className: `claude-code-tool header${hasExpandableContent ? ' expandable' : ''}`, onClick: handleHeaderClick, style: {
|
|
40
|
+
cursor: hasExpandableContent || onHeaderClick ? 'pointer' : 'default',
|
|
41
|
+
...headerStyle
|
|
42
|
+
}, children: [hasExpandableContent && ((0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)(isExpanded ? 'chevron-down' : 'chevron-right')} claude-code-tool expand-icon` })), compactHeader] }), hasExpandableContent && isExpanded && ((0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool expanded-content", children: expandedContent }))] }));
|
|
46
43
|
};
|
|
47
44
|
exports.CollapsibleToolRenderer = CollapsibleToolRenderer;
|
|
48
45
|
//# sourceMappingURL=collapsible-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/collapsible-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collapsible-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/collapsible-tool-renderer.tsx"],"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,qDAAkD;AAClD,kDAAkD;AAW3C,MAAM,uBAAuB,GAA2C,CAAC,EAC5E,aAAa,EACb,eAAe,EACf,aAAa,EACb,WAAW,EACX,eAAe,GAAG,KAAK,EAC1B,EAAE,EAAE;IACD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAEpE,MAAM,oBAAoB,GAAG,eAAe,KAAK,SAAS,CAAC;IAE3D,MAAM,iBAAiB,GAAG,CAAC,KAAuB,EAAE,EAAE;QAClD,+EAA+E;QAC/E,gDAAgD;QAChD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;QAC3C,IAAI,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACvC,aAAa,EAAE,EAAE,CAAC;YAClB,OAAO;QACX,CAAC;QAED,+BAA+B;QAC/B,IAAI,oBAAoB,EAAE,CAAC;YACvB,aAAa,CAAC,CAAC,UAAU,CAAC,CAAC;QAC/B,CAAC;QACD,aAAa,EAAE,EAAE,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACH,iCAAK,SAAS,EAAC,4BAA4B,aACvC,iCACI,SAAS,EAAE,0BAA0B,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAChF,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE;oBACH,MAAM,EAAE,oBAAoB,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;oBACrE,GAAG,WAAW;iBACjB,aAEA,oBAAoB,IAAI,CACrB,iCAAM,SAAS,EAAE,GAAG,IAAA,iBAAO,EAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,+BAA+B,GAAI,CAChH,EACA,aAAa,IACZ,EACL,oBAAoB,IAAI,UAAU,IAAI,CACnC,gCAAK,SAAS,EAAC,mCAAmC,YAC7C,eAAe,GACd,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAjDW,QAAA,uBAAuB,2BAiDlC"}
|
|
@@ -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.EditToolRenderer = 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 EditToolRenderer = class EditToolRenderer {
|
|
|
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)(EditToolComponent, { 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 Edit 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/failedToParseEditToolData', 'Failed to parse Edit tool data') });
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
};
|
|
@@ -104,37 +90,12 @@ const EditToolComponent = ({ input, workspaceService, labelProvider, editorManag
|
|
|
104
90
|
const newLines = input.new_string.split('\n').length;
|
|
105
91
|
return { oldLines, newLines };
|
|
106
92
|
};
|
|
107
|
-
const compactHeader = (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
React.createElement("span", { className: "claude-code-tool badge deleted" },
|
|
115
|
-
"-",
|
|
116
|
-
getChangeInfo().oldLines),
|
|
117
|
-
React.createElement("span", { className: "claude-code-tool badge added" },
|
|
118
|
-
"+",
|
|
119
|
-
getChangeInfo().newLines),
|
|
120
|
-
input.replace_all && (React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localizeByDefault('Replace All'))))));
|
|
121
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
122
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
123
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/filePath', 'File Path')),
|
|
124
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.file_path)),
|
|
125
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
126
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/from', 'From')),
|
|
127
|
-
React.createElement("pre", { className: "claude-code-tool detail-value code-preview" }, input.old_string.length > 200
|
|
128
|
-
? input.old_string.substring(0, 200) + '...'
|
|
129
|
-
: input.old_string)),
|
|
130
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
131
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/to', 'To')),
|
|
132
|
-
React.createElement("pre", { className: "claude-code-tool detail-value code-preview" }, input.new_string.length > 200
|
|
133
|
-
? input.new_string.substring(0, 200) + '...'
|
|
134
|
-
: input.new_string)),
|
|
135
|
-
input.replace_all && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
136
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Mode')),
|
|
137
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, core_1.nls.localize('theia/ai/claude-code/replaceAllOccurrences', 'Replace all occurrences'))))));
|
|
138
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
93
|
+
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/editing', '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().oldLines] }), (0, jsx_runtime_1.jsxs)("span", { className: "claude-code-tool badge added", children: ["+", getChangeInfo().newLines] }), input.replace_all && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localizeByDefault('Replace All') }))] })] }));
|
|
94
|
+
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/from', 'From') }), (0, jsx_runtime_1.jsx)("pre", { className: "claude-code-tool detail-value code-preview", children: input.old_string.length > 200
|
|
95
|
+
? input.old_string.substring(0, 200) + '...'
|
|
96
|
+
: input.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: input.new_string.length > 200
|
|
97
|
+
? input.new_string.substring(0, 200) + '...'
|
|
98
|
+
: input.new_string })] }), input.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.localizeByDefault('Mode') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: core_1.nls.localize('theia/ai/claude-code/replaceAllOccurrences', 'Replace all occurrences') })] }))] }));
|
|
99
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
139
100
|
};
|
|
140
101
|
//# sourceMappingURL=edit-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/edit-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/edit-tool-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAwD;AACxD,oDAAiD;AACjD,4DAAyE;AACzE,kDAAkD;AAElD,uDAA0D;AAC1D,0DAAgE;AAChE,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AAUpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAczB,SAAS,CAAC,QAA6B;QACnC,IAAI,qEAAqC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,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,CAAC,GAAQ,IAC5I,CACT,IACC,CACT,CAAC;IAEF,OAAO,CACH,uBAAC,mDAAuB,IACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -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.GlobToolRenderer = 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");
|
|
@@ -35,11 +21,11 @@ let GlobToolRenderer = class GlobToolRenderer {
|
|
|
35
21
|
render(response, parentNode) {
|
|
36
22
|
try {
|
|
37
23
|
const input = JSON.parse(response.arguments || '{}');
|
|
38
|
-
return
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(GlobToolComponent, { input: input, workspaceService: this.workspaceService, labelProvider: this.labelProvider });
|
|
39
25
|
}
|
|
40
26
|
catch (error) {
|
|
41
27
|
this.logger.warn('Failed to parse Glob tool input:', error);
|
|
42
|
-
return
|
|
28
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseGlobToolData', 'Failed to parse Glob tool data') });
|
|
43
29
|
}
|
|
44
30
|
}
|
|
45
31
|
};
|
|
@@ -83,27 +69,10 @@ const GlobToolComponent = ({ input, workspaceService, labelProvider }) => {
|
|
|
83
69
|
getWorkspaceRelativePath(input.path).then(setRelativePath);
|
|
84
70
|
}
|
|
85
71
|
}, [input.path]);
|
|
86
|
-
const compactHeader = (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
React.createElement("span", { className: "claude-code-tool scope" }, core_1.nls.localizeByDefault('in {0}', getSearchScope())),
|
|
92
|
-
relativePath && React.createElement("span", { className: "claude-code-tool relative-path" }, relativePath)),
|
|
93
|
-
React.createElement("div", { className: "claude-code-tool header-right" },
|
|
94
|
-
React.createElement("span", { className: "claude-code-tool badge" }, core_1.nls.localize('theia/ai/claude-code/globPattern', 'glob pattern')))));
|
|
95
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
96
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
97
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Pattern')),
|
|
98
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.pattern)),
|
|
99
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
100
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/searchPath', 'Search Path')),
|
|
101
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.path || core_1.nls.localize('theia/ai/claude-code/currentDirectory', 'current directory'))),
|
|
102
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
103
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Description')),
|
|
104
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.path
|
|
105
|
-
? core_1.nls.localize('theia/ai/claude-code/findMatchingFilesWithPath', 'Find files matching the glob pattern "{0}" within {1}', input.pattern, input.path)
|
|
106
|
-
: core_1.nls.localize('theia/ai/claude-code/findMatchingFiles', 'Find files matching the glob pattern "{0}" in the current directory', input.pattern)))));
|
|
107
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
72
|
+
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/finding', 'Finding') }), (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('files')} claude-code-tool icon` }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool glob-pattern", children: input.pattern }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool scope", children: core_1.nls.localizeByDefault('in {0}', getSearchScope()) }), relativePath && (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool relative-path", children: relativePath })] }), (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/globPattern', 'glob pattern') }) })] }));
|
|
73
|
+
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('Pattern') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.pattern })] }), (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/searchPath', 'Search Path') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.path || core_1.nls.localize('theia/ai/claude-code/currentDirectory', 'current directory') })] }), (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('Description') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.path
|
|
74
|
+
? core_1.nls.localize('theia/ai/claude-code/findMatchingFilesWithPath', 'Find files matching the glob pattern "{0}" within {1}', input.pattern, input.path)
|
|
75
|
+
: core_1.nls.localize('theia/ai/claude-code/findMatchingFiles', 'Find files matching the glob pattern "{0}" in the current directory', input.pattern) })] })] }));
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
108
77
|
};
|
|
109
78
|
//# sourceMappingURL=glob-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glob-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/glob-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"glob-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/glob-tool-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAiE;AACjE,oDAAiD;AACjD,4DAAyE;AACzE,kDAAkD;AAElD,0DAAgE;AAChE,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AAQpC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAWzB,SAAS,CAAC,QAA6B;QACnC,IAAI,qEAAqC,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACjF,O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
|
|
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.GrepToolRenderer = 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");
|
|
@@ -40,11 +26,11 @@ let GrepToolRenderer = class GrepToolRenderer {
|
|
|
40
26
|
render(response, parentNode) {
|
|
41
27
|
try {
|
|
42
28
|
const input = JSON.parse(response.arguments || '{}');
|
|
43
|
-
return
|
|
29
|
+
return (0, jsx_runtime_1.jsx)(GrepToolComponent, { input: input, workspaceService: this.workspaceService, labelProvider: this.labelProvider });
|
|
44
30
|
}
|
|
45
31
|
catch (error) {
|
|
46
32
|
this.logger.warn('Failed to parse Grep tool input:', error);
|
|
47
|
-
return
|
|
33
|
+
return (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool error", children: core_1.nls.localize('theia/ai/claude-code/failedToParseGrepToolData', 'Failed to parse Grep tool data') });
|
|
48
34
|
}
|
|
49
35
|
}
|
|
50
36
|
};
|
|
@@ -123,43 +109,10 @@ const GrepToolComponent = ({ input, workspaceService, labelProvider }) => {
|
|
|
123
109
|
};
|
|
124
110
|
};
|
|
125
111
|
const optionsInfo = getOptionsInfo();
|
|
126
|
-
const compactHeader = (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"\"",
|
|
132
|
-
input.pattern,
|
|
133
|
-
"\""),
|
|
134
|
-
React.createElement("span", { className: "claude-code-tool scope" }, core_1.nls.localizeByDefault('in {0}', getSearchScope())),
|
|
135
|
-
relativePath && React.createElement("span", { className: "claude-code-tool relative-path" }, relativePath)),
|
|
136
|
-
React.createElement("div", { className: "claude-code-tool header-right" },
|
|
137
|
-
input.output_mode && input.output_mode !== 'files_with_matches' && (React.createElement("span", { className: "claude-code-tool badge" }, GREP_OUTPUT_MODES[input.output_mode])),
|
|
138
|
-
optionsInfo.count > 0 && (React.createElement("span", { className: "claude-code-tool badge", title: optionsInfo.label }, optionsInfo.count > 1
|
|
139
|
-
? core_1.nls.localize('theia/ai/claude-code/optionsCount', '{0} options', optionsInfo.count)
|
|
140
|
-
: core_1.nls.localize('theia/ai/claude-code/oneOption', '1 option'))))));
|
|
141
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
142
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
143
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Pattern')),
|
|
144
|
-
React.createElement("code", { className: "claude-code-tool detail-value" },
|
|
145
|
-
"\"",
|
|
146
|
-
input.pattern,
|
|
147
|
-
"\"")),
|
|
148
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
149
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/searchPath', 'Search Path')),
|
|
150
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.path || core_1.nls.localize('theia/ai/claude-code/projectRoot', 'project root'))),
|
|
151
|
-
input.output_mode && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
152
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Mode')),
|
|
153
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, GREP_OUTPUT_MODES[input.output_mode]))),
|
|
154
|
-
input.glob && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
155
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/fileFilter', 'File Filter')),
|
|
156
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.glob))),
|
|
157
|
-
input.type && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
158
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/fileType', 'File Type')),
|
|
159
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, input.type))),
|
|
160
|
-
optionsInfo.label && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
161
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Options')),
|
|
162
|
-
React.createElement("span", { className: "claude-code-tool detail-value" }, optionsInfo.label)))));
|
|
163
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
112
|
+
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/searching', 'Searching') }), (0, jsx_runtime_1.jsx)("span", { className: `${(0, browser_1.codicon)('search')} claude-code-tool icon` }), (0, jsx_runtime_1.jsxs)("span", { className: "claude-code-tool pattern", children: ["\"", input.pattern, "\""] }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool scope", children: core_1.nls.localizeByDefault('in {0}', getSearchScope()) }), 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: [input.output_mode && input.output_mode !== 'files_with_matches' && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: GREP_OUTPUT_MODES[input.output_mode] })), optionsInfo.count > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", title: optionsInfo.label, children: optionsInfo.count > 1
|
|
113
|
+
? core_1.nls.localize('theia/ai/claude-code/optionsCount', '{0} options', optionsInfo.count)
|
|
114
|
+
: core_1.nls.localize('theia/ai/claude-code/oneOption', '1 option') }))] })] }));
|
|
115
|
+
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('Pattern') }), (0, jsx_runtime_1.jsxs)("code", { className: "claude-code-tool detail-value", children: ["\"", input.pattern, "\""] })] }), (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/searchPath', 'Search Path') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.path || core_1.nls.localize('theia/ai/claude-code/projectRoot', 'project root') })] }), input.output_mode && ((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('Mode') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: GREP_OUTPUT_MODES[input.output_mode] })] })), input.glob && ((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/fileFilter', 'File Filter') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.glob })] })), input.type && ((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/fileType', 'File Type') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: input.type })] })), optionsInfo.label && ((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('Options') }), (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool detail-value", children: optionsInfo.label })] }))] }));
|
|
116
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
164
117
|
};
|
|
165
118
|
//# sourceMappingURL=grep-tool-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grep-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/grep-tool-renderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grep-tool-renderer.js","sourceRoot":"","sources":["../../../src/browser/renderers/grep-tool-renderer.tsx"],"names":[],"mappings":";;;;;AAmBA,qDAAiE;AACjE,oDAAiD;AACjD,4DAAyE;AACzE,kDAAkD;AAElD,0DAAgE;AAChE,oFAAyF;AACzF,2EAAsE;AACtE,sCAA2C;AAiB3C,MAAM,iBAAiB,GAAG;IACtB,SAAS,EAAE,UAAG,CAAC,QAAQ,CAAC,8CAA8C,EAAE,SAAS,CAAC;IAClF,oBAAoB,EAAE,UAAG,CAAC,QAAQ,CAAC,uDAAuD,EAAE,oBAAoB,CAAC;IACjH,OAAO,EAAE,UAAG,CAAC,Q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BAA+B,YAAE,UAAG,CAAC,QAAQ,CAAC,+BAA+B,EAAE,WAAW,CAAC,GAAQ,EACnH,iCAAM,SAAS,EAAC,+BAA+B,YAAE,KAAK,CAAC,IAAI,GAAQ,IACjE,CACT,EACA,WAAW,CAAC,KAAK,IAAI,CAClB,iCAAK,SAAS,EAAC,6BAA6B,aACxC,iCAAM,SAAS,EAAC,+BAA+B,YAAE,UAAG,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAQ,EACzF,iCAAM,SAAS,EAAC,+BAA+B,YAAE,WAAW,CAAC,KAAK,GAAQ,IACxE,CACT,IACC,CACT,CAAC;IAEF,OAAO,CACH,uBAAC,mDAAuB,IACpB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -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.LSToolRenderer = 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 LSToolRenderer = class LSToolRenderer {
|
|
|
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)(LSToolComponent, { 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 LS 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/failedToParseLSToolData', 'Failed to parse LS tool data') });
|
|
44
30
|
}
|
|
45
31
|
}
|
|
46
32
|
};
|
|
@@ -91,31 +77,12 @@ const LSToolComponent = ({ input, workspaceService, labelProvider, editorManager
|
|
|
91
77
|
React.useEffect(() => {
|
|
92
78
|
getWorkspaceRelativePath(input.path).then(setRelativePath);
|
|
93
79
|
}, [input.path]);
|
|
94
|
-
const compactHeader = (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const expandedContent = (React.createElement("div", { className: "claude-code-tool details" },
|
|
102
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
103
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Directory')),
|
|
104
|
-
React.createElement("code", { className: "claude-code-tool detail-value" }, input.path)),
|
|
105
|
-
input.ignore && input.ignore.length > 0 && (React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
106
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localize('theia/ai/claude-code/ignoredPatterns', 'Ignored Patterns')),
|
|
107
|
-
React.createElement("div", { className: "claude-code-tool detail-value" }, input.ignore.map((pattern, index) => (React.createElement("code", { key: index, className: "claude-code-tool ignore-pattern" },
|
|
108
|
-
pattern,
|
|
109
|
-
index < input.ignore.length - 1 ? ', ' : '')))))),
|
|
110
|
-
React.createElement("div", { className: "claude-code-tool detail-row" },
|
|
111
|
-
React.createElement("span", { className: "claude-code-tool detail-label" }, core_1.nls.localizeByDefault('Description')),
|
|
112
|
-
React.createElement("span", { className: "claude-code-tool detail-value" },
|
|
113
|
-
core_1.nls.localize('theia/ai/claude-code/listDirectoryContents', 'List directory contents'),
|
|
114
|
-
input.ignore && input.ignore.length > 0
|
|
115
|
-
? (input.ignore.length > 1
|
|
116
|
-
? core_1.nls.localize('theia/ai/claude-code/excludingPatterns', ' (excluding {0} patterns)', input.ignore.length)
|
|
117
|
-
: core_1.nls.localize('theia/ai/claude-code/excludingOnePattern', ' (exluding 1 pattern)'))
|
|
118
|
-
: ''))));
|
|
119
|
-
return (React.createElement(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
80
|
+
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/listing', 'Listing') }), (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 file-name clickable-element", onClick: handleOpenDirectory, title: core_1.nls.localize('theia/ai/claude-code/openDirectoryTooltip', 'Click to open directory'), children: getDirectoryName(input.path) }), relativePath && (0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool relative-path", children: relativePath })] }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool header-right", children: input.ignore && input.ignore.length > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "claude-code-tool badge", children: core_1.nls.localize('theia/ai/claude-code/ignoringPatterns', 'Ignoring {0} patterns', input.ignore.length) })) })] }));
|
|
81
|
+
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('Directory') }), (0, jsx_runtime_1.jsx)("code", { className: "claude-code-tool detail-value", children: input.path })] }), input.ignore && input.ignore.length > 0 && ((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/ignoredPatterns', 'Ignored Patterns') }), (0, jsx_runtime_1.jsx)("div", { className: "claude-code-tool detail-value", children: input.ignore.map((pattern, index) => ((0, jsx_runtime_1.jsxs)("code", { className: "claude-code-tool ignore-pattern", children: [pattern, index < input.ignore.length - 1 ? ', ' : ''] }, index))) })] })), (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('Description') }), (0, jsx_runtime_1.jsxs)("span", { className: "claude-code-tool detail-value", children: [core_1.nls.localize('theia/ai/claude-code/listDirectoryContents', 'List directory contents'), input.ignore && input.ignore.length > 0
|
|
82
|
+
? (input.ignore.length > 1
|
|
83
|
+
? core_1.nls.localize('theia/ai/claude-code/excludingPatterns', ' (excluding {0} patterns)', input.ignore.length)
|
|
84
|
+
: core_1.nls.localize('theia/ai/claude-code/excludingOnePattern', ' (exluding 1 pattern)'))
|
|
85
|
+
: ''] })] })] }));
|
|
86
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_tool_renderer_1.CollapsibleToolRenderer, { compactHeader: compactHeader, expandedContent: expandedContent }));
|
|
120
87
|
};
|
|
121
88
|
//# sourceMappingURL=ls-tool-renderer.js.map
|