@theia/ai-claude-code 1.66.0-next.41 → 1.66.0-next.67
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.d.ts.map +1 -1
- package/lib/browser/claude-code-chat-agent.js +7 -7
- package/lib/browser/claude-code-chat-agent.js.map +1 -1
- package/lib/browser/claude-code-command-contribution.d.ts.map +1 -1
- package/lib/browser/claude-code-command-contribution.js +4 -4
- package/lib/browser/claude-code-command-contribution.js.map +1 -1
- package/lib/browser/claude-code-edit-tool-service.d.ts.map +1 -1
- package/lib/browser/claude-code-edit-tool-service.js +5 -4
- package/lib/browser/claude-code-edit-tool-service.js.map +1 -1
- package/lib/browser/claude-code-slash-commands-contribution.d.ts.map +1 -1
- package/lib/browser/claude-code-slash-commands-contribution.js +9 -8
- package/lib/browser/claude-code-slash-commands-contribution.js.map +1 -1
- package/lib/browser/renderers/bash-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/bash-tool-renderer.js +8 -12
- package/lib/browser/renderers/bash-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/edit-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/edit-tool-renderer.js +10 -9
- package/lib/browser/renderers/edit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/glob-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/glob-tool-renderer.js +13 -16
- package/lib/browser/renderers/glob-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/grep-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/grep-tool-renderer.js +31 -28
- 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 -12
- 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 -18
- package/lib/browser/renderers/multiedit-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/read-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/read-tool-renderer.js +13 -10
- package/lib/browser/renderers/read-tool-renderer.js.map +1 -1
- package/lib/browser/renderers/todo-write-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/todo-write-renderer.js +15 -14
- package/lib/browser/renderers/todo-write-renderer.js.map +1 -1
- package/lib/browser/renderers/web-fetch-tool-renderer.d.ts.map +1 -1
- package/lib/browser/renderers/web-fetch-tool-renderer.js +7 -6
- 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 +7 -6
- package/lib/browser/renderers/write-tool-renderer.js.map +1 -1
- package/lib/node/claude-code-service-impl.js +7 -7
- package/lib/node/claude-code-service-impl.js.map +1 -1
- package/package.json +10 -10
- package/src/browser/claude-code-chat-agent.ts +9 -8
- package/src/browser/claude-code-command-contribution.ts +4 -4
- package/src/browser/claude-code-edit-tool-service.ts +6 -5
- package/src/browser/claude-code-slash-commands-contribution.ts +9 -9
- package/src/browser/renderers/bash-tool-renderer.tsx +8 -7
- package/src/browser/renderers/edit-tool-renderer.tsx +10 -9
- package/src/browser/renderers/glob-tool-renderer.tsx +13 -11
- package/src/browser/renderers/grep-tool-renderer.tsx +33 -24
- package/src/browser/renderers/ls-tool-renderer.tsx +12 -9
- package/src/browser/renderers/multiedit-tool-renderer.tsx +14 -11
- package/src/browser/renderers/read-tool-renderer.tsx +13 -10
- package/src/browser/renderers/todo-write-renderer.tsx +17 -8
- package/src/browser/renderers/web-fetch-tool-renderer.tsx +7 -6
- package/src/browser/renderers/write-tool-renderer.tsx +7 -6
- package/src/node/claude-code-service-impl.ts +8 -8
|
@@ -23,6 +23,7 @@ import * as React from '@theia/core/shared/react';
|
|
|
23
23
|
import { ReactNode } from '@theia/core/shared/react';
|
|
24
24
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
25
25
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
26
|
+
import { nls } from '@theia/core';
|
|
26
27
|
|
|
27
28
|
interface BashToolInput {
|
|
28
29
|
command: string;
|
|
@@ -46,7 +47,7 @@ export class BashToolRenderer implements ChatResponsePartRenderer<ToolCallChatRe
|
|
|
46
47
|
return <BashToolComponent input={input} />;
|
|
47
48
|
} catch (error) {
|
|
48
49
|
console.warn('Failed to parse Bash tool input:', error);
|
|
49
|
-
return <div className="claude-code-tool error">Failed to parse Bash tool data</div>;
|
|
50
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseBashToolData', 'Failed to parse Bash tool data')}</div>;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -57,13 +58,13 @@ const BashToolComponent: React.FC<{
|
|
|
57
58
|
const compactHeader = (
|
|
58
59
|
<>
|
|
59
60
|
<div className="claude-code-tool header-left">
|
|
60
|
-
<span className="claude-code-tool title">Terminal</span>
|
|
61
|
+
<span className="claude-code-tool title">{nls.localizeByDefault('Terminal')}</span>
|
|
61
62
|
<span className={`${codicon('terminal')} claude-code-tool icon`} />
|
|
62
63
|
<span className="claude-code-tool command">{input.command}</span>
|
|
63
64
|
</div>
|
|
64
65
|
<div className="claude-code-tool header-right">
|
|
65
66
|
{input.timeout && (
|
|
66
|
-
<span className="claude-code-tool badge">Timeout: {input.timeout}
|
|
67
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/timeoutInMs', 'Timeout: {0}ms', input.timeout)}</span>
|
|
67
68
|
)}
|
|
68
69
|
</div>
|
|
69
70
|
</>
|
|
@@ -72,17 +73,17 @@ const BashToolComponent: React.FC<{
|
|
|
72
73
|
const expandedContent = input.description ? (
|
|
73
74
|
<div className="claude-code-tool details">
|
|
74
75
|
<div className="claude-code-tool detail-row">
|
|
75
|
-
<span className="claude-code-tool detail-label">Command</span>
|
|
76
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Command')}</span>
|
|
76
77
|
<code className="claude-code-tool detail-value">{input.command}</code>
|
|
77
78
|
</div>
|
|
78
79
|
<div className="claude-code-tool detail-row">
|
|
79
|
-
<span className="claude-code-tool detail-label">Description</span>
|
|
80
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Description')}</span>
|
|
80
81
|
<span className="claude-code-tool detail-value">{input.description}</span>
|
|
81
82
|
</div>
|
|
82
83
|
{input.timeout && (
|
|
83
84
|
<div className="claude-code-tool detail-row">
|
|
84
|
-
<span className="claude-code-tool detail-label">Timeout</span>
|
|
85
|
-
<span className="claude-code-tool detail-value">{input.timeout}
|
|
85
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/timeout', 'Timeout')}</span>
|
|
86
|
+
<span className="claude-code-tool detail-value">{nls.localizeByDefault('{0}ms', input.timeout)}</span>
|
|
86
87
|
</div>
|
|
87
88
|
)}
|
|
88
89
|
</div>
|
|
@@ -26,6 +26,7 @@ import { EditorManager } from '@theia/editor/lib/browser';
|
|
|
26
26
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
27
27
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
28
28
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
29
|
+
import { nls } from '@theia/core';
|
|
29
30
|
|
|
30
31
|
interface EditToolInput {
|
|
31
32
|
file_path: string;
|
|
@@ -64,7 +65,7 @@ export class EditToolRenderer implements ChatResponsePartRenderer<ToolCallChatRe
|
|
|
64
65
|
/>;
|
|
65
66
|
} catch (error) {
|
|
66
67
|
console.warn('Failed to parse Edit tool input:', error);
|
|
67
|
-
return <div className="claude-code-tool error">Failed to parse Edit tool data</div>;
|
|
68
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseEditToolData', 'Failed to parse Edit tool data')}</div>;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -119,12 +120,12 @@ const EditToolComponent: React.FC<{
|
|
|
119
120
|
const compactHeader = (
|
|
120
121
|
<>
|
|
121
122
|
<div className="claude-code-tool header-left">
|
|
122
|
-
<span className="claude-code-tool title">Editing</span>
|
|
123
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/editing', 'Editing')}</span>
|
|
123
124
|
<span className={`${getIcon(input.file_path)} claude-code-tool icon`} />
|
|
124
125
|
<span
|
|
125
126
|
className="claude-code-tool file-name clickable-element"
|
|
126
127
|
onClick={handleOpenFile}
|
|
127
|
-
title=
|
|
128
|
+
title={nls.localize('theia/ai/claude-code/openFileTooltip', 'Click to open file in editor')}
|
|
128
129
|
>
|
|
129
130
|
{getFileName(input.file_path)}
|
|
130
131
|
</span>
|
|
@@ -134,7 +135,7 @@ const EditToolComponent: React.FC<{
|
|
|
134
135
|
<span className="claude-code-tool badge deleted">-{getChangeInfo().oldLines}</span>
|
|
135
136
|
<span className="claude-code-tool badge added">+{getChangeInfo().newLines}</span>
|
|
136
137
|
{input.replace_all && (
|
|
137
|
-
<span className="claude-code-tool badge">Replace All</span>
|
|
138
|
+
<span className="claude-code-tool badge">{nls.localizeByDefault('Replace All')}</span>
|
|
138
139
|
)}
|
|
139
140
|
</div>
|
|
140
141
|
</>
|
|
@@ -143,11 +144,11 @@ const EditToolComponent: React.FC<{
|
|
|
143
144
|
const expandedContent = (
|
|
144
145
|
<div className="claude-code-tool details">
|
|
145
146
|
<div className="claude-code-tool detail-row">
|
|
146
|
-
<span className="claude-code-tool detail-label">File Path</span>
|
|
147
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/filePath', 'File Path')}</span>
|
|
147
148
|
<code className="claude-code-tool detail-value">{input.file_path}</code>
|
|
148
149
|
</div>
|
|
149
150
|
<div className="claude-code-tool detail-row">
|
|
150
|
-
<span className="claude-code-tool detail-label">From</span>
|
|
151
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/from', 'From')}</span>
|
|
151
152
|
<pre className="claude-code-tool detail-value code-preview">
|
|
152
153
|
{input.old_string.length > 200
|
|
153
154
|
? input.old_string.substring(0, 200) + '...'
|
|
@@ -155,7 +156,7 @@ const EditToolComponent: React.FC<{
|
|
|
155
156
|
</pre>
|
|
156
157
|
</div>
|
|
157
158
|
<div className="claude-code-tool detail-row">
|
|
158
|
-
<span className="claude-code-tool detail-label">To</span>
|
|
159
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/to', 'To')}</span>
|
|
159
160
|
<pre className="claude-code-tool detail-value code-preview">
|
|
160
161
|
{input.new_string.length > 200
|
|
161
162
|
? input.new_string.substring(0, 200) + '...'
|
|
@@ -164,8 +165,8 @@ const EditToolComponent: React.FC<{
|
|
|
164
165
|
</div>
|
|
165
166
|
{input.replace_all && (
|
|
166
167
|
<div className="claude-code-tool detail-row">
|
|
167
|
-
<span className="claude-code-tool detail-label">Mode</span>
|
|
168
|
-
<span className="claude-code-tool detail-value">Replace all occurrences</span>
|
|
168
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Mode')}</span>
|
|
169
|
+
<span className="claude-code-tool detail-value">{nls.localize('theia/ai/claude-code/replaceAllOccurrences', 'Replace all occurrences')}</span>
|
|
169
170
|
</div>
|
|
170
171
|
)}
|
|
171
172
|
</div>
|
|
@@ -25,6 +25,7 @@ import { ReactNode } from '@theia/core/shared/react';
|
|
|
25
25
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
26
26
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
27
27
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
28
|
+
import { nls } from '@theia/core';
|
|
28
29
|
|
|
29
30
|
interface GlobToolInput {
|
|
30
31
|
pattern: string;
|
|
@@ -57,7 +58,7 @@ export class GlobToolRenderer implements ChatResponsePartRenderer<ToolCallChatRe
|
|
|
57
58
|
/>;
|
|
58
59
|
} catch (error) {
|
|
59
60
|
console.warn('Failed to parse Glob tool input:', error);
|
|
60
|
-
return <div className="claude-code-tool error">Failed to parse Glob tool data</div>;
|
|
61
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseGlobToolData', 'Failed to parse Glob tool data')}</div>;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -71,7 +72,7 @@ const GlobToolComponent: React.FC<{
|
|
|
71
72
|
if (input.path) {
|
|
72
73
|
return input.path.split('/').pop() || input.path;
|
|
73
74
|
}
|
|
74
|
-
return 'project';
|
|
75
|
+
return nls.localize('theia/ai/claude-code/project', 'project');
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const getWorkspaceRelativePath = async (filePath: string): Promise<string> => {
|
|
@@ -95,14 +96,14 @@ const GlobToolComponent: React.FC<{
|
|
|
95
96
|
const compactHeader = (
|
|
96
97
|
<>
|
|
97
98
|
<div className="claude-code-tool header-left">
|
|
98
|
-
<span className="claude-code-tool title">Finding</span>
|
|
99
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/finding', 'Finding')}</span>
|
|
99
100
|
<span className={`${codicon('files')} claude-code-tool icon`} />
|
|
100
101
|
<span className="claude-code-tool glob-pattern">{input.pattern}</span>
|
|
101
|
-
<span className="claude-code-tool scope">in {getSearchScope()}</span>
|
|
102
|
+
<span className="claude-code-tool scope">{nls.localizeByDefault('in {0}', getSearchScope())}</span>
|
|
102
103
|
{relativePath && <span className="claude-code-tool relative-path">{relativePath}</span>}
|
|
103
104
|
</div>
|
|
104
105
|
<div className="claude-code-tool header-right">
|
|
105
|
-
<span className="claude-code-tool badge">glob pattern</span>
|
|
106
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/globPattern', 'glob pattern')}</span>
|
|
106
107
|
</div>
|
|
107
108
|
</>
|
|
108
109
|
);
|
|
@@ -110,18 +111,19 @@ const GlobToolComponent: React.FC<{
|
|
|
110
111
|
const expandedContent = (
|
|
111
112
|
<div className="claude-code-tool details">
|
|
112
113
|
<div className="claude-code-tool detail-row">
|
|
113
|
-
<span className="claude-code-tool detail-label">Pattern</span>
|
|
114
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/pattern', 'Pattern')}</span>
|
|
114
115
|
<code className="claude-code-tool detail-value">{input.pattern}</code>
|
|
115
116
|
</div>
|
|
116
117
|
<div className="claude-code-tool detail-row">
|
|
117
|
-
<span className="claude-code-tool detail-label">Search Path</span>
|
|
118
|
-
<code className="claude-code-tool detail-value">{input.path || 'current directory'}</code>
|
|
118
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/searchPath', 'Search Path')}</span>
|
|
119
|
+
<code className="claude-code-tool detail-value">{input.path || nls.localize('theia/ai/claude-code/currentDirectory', 'current directory')}</code>
|
|
119
120
|
</div>
|
|
120
121
|
<div className="claude-code-tool detail-row">
|
|
121
|
-
<span className="claude-code-tool detail-label">Description</span>
|
|
122
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Description')}</span>
|
|
122
123
|
<span className="claude-code-tool detail-value">
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
{input.path
|
|
125
|
+
? nls.localize('theia/ai/claude-code/findMatchingFilesWithPath', 'Find files matching the glob pattern "{0}" within {1}', input.pattern, input.path)
|
|
126
|
+
: nls.localize('theia/ai/claude-code/findMatchingFiles', 'Find files matching the glob pattern "{0}" in the current directory', input.pattern)}
|
|
125
127
|
</span>
|
|
126
128
|
</div>
|
|
127
129
|
</div>
|
|
@@ -25,11 +25,12 @@ import { ReactNode } from '@theia/core/shared/react';
|
|
|
25
25
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
26
26
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
27
27
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
28
|
+
import { nls } from '@theia/core';
|
|
28
29
|
|
|
29
30
|
interface GrepToolInput {
|
|
30
31
|
pattern: string;
|
|
31
32
|
path?: string;
|
|
32
|
-
output_mode?:
|
|
33
|
+
output_mode?: keyof typeof GREP_OUTPUT_MODES;
|
|
33
34
|
glob?: string;
|
|
34
35
|
type?: string;
|
|
35
36
|
'-i'?: boolean;
|
|
@@ -41,6 +42,12 @@ interface GrepToolInput {
|
|
|
41
42
|
head_limit?: number;
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
const GREP_OUTPUT_MODES = {
|
|
46
|
+
'content': nls.localize('theia/ai/claude-code/grepOutputModes/content', 'content'),
|
|
47
|
+
'files_with_matches': nls.localize('theia/ai/claude-code/grepOutputModes/filesWithMatches', 'files with matches'),
|
|
48
|
+
'count': nls.localize('theia/ai/claude-code/grepOutputModes/count', 'count')
|
|
49
|
+
};
|
|
50
|
+
|
|
44
51
|
@injectable()
|
|
45
52
|
export class GrepToolRenderer implements ChatResponsePartRenderer<ToolCallChatResponseContent> {
|
|
46
53
|
|
|
@@ -67,7 +74,7 @@ export class GrepToolRenderer implements ChatResponsePartRenderer<ToolCallChatRe
|
|
|
67
74
|
/>;
|
|
68
75
|
} catch (error) {
|
|
69
76
|
console.warn('Failed to parse Grep tool input:', error);
|
|
70
|
-
return <div className="claude-code-tool error">Failed to parse Grep tool data</div>;
|
|
77
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseGrepToolData', 'Failed to parse Grep tool data')}</div>;
|
|
71
78
|
}
|
|
72
79
|
}
|
|
73
80
|
}
|
|
@@ -81,7 +88,7 @@ const GrepToolComponent: React.FC<{
|
|
|
81
88
|
if (input.path) {
|
|
82
89
|
return input.path.split('/').pop() || input.path;
|
|
83
90
|
}
|
|
84
|
-
return 'project';
|
|
91
|
+
return nls.localize('theia/ai/claude-code/project', 'project');
|
|
85
92
|
};
|
|
86
93
|
|
|
87
94
|
const getWorkspaceRelativePath = async (filePath: string): Promise<string> => {
|
|
@@ -104,15 +111,15 @@ const GrepToolComponent: React.FC<{
|
|
|
104
111
|
|
|
105
112
|
const getOptionsInfo = (): { label: string; count: number } => {
|
|
106
113
|
const options = [];
|
|
107
|
-
if (input['-i']) { options.push('case-insensitive'); }
|
|
108
|
-
if (input['-n']) { options.push('line numbers'); }
|
|
109
|
-
if (input['-A']) { options.push(
|
|
110
|
-
if (input['-B']) { options.push(
|
|
111
|
-
if (input['-C']) { options.push(
|
|
112
|
-
if (input.multiline) { options.push('multiline'); }
|
|
113
|
-
if (input.glob) { options.push(
|
|
114
|
-
if (input.type) { options.push(
|
|
115
|
-
if (input.head_limit) { options.push(
|
|
114
|
+
if (input['-i']) { options.push(nls.localize('theia/ai/claude-code/grepOptions/caseInsensitive', 'case-insensitive')); }
|
|
115
|
+
if (input['-n']) { options.push(nls.localize('theia/ai/claude-code/grepOptions/lineNumbers', 'line numbers')); }
|
|
116
|
+
if (input['-A']) { options.push(nls.localize('theia/ai/claude-code/grepOptions/linesAfter', '+{0} after'), input['-A']); }
|
|
117
|
+
if (input['-B']) { options.push(nls.localize('theia/ai/claude-code/grepOptions/linesBefore', '+{0} before', input['-B'])); }
|
|
118
|
+
if (input['-C']) { options.push(nls.localize('theia/ai/claude-code/grepOptions/linesContext', '±{0} context', input['-C'])); }
|
|
119
|
+
if (input.multiline) { options.push(nls.localize('theia/ai/claude-code/grepOptions/multiLine', 'multiline')); }
|
|
120
|
+
if (input.glob) { options.push(nls.localize('theia/ai/claude-code/grepOptions/glob', 'glob: {0}', input.glob)); }
|
|
121
|
+
if (input.type) { options.push(nls.localize('theia/ai/claude-code/grepOptions/type', 'type: {0}', input.type)); }
|
|
122
|
+
if (input.head_limit) { options.push(nls.localize('theia/ai/claude-code/grepOptions/headLimit', 'limit: {0}', input.head_limit)); }
|
|
116
123
|
|
|
117
124
|
return {
|
|
118
125
|
label: options.length > 0 ? options.join(', ') : '',
|
|
@@ -125,19 +132,21 @@ const GrepToolComponent: React.FC<{
|
|
|
125
132
|
const compactHeader = (
|
|
126
133
|
<>
|
|
127
134
|
<div className="claude-code-tool header-left">
|
|
128
|
-
<span className="claude-code-tool title">Searching</span>
|
|
135
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/searching', 'Searching')}</span>
|
|
129
136
|
<span className={`${codicon('search')} claude-code-tool icon`} />
|
|
130
137
|
<span className="claude-code-tool pattern">"{input.pattern}"</span>
|
|
131
|
-
<span className="claude-code-tool scope">in {getSearchScope()}</span>
|
|
138
|
+
<span className="claude-code-tool scope">{nls.localizeByDefault('in {0}', getSearchScope())}</span>
|
|
132
139
|
{relativePath && <span className="claude-code-tool relative-path">{relativePath}</span>}
|
|
133
140
|
</div>
|
|
134
141
|
<div className="claude-code-tool header-right">
|
|
135
142
|
{input.output_mode && input.output_mode !== 'files_with_matches' && (
|
|
136
|
-
<span className="claude-code-tool badge">{input.output_mode}</span>
|
|
143
|
+
<span className="claude-code-tool badge">{GREP_OUTPUT_MODES[input.output_mode]}</span>
|
|
137
144
|
)}
|
|
138
145
|
{optionsInfo.count > 0 && (
|
|
139
146
|
<span className="claude-code-tool badge" title={optionsInfo.label}>
|
|
140
|
-
{optionsInfo.count
|
|
147
|
+
{optionsInfo.count > 1
|
|
148
|
+
? nls.localize('theia/ai/claude-code/optionsCount', '{0} options', optionsInfo.count)
|
|
149
|
+
: nls.localize('theia/ai/claude-code/oneOption', '1 option')}
|
|
141
150
|
</span>
|
|
142
151
|
)}
|
|
143
152
|
</div>
|
|
@@ -147,34 +156,34 @@ const GrepToolComponent: React.FC<{
|
|
|
147
156
|
const expandedContent = (
|
|
148
157
|
<div className="claude-code-tool details">
|
|
149
158
|
<div className="claude-code-tool detail-row">
|
|
150
|
-
<span className="claude-code-tool detail-label">Pattern</span>
|
|
159
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/pattern', 'Pattern')}</span>
|
|
151
160
|
<code className="claude-code-tool detail-value">"{input.pattern}"</code>
|
|
152
161
|
</div>
|
|
153
162
|
<div className="claude-code-tool detail-row">
|
|
154
|
-
<span className="claude-code-tool detail-label">Search Path</span>
|
|
155
|
-
<code className="claude-code-tool detail-value">{input.path || 'project root'}</code>
|
|
163
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/searchPath', 'Search Path')}</span>
|
|
164
|
+
<code className="claude-code-tool detail-value">{input.path || nls.localize('theia/ai/claude-code/projectRoot', 'project root')}</code>
|
|
156
165
|
</div>
|
|
157
166
|
{input.output_mode && (
|
|
158
167
|
<div className="claude-code-tool detail-row">
|
|
159
|
-
<span className="claude-code-tool detail-label">Mode</span>
|
|
160
|
-
<span className="claude-code-tool detail-value">{input.output_mode}</span>
|
|
168
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Mode')}</span>
|
|
169
|
+
<span className="claude-code-tool detail-value">{GREP_OUTPUT_MODES[input.output_mode]}</span>
|
|
161
170
|
</div>
|
|
162
171
|
)}
|
|
163
172
|
{input.glob && (
|
|
164
173
|
<div className="claude-code-tool detail-row">
|
|
165
|
-
<span className="claude-code-tool detail-label">File Filter</span>
|
|
174
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/fileFilter', 'File Filter')}</span>
|
|
166
175
|
<code className="claude-code-tool detail-value">{input.glob}</code>
|
|
167
176
|
</div>
|
|
168
177
|
)}
|
|
169
178
|
{input.type && (
|
|
170
179
|
<div className="claude-code-tool detail-row">
|
|
171
|
-
<span className="claude-code-tool detail-label">File Type</span>
|
|
180
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/fileType', 'File Type')}</span>
|
|
172
181
|
<span className="claude-code-tool detail-value">{input.type}</span>
|
|
173
182
|
</div>
|
|
174
183
|
)}
|
|
175
184
|
{optionsInfo.label && (
|
|
176
185
|
<div className="claude-code-tool detail-row">
|
|
177
|
-
<span className="claude-code-tool detail-label">Options</span>
|
|
186
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Options')}</span>
|
|
178
187
|
<span className="claude-code-tool detail-value">{optionsInfo.label}</span>
|
|
179
188
|
</div>
|
|
180
189
|
)}
|
|
@@ -26,6 +26,7 @@ import { EditorManager } from '@theia/editor/lib/browser';
|
|
|
26
26
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
27
27
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
28
28
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
29
|
+
import { nls } from '@theia/core';
|
|
29
30
|
|
|
30
31
|
interface LSToolInput {
|
|
31
32
|
path: string;
|
|
@@ -62,7 +63,7 @@ export class LSToolRenderer implements ChatResponsePartRenderer<ToolCallChatResp
|
|
|
62
63
|
/>;
|
|
63
64
|
} catch (error) {
|
|
64
65
|
console.warn('Failed to parse LS tool input:', error);
|
|
65
|
-
return <div className="claude-code-tool error">Failed to parse LS tool data</div>;
|
|
66
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseLSToolData', 'Failed to parse LS tool data')}</div>;
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -103,12 +104,12 @@ const LSToolComponent: React.FC<{
|
|
|
103
104
|
const compactHeader = (
|
|
104
105
|
<>
|
|
105
106
|
<div className="claude-code-tool header-left">
|
|
106
|
-
<span className="claude-code-tool title">Listing</span>
|
|
107
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/listing', 'Listing')}</span>
|
|
107
108
|
<span className={`${codicon('checklist')} claude-code-tool icon`} />
|
|
108
109
|
<span
|
|
109
110
|
className="claude-code-tool file-name clickable-element"
|
|
110
111
|
onClick={handleOpenDirectory}
|
|
111
|
-
title=
|
|
112
|
+
title={nls.localize('theia/ai/claude-code/openDirectoryTooltip', 'Click to open directory')}
|
|
112
113
|
>
|
|
113
114
|
{getDirectoryName(input.path)}
|
|
114
115
|
</span>
|
|
@@ -116,7 +117,7 @@ const LSToolComponent: React.FC<{
|
|
|
116
117
|
</div>
|
|
117
118
|
<div className="claude-code-tool header-right">
|
|
118
119
|
{input.ignore && input.ignore.length > 0 && (
|
|
119
|
-
<span className="claude-code-tool badge">Ignoring {input.ignore.length}
|
|
120
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/ignoringPatterns', 'Ignoring {0} patterns', input.ignore.length)}</span>
|
|
120
121
|
)}
|
|
121
122
|
</div>
|
|
122
123
|
</>
|
|
@@ -125,12 +126,12 @@ const LSToolComponent: React.FC<{
|
|
|
125
126
|
const expandedContent = (
|
|
126
127
|
<div className="claude-code-tool details">
|
|
127
128
|
<div className="claude-code-tool detail-row">
|
|
128
|
-
<span className="claude-code-tool detail-label">Directory</span>
|
|
129
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/directory', 'Directory')}</span>
|
|
129
130
|
<code className="claude-code-tool detail-value">{input.path}</code>
|
|
130
131
|
</div>
|
|
131
132
|
{input.ignore && input.ignore.length > 0 && (
|
|
132
133
|
<div className="claude-code-tool detail-row">
|
|
133
|
-
<span className="claude-code-tool detail-label">Ignored Patterns</span>
|
|
134
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/ignoredPatterns', 'Ignored Patterns')}</span>
|
|
134
135
|
<div className="claude-code-tool detail-value">
|
|
135
136
|
{input.ignore.map((pattern, index) => (
|
|
136
137
|
<code key={index} className="claude-code-tool ignore-pattern">
|
|
@@ -141,10 +142,12 @@ const LSToolComponent: React.FC<{
|
|
|
141
142
|
</div>
|
|
142
143
|
)}
|
|
143
144
|
<div className="claude-code-tool detail-row">
|
|
144
|
-
<span className="claude-code-tool detail-label">Description</span>
|
|
145
|
+
<span className="claude-code-tool detail-label">{nls.localizeByDefault('Description')}</span>
|
|
145
146
|
<span className="claude-code-tool detail-value">
|
|
146
|
-
List directory contents{input.ignore && input.ignore.length > 0
|
|
147
|
-
?
|
|
147
|
+
{nls.localize('theia/ai/claude-code/listDirectoryContents', 'List directory contents')}{input.ignore && input.ignore.length > 0
|
|
148
|
+
? (input.ignore.length > 1
|
|
149
|
+
? nls.localize('theia/ai/claude-code/excludingPatterns', ' (excluding {0} patterns)', input.ignore.length)
|
|
150
|
+
: nls.localize('theia/ai/claude-code/excludingOnePattern', ' (exluding 1 pattern)'))
|
|
148
151
|
: ''}
|
|
149
152
|
</span>
|
|
150
153
|
</div>
|
|
@@ -26,6 +26,7 @@ import { EditorManager } from '@theia/editor/lib/browser';
|
|
|
26
26
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
27
27
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
28
28
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
29
|
+
import { nls } from '@theia/core';
|
|
29
30
|
|
|
30
31
|
interface EditOperation {
|
|
31
32
|
old_string: string;
|
|
@@ -68,7 +69,7 @@ export class MultiEditToolRenderer implements ChatResponsePartRenderer<ToolCallC
|
|
|
68
69
|
/>;
|
|
69
70
|
} catch (error) {
|
|
70
71
|
console.warn('Failed to parse MultiEdit tool input:', error);
|
|
71
|
-
return <div className="claude-code-tool error">Failed to parse MultiEdit tool data</div>;
|
|
72
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseMultiEditToolData', 'Failed to parse MultiEdit tool data')}</div>;
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
@@ -132,12 +133,12 @@ const MultiEditToolComponent: React.FC<{
|
|
|
132
133
|
const compactHeader = (
|
|
133
134
|
<>
|
|
134
135
|
<div className="claude-code-tool header-left">
|
|
135
|
-
<span className="claude-code-tool title">Multi-editing</span>
|
|
136
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/multiEditing', 'Multi-editing')}</span>
|
|
136
137
|
<span className={`${getIcon(input.file_path)} claude-code-tool icon`} />
|
|
137
138
|
<span
|
|
138
139
|
className="claude-code-tool file-name clickable-element"
|
|
139
140
|
onClick={handleOpenFile}
|
|
140
|
-
title=
|
|
141
|
+
title={nls.localize('theia/ai/claude-code/openFileTooltip', 'Click to open file in editor')}
|
|
141
142
|
>
|
|
142
143
|
{getFileName(input.file_path)}
|
|
143
144
|
</span>
|
|
@@ -146,9 +147,11 @@ const MultiEditToolComponent: React.FC<{
|
|
|
146
147
|
<div className="claude-code-tool header-right">
|
|
147
148
|
<span className="claude-code-tool badge deleted">-{getChangeInfo().totalOldLines}</span>
|
|
148
149
|
<span className="claude-code-tool badge added">+{getChangeInfo().totalNewLines}</span>
|
|
149
|
-
<span className="claude-code-tool badge">{totalEdits
|
|
150
|
+
<span className="claude-code-tool badge">{totalEdits === 1
|
|
151
|
+
? nls.localize('theia/ai/claude-code/oneEdit', '1 edit')
|
|
152
|
+
: nls.localize('theia/ai/claude-code/editsCount', '{0} edits', totalEdits)}</span>
|
|
150
153
|
{replaceAllCount > 0 && (
|
|
151
|
-
<span className="claude-code-tool badge">{replaceAllCount} replace-all</span>
|
|
154
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/replaceAllCount', '{0} replace-all', replaceAllCount)}</span>
|
|
152
155
|
)}
|
|
153
156
|
</div>
|
|
154
157
|
</>
|
|
@@ -157,25 +160,25 @@ const MultiEditToolComponent: React.FC<{
|
|
|
157
160
|
const expandedContent = (
|
|
158
161
|
<div className="claude-code-tool details">
|
|
159
162
|
<div className="claude-code-tool detail-row">
|
|
160
|
-
<span className="claude-code-tool detail-label">File Path</span>
|
|
163
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/filePath', 'File Path')}</span>
|
|
161
164
|
<code className="claude-code-tool detail-value">{input.file_path}</code>
|
|
162
165
|
</div>
|
|
163
166
|
<div className="claude-code-tool detail-row">
|
|
164
|
-
<span className="claude-code-tool detail-label">Total Edits</span>
|
|
167
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/totalEdits', 'Total Edits')}</span>
|
|
165
168
|
<span className="claude-code-tool detail-value">{totalEdits}</span>
|
|
166
169
|
</div>
|
|
167
170
|
{input.edits.map((edit, index) => (
|
|
168
171
|
<div key={index} className="claude-code-tool edit-preview">
|
|
169
172
|
<div className="claude-code-tool edit-preview-header">
|
|
170
|
-
<span className="claude-code-tool edit-preview-title">Edit {index + 1}</span>
|
|
173
|
+
<span className="claude-code-tool edit-preview-title">{nls.localize('theia/ai/claude-code/editNumber', 'Edit {0}', index + 1)}</span>
|
|
171
174
|
{edit.replace_all && (
|
|
172
175
|
<span className="claude-code-tool edit-preview-badge">
|
|
173
|
-
Replace
|
|
176
|
+
{nls.localizeByDefault('Replace All')}
|
|
174
177
|
</span>
|
|
175
178
|
)}
|
|
176
179
|
</div>
|
|
177
180
|
<div className="claude-code-tool detail-row">
|
|
178
|
-
<span className="claude-code-tool detail-label">From</span>
|
|
181
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/from', 'From')}</span>
|
|
179
182
|
<pre className="claude-code-tool detail-value code-preview">
|
|
180
183
|
{edit.old_string.length > 100
|
|
181
184
|
? edit.old_string.substring(0, 100) + '...'
|
|
@@ -183,7 +186,7 @@ const MultiEditToolComponent: React.FC<{
|
|
|
183
186
|
</pre>
|
|
184
187
|
</div>
|
|
185
188
|
<div className="claude-code-tool detail-row">
|
|
186
|
-
<span className="claude-code-tool detail-label">To</span>
|
|
189
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/to', 'To')}</span>
|
|
187
190
|
<pre className="claude-code-tool detail-value code-preview">
|
|
188
191
|
{edit.new_string.length > 100
|
|
189
192
|
? edit.new_string.substring(0, 100) + '...'
|
|
@@ -26,6 +26,7 @@ import { EditorManager } from '@theia/editor/lib/browser';
|
|
|
26
26
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
27
27
|
import { ClaudeCodeToolCallChatResponseContent } from '../claude-code-tool-call-content';
|
|
28
28
|
import { CollapsibleToolRenderer } from './collapsible-tool-renderer';
|
|
29
|
+
import { nls } from '@theia/core';
|
|
29
30
|
|
|
30
31
|
interface ReadToolInput {
|
|
31
32
|
file_path: string;
|
|
@@ -63,7 +64,7 @@ export class ReadToolRenderer implements ChatResponsePartRenderer<ToolCallChatRe
|
|
|
63
64
|
/>;
|
|
64
65
|
} catch (error) {
|
|
65
66
|
console.warn('Failed to parse Read tool input:', error);
|
|
66
|
-
return <div className="claude-code-tool error">Failed to parse Read tool data</div>;
|
|
67
|
+
return <div className="claude-code-tool error">{nls.localize('theia/ai/claude-code/failedToParseReadToolData', 'Failed to parse Read tool data')}</div>;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
@@ -114,12 +115,12 @@ const ReadToolComponent: React.FC<{
|
|
|
114
115
|
const compactHeader = (
|
|
115
116
|
<>
|
|
116
117
|
<div className="claude-code-tool header-left">
|
|
117
|
-
<span className="claude-code-tool title">Reading</span>
|
|
118
|
+
<span className="claude-code-tool title">{nls.localize('theia/ai/claude-code/reading', 'Reading')}</span>
|
|
118
119
|
<span className={`${getIcon(input.file_path)} claude-code-tool icon`} />
|
|
119
120
|
<span
|
|
120
121
|
className="claude-code-tool file-name clickable-element"
|
|
121
122
|
onClick={handleOpenFile}
|
|
122
|
-
title=
|
|
123
|
+
title={nls.localize('theia/ai/claude-code/openFileTooltip', 'Click to open file in editor')}
|
|
123
124
|
>
|
|
124
125
|
{getFileName(input.file_path)}
|
|
125
126
|
</span>
|
|
@@ -127,10 +128,10 @@ const ReadToolComponent: React.FC<{
|
|
|
127
128
|
</div>
|
|
128
129
|
<div className="claude-code-tool header-right">
|
|
129
130
|
{isEntireFile && (
|
|
130
|
-
<span className="claude-code-tool badge">Entire File</span>
|
|
131
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/entireFile', 'Entire File')}</span>
|
|
131
132
|
)}
|
|
132
133
|
{!isEntireFile && (
|
|
133
|
-
<span className="claude-code-tool badge">Partial</span>
|
|
134
|
+
<span className="claude-code-tool badge">{nls.localize('theia/ai/claude-code/partial', 'Partial')}</span>
|
|
134
135
|
)}
|
|
135
136
|
</div>
|
|
136
137
|
</>
|
|
@@ -139,24 +140,26 @@ const ReadToolComponent: React.FC<{
|
|
|
139
140
|
const expandedContent = (
|
|
140
141
|
<div className="claude-code-tool details">
|
|
141
142
|
<div className="claude-code-tool detail-row">
|
|
142
|
-
<span className="claude-code-tool detail-label">File Path</span>
|
|
143
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/filePath', 'File Path')}</span>
|
|
143
144
|
<code className="claude-code-tool detail-value">{input.file_path}</code>
|
|
144
145
|
</div>
|
|
145
146
|
{input.offset && (
|
|
146
147
|
<div className="claude-code-tool detail-row">
|
|
147
|
-
<span className="claude-code-tool detail-label">Starting Line</span>
|
|
148
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/startingLine', 'Starting Line')}</span>
|
|
148
149
|
<span className="claude-code-tool detail-value">{input.offset}</span>
|
|
149
150
|
</div>
|
|
150
151
|
)}
|
|
151
152
|
{input.limit && (
|
|
152
153
|
<div className="claude-code-tool detail-row">
|
|
153
|
-
<span className="claude-code-tool detail-label">Line Limit</span>
|
|
154
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/lineLimit', 'Line Limit')}</span>
|
|
154
155
|
<span className="claude-code-tool detail-value">{input.limit}</span>
|
|
155
156
|
</div>
|
|
156
157
|
)}
|
|
157
158
|
<div className="claude-code-tool detail-row">
|
|
158
|
-
<span className="claude-code-tool detail-label">Read Mode</span>
|
|
159
|
-
<span className="claude-code-tool detail-value">{isEntireFile
|
|
159
|
+
<span className="claude-code-tool detail-label">{nls.localize('theia/ai/claude-code/readMode', 'Read Mode')}</span>
|
|
160
|
+
<span className="claude-code-tool detail-value">{isEntireFile
|
|
161
|
+
? nls.localize('theia/ai/claude-code/entireFile', 'Entire File')
|
|
162
|
+
: nls.localize('theia/ai/claude-code/partial', 'Partial')}</span>
|
|
160
163
|
</div>
|
|
161
164
|
</div>
|
|
162
165
|
);
|