@datalayer/agent-runtimes 1.3.83 → 1.3.85
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/chat/ChatFloating.d.ts +5 -4
- package/lib/chat/ChatFloating.js +8 -6
- package/lib/chat/ChatLanguage.d.ts +17 -0
- package/lib/chat/ChatLanguage.js +29 -0
- package/lib/chat/assistant/AssistantStage.d.ts +4 -4
- package/lib/chat/assistant/AssistantStage.js +4 -2
- package/lib/chat/assistant/BalloonParts.d.ts +2 -1
- package/lib/chat/assistant/BalloonParts.js +12 -5
- package/lib/chat/assistant/BalloonVisual.js +3 -1
- package/lib/chat/assistant/ConversationBalloon.d.ts +1 -1
- package/lib/chat/assistant/ConversationBalloon.js +3 -2
- package/lib/chat/assistant/SpeechBalloon.d.ts +1 -1
- package/lib/chat/assistant/SpeechBalloon.js +10 -7
- package/lib/chat/assistant/toolLine.d.ts +8 -4
- package/lib/chat/assistant/toolLine.js +13 -9
- package/lib/chat/base/ChatBase.js +30 -11
- package/lib/chat/base/loopElement.d.ts +53 -0
- package/lib/chat/base/loopElement.js +78 -0
- package/lib/chat/base/loopWindow.d.ts +31 -0
- package/lib/chat/base/loopWindow.js +74 -0
- package/lib/chat/display/EmptyState.js +3 -1
- package/lib/chat/index.d.ts +2 -0
- package/lib/chat/index.js +3 -0
- package/lib/chat/messages/ChatMessages.js +3 -1
- package/lib/chat/messages/TurnFooter.js +3 -1
- package/lib/chat/prompt/InputPrompt.js +3 -1
- package/lib/chat/prompt/InputPromptLexical.js +3 -1
- package/lib/chat/prompt/footer/InPromptFooter.js +3 -1
- package/lib/chat/tools/ToolApprovalBanner.js +5 -3
- package/lib/chat/tools/ToolApprovalDialog.js +5 -3
- package/lib/chat/tools/ToolCallDisplay.js +29 -25
- package/lib/chat/words.d.ts +102 -0
- package/lib/chat/words.js +460 -0
- package/lib/components/a2ui/custom/index.d.ts +39 -0
- package/lib/components/a2ui/custom/index.js +95 -0
- package/lib/components/a2ui/custom/sandbox.d.ts +73 -0
- package/lib/components/a2ui/custom/sandbox.js +188 -0
- package/lib/components/a2ui/datalayer/FileUpload.d.ts +10 -2
- package/lib/components/a2ui/datalayer/FileUpload.js +10 -7
- package/lib/components/a2ui/datalayer/Form.d.ts +2 -0
- package/lib/components/a2ui/datalayer/Form.js +9 -2
- package/lib/components/a2ui/datalayer/formWidgets.d.ts +19 -0
- package/lib/components/a2ui/datalayer/formWidgets.js +51 -0
- package/lib/components/a2ui/datalayer/index.d.ts +1 -1
- package/lib/components/a2ui/datalayer/index.js +1 -1
- package/lib/components/a2ui/datalayer/schema.d.ts +10 -0
- package/lib/components/a2ui/datalayer/schema.js +12 -1
- package/lib/components/a2ui/index.d.ts +1 -0
- package/lib/components/a2ui/index.js +1 -0
- package/lib/components/a2ui/visibleWhen.d.ts +12 -1
- package/lib/components/a2ui/visibleWhen.js +24 -3
- package/lib/components/inspector/AgentInspector.d.ts +25 -44
- package/lib/components/inspector/AgentInspector.js +27 -215
- package/lib/components/inspector/AgentInspectorDialog.d.ts +6 -6
- package/lib/components/inspector/AgentInspectorDialog.js +2 -2
- package/lib/components/inspector/a2aSpans.d.ts +51 -0
- package/lib/components/inspector/a2aSpans.js +373 -0
- package/lib/components/inspector/agentSpans.d.ts +120 -0
- package/lib/components/inspector/agentSpans.js +253 -0
- package/lib/components/inspector/chatSpans.d.ts +36 -0
- package/lib/components/inspector/chatSpans.js +50 -0
- package/lib/components/inspector/classify.d.ts +11 -8
- package/lib/components/inspector/classify.js +23 -24
- package/lib/components/inspector/index.d.ts +7 -7
- package/lib/components/inspector/index.js +7 -7
- package/lib/components/teams/A2ATeamGraph.d.ts +4 -4
- package/lib/components/teams/SceneTranscript.d.ts +29 -0
- package/lib/components/teams/SceneTranscript.js +54 -0
- package/lib/components/teams/SceneView.d.ts +41 -0
- package/lib/components/teams/SceneView.js +28 -0
- package/lib/components/teams/index.d.ts +3 -0
- package/lib/components/teams/index.js +3 -0
- package/lib/components/teams/sceneTranscript.d.ts +74 -0
- package/lib/components/teams/sceneTranscript.js +294 -0
- package/lib/components/teams/teamConnections.d.ts +2 -2
- package/lib/components/teams/teamConnections.js +3 -3
- package/lib/components/teams/useA2ATeam.d.ts +4 -4
- package/lib/components/teams/useA2ATeam.js +50 -46
- package/lib/examples/AgentA2ATeamExample.d.ts +10 -9
- package/lib/examples/AgentA2ATeamExample.js +70 -60
- package/lib/examples/AssistantExample.js +2 -2
- package/lib/loop/apps/AppComposer.d.ts +40 -4
- package/lib/loop/apps/AppComposer.js +194 -19
- package/lib/loop/apps/AppRenderer.d.ts +21 -3
- package/lib/loop/apps/AppRenderer.js +88 -48
- package/lib/loop/apps/appspec.d.ts +13 -1
- package/lib/loop/apps/appspec.js +305 -12
- package/lib/loop/apps/checks.d.ts +14 -0
- package/lib/loop/apps/checks.js +276 -5
- package/lib/loop/apps/composer.d.ts +21 -10
- package/lib/loop/apps/composer.js +41 -8
- package/lib/loop/apps/customComponents.d.ts +41 -0
- package/lib/loop/apps/customComponents.js +260 -0
- package/lib/loop/apps/hostTools.d.ts +8 -1
- package/lib/loop/apps/hostTools.js +9 -0
- package/lib/loop/apps/index.d.ts +1 -0
- package/lib/loop/apps/index.js +1 -0
- package/lib/loop/apps/language.d.ts +68 -0
- package/lib/loop/apps/language.js +275 -0
- package/lib/loop/apps/settingsInputs.d.ts +29 -0
- package/lib/loop/apps/settingsInputs.js +147 -0
- package/lib/loop/apps/uploads.d.ts +43 -0
- package/lib/loop/apps/uploads.js +66 -0
- package/lib/loop/core/a2uiComponents.d.ts +10 -0
- package/lib/loop/core/a2uiComponents.js +15 -0
- package/lib/loop/core/index.d.ts +15 -1
- package/lib/loop/core/index.js +3 -0
- package/lib/loop/embed/AppEmbed.d.ts +25 -3
- package/lib/loop/embed/AppEmbed.js +106 -18
- package/lib/loop/embed/element.d.ts +5 -0
- package/lib/loop/embed/element.js +84 -5
- package/lib/loop/embed/embedConfig.d.ts +8 -0
- package/lib/loop/embed/embedConfig.js +18 -0
- package/lib/loop/embed/embedSession.d.ts +14 -0
- package/lib/loop/embed/embedSession.js +34 -0
- package/lib/loop/embed/hostBridge.d.ts +50 -3
- package/lib/loop/embed/hostBridge.js +22 -2
- package/lib/loop/index.d.ts +4 -3
- package/lib/loop/index.js +4 -3
- package/lib/loop/plugins/a2ui-surface/InlineSurface.d.ts +7 -1
- package/lib/loop/plugins/a2ui-surface/InlineSurface.js +7 -2
- package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +4 -1
- package/lib/loop/plugins/a2ui-surface/ownComponents.d.ts +6 -0
- package/lib/loop/plugins/a2ui-surface/ownComponents.js +30 -0
- package/lib/loop/plugins/app-components/index.d.ts +26 -0
- package/lib/loop/plugins/app-components/index.js +56 -0
- package/lib/loop/plugins/app-elements/AppElements.d.ts +27 -0
- package/lib/loop/plugins/app-elements/AppElements.js +79 -0
- package/lib/loop/plugins/app-elements/index.d.ts +20 -0
- package/lib/loop/plugins/app-elements/index.js +43 -0
- package/lib/loop/plugins/app-page/AppPage.d.ts +9 -0
- package/lib/loop/plugins/app-page/AppPage.js +106 -8
- package/lib/loop/plugins/app-page/appPageModel.d.ts +17 -1
- package/lib/loop/plugins/app-page/appPageModel.js +122 -4
- package/lib/loop/plugins/app-page/index.d.ts +1 -0
- package/lib/loop/plugins/app-page/index.js +1 -0
- package/lib/loop/plugins/app-page/pageRun.d.ts +46 -0
- package/lib/loop/plugins/app-page/pageRun.js +111 -0
- package/lib/loop/plugins/assistant/index.js +8 -6
- package/lib/loop/plugins/chat/ChatView.js +16 -6
- package/lib/loop/plugins/chat/index.d.ts +1 -1
- package/lib/loop/plugins/chat/index.js +2 -1
- package/lib/models/PageTag.d.ts +1 -1
- package/lib/protocols/BrowserAgentAdapter.d.ts +8 -6
- package/lib/protocols/BrowserAgentAdapter.js +13 -10
- package/lib/runtimes/browser/a2aPeer.d.ts +2 -1
- package/lib/runtimes/browser/protocol.d.ts +1 -1
- package/lib/specs/actions.js +78 -1
- package/lib/specs/apps.d.ts +5 -0
- package/lib/specs/apps.js +1518 -216
- package/lib/specs/appspecSchema.js +630 -3
- package/lib/specs/teams/teams.d.ts +3 -0
- package/lib/specs/teams/teams.js +249 -0
- package/lib/specs/uiPlugins.js +6 -1
- package/lib/types/agentspecs.d.ts +200 -1
- package/lib/types/chat.d.ts +6 -5
- package/lib/types/teams.d.ts +13 -2
- package/package.json +2 -2
- package/scripts/codegen/generate_apps.py +20 -2
- package/scripts/codegen/generate_teams.py +15 -2
- package/lib/components/inspector/JsonTree.d.ts +0 -24
- package/lib/components/inspector/JsonTree.js +0 -89
- package/lib/components/inspector/a2aInspect.d.ts +0 -56
- package/lib/components/inspector/a2aInspect.js +0 -478
- package/lib/components/inspector/agentInspector.d.ts +0 -179
- package/lib/components/inspector/agentInspector.js +0 -267
- package/lib/components/inspector/chatInspect.d.ts +0 -38
- package/lib/components/inspector/chatInspect.js +0 -65
|
@@ -14,30 +14,31 @@ import { Button, Text } from '@primer/react';
|
|
|
14
14
|
import { Box } from '@datalayer/primer-addons';
|
|
15
15
|
import { ChevronDownIcon, ChevronRightIcon, ToolsIcon, CheckCircleIcon, XCircleIcon, ClockIcon, AlertIcon, } from '@primer/octicons-react';
|
|
16
16
|
import { SpecMark, hasMark } from '../marks';
|
|
17
|
+
import { useChatWords } from '../ChatLanguage';
|
|
17
18
|
/**
|
|
18
19
|
* Get status icon and color based on tool call status
|
|
19
20
|
*/
|
|
20
|
-
function getStatusDisplay(status, errorType) {
|
|
21
|
+
function getStatusDisplay(status, errorType, chatText) {
|
|
21
22
|
switch (status) {
|
|
22
23
|
case 'inProgress':
|
|
23
24
|
return {
|
|
24
25
|
icon: _jsx(ClockIcon, { size: 14 }),
|
|
25
26
|
color: 'attention.fg',
|
|
26
|
-
label:
|
|
27
|
+
label: chatText.toolPreparing,
|
|
27
28
|
bgColor: 'attention.subtle',
|
|
28
29
|
};
|
|
29
30
|
case 'executing':
|
|
30
31
|
return {
|
|
31
32
|
icon: _jsx(ClockIcon, { size: 14 }),
|
|
32
33
|
color: 'attention.fg',
|
|
33
|
-
label:
|
|
34
|
+
label: chatText.toolExecuting,
|
|
34
35
|
bgColor: 'attention.subtle',
|
|
35
36
|
};
|
|
36
37
|
case 'complete':
|
|
37
38
|
return {
|
|
38
39
|
icon: _jsx(CheckCircleIcon, { size: 14 }),
|
|
39
40
|
color: 'success.fg',
|
|
40
|
-
label:
|
|
41
|
+
label: chatText.toolComplete,
|
|
41
42
|
bgColor: 'success.subtle',
|
|
42
43
|
};
|
|
43
44
|
case 'error':
|
|
@@ -46,7 +47,7 @@ function getStatusDisplay(status, errorType) {
|
|
|
46
47
|
return {
|
|
47
48
|
icon: _jsx(AlertIcon, { size: 14 }),
|
|
48
49
|
color: 'danger.fg',
|
|
49
|
-
label:
|
|
50
|
+
label: chatText.toolExecutionFailed,
|
|
50
51
|
bgColor: 'danger.subtle',
|
|
51
52
|
};
|
|
52
53
|
}
|
|
@@ -54,7 +55,7 @@ function getStatusDisplay(status, errorType) {
|
|
|
54
55
|
return {
|
|
55
56
|
icon: _jsx(XCircleIcon, { size: 14 }),
|
|
56
57
|
color: 'severe.fg',
|
|
57
|
-
label:
|
|
58
|
+
label: chatText.toolCodeError,
|
|
58
59
|
bgColor: 'severe.subtle',
|
|
59
60
|
};
|
|
60
61
|
}
|
|
@@ -62,14 +63,14 @@ function getStatusDisplay(status, errorType) {
|
|
|
62
63
|
return {
|
|
63
64
|
icon: _jsx(AlertIcon, { size: 14 }),
|
|
64
65
|
color: 'attention.fg',
|
|
65
|
-
label:
|
|
66
|
+
label: chatText.toolExited,
|
|
66
67
|
bgColor: 'attention.subtle',
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
70
|
return {
|
|
70
71
|
icon: _jsx(XCircleIcon, { size: 14 }),
|
|
71
72
|
color: 'danger.fg',
|
|
72
|
-
label:
|
|
73
|
+
label: chatText.toolFailed,
|
|
73
74
|
bgColor: 'danger.subtle',
|
|
74
75
|
};
|
|
75
76
|
default:
|
|
@@ -95,10 +96,10 @@ function formatToolName(name) {
|
|
|
95
96
|
/**
|
|
96
97
|
* Get a brief summary of the tool arguments
|
|
97
98
|
*/
|
|
98
|
-
function getArgsSummary(args) {
|
|
99
|
+
function getArgsSummary(args, chatText) {
|
|
99
100
|
const entries = Object.entries(args);
|
|
100
101
|
if (entries.length === 0)
|
|
101
|
-
return
|
|
102
|
+
return chatText.noParameters;
|
|
102
103
|
const summary = entries
|
|
103
104
|
.slice(0, 2)
|
|
104
105
|
.map(([key, value]) => {
|
|
@@ -111,7 +112,7 @@ function getArgsSummary(args) {
|
|
|
111
112
|
})
|
|
112
113
|
.join(', ');
|
|
113
114
|
if (entries.length > 2) {
|
|
114
|
-
return `${summary} (
|
|
115
|
+
return `${summary} ${chatText.moreArguments(entries.length - 2)}`;
|
|
115
116
|
}
|
|
116
117
|
return summary;
|
|
117
118
|
}
|
|
@@ -126,6 +127,7 @@ function getArgsSummary(args) {
|
|
|
126
127
|
* - Rich error display distinguishing execution errors from code errors
|
|
127
128
|
*/
|
|
128
129
|
export function ToolCallDisplay({ toolCallId, toolName, args, result, status, error, executionResult, codeError, exitCode, executionError, approvalRequired = false, approvalState, approvalDecisionSource, onApprove, onDeny, approvalLoading = false, marks, summary, density = 'comfortable', }) {
|
|
130
|
+
const chatText = useChatWords();
|
|
129
131
|
const compact = density === 'compact';
|
|
130
132
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
131
133
|
// Determine effective exit code from props or execution result
|
|
@@ -142,9 +144,9 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
142
144
|
? 'exit'
|
|
143
145
|
: 'unknown'
|
|
144
146
|
: undefined;
|
|
145
|
-
const statusDisplay = getStatusDisplay(status, errorType);
|
|
147
|
+
const statusDisplay = getStatusDisplay(status, errorType, chatText);
|
|
146
148
|
const displayName = formatToolName(toolName);
|
|
147
|
-
const argsSummary = summary || getArgsSummary(args);
|
|
149
|
+
const argsSummary = summary || getArgsSummary(args, chatText);
|
|
148
150
|
const resultObject = result && typeof result === 'object'
|
|
149
151
|
? result
|
|
150
152
|
: undefined;
|
|
@@ -209,7 +211,9 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
209
211
|
fontSize: 0,
|
|
210
212
|
fontWeight: 'medium',
|
|
211
213
|
color: statusDisplay.color,
|
|
212
|
-
}, children: isPendingApproval
|
|
214
|
+
}, children: isPendingApproval
|
|
215
|
+
? chatText.awaitingApproval
|
|
216
|
+
: statusDisplay.label })] }), !isExpanded && (_jsx(Text, { sx: {
|
|
213
217
|
fontSize: 0,
|
|
214
218
|
color: 'fg.muted',
|
|
215
219
|
overflow: 'hidden',
|
|
@@ -225,7 +229,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
225
229
|
textTransform: 'uppercase',
|
|
226
230
|
letterSpacing: '0.05em',
|
|
227
231
|
mb: 2,
|
|
228
|
-
}, children:
|
|
232
|
+
}, children: chatText.parameters }), _jsx(Box, { sx: {
|
|
229
233
|
backgroundColor: 'canvas.inset',
|
|
230
234
|
borderRadius: 2,
|
|
231
235
|
border: '1px solid',
|
|
@@ -242,7 +246,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
242
246
|
wordBreak: 'break-word',
|
|
243
247
|
}, children: Object.keys(args).length > 0
|
|
244
248
|
? JSON.stringify(args, null, 2)
|
|
245
|
-
:
|
|
249
|
+
: `(${chatText.noParameters})` }) })] }), status === 'complete' && result !== undefined && (_jsxs(Box, { children: [_jsx(Text, { sx: {
|
|
246
250
|
display: 'block',
|
|
247
251
|
fontSize: 0,
|
|
248
252
|
fontWeight: 'semibold',
|
|
@@ -250,7 +254,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
250
254
|
textTransform: 'uppercase',
|
|
251
255
|
letterSpacing: '0.05em',
|
|
252
256
|
mb: 2,
|
|
253
|
-
}, children:
|
|
257
|
+
}, children: chatText.result }), _jsx(Box, { sx: {
|
|
254
258
|
backgroundColor: 'success.subtle',
|
|
255
259
|
borderRadius: 2,
|
|
256
260
|
border: '1px solid',
|
|
@@ -267,7 +271,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
267
271
|
wordBreak: 'break-word',
|
|
268
272
|
}, children: typeof result === 'string'
|
|
269
273
|
? result
|
|
270
|
-
: JSON.stringify(result, null, 2) }) })] })), approvalRequired && (_jsx(Box, { sx: { mt: status === 'complete' && result !== undefined ? 3 : 0 }, children: approvalState === 'approved' ? (_jsxs(Box, { children: [_jsx(Text, { sx: { color: 'success.fg', fontSize: 1, display: 'block' }, children:
|
|
274
|
+
: JSON.stringify(result, null, 2) }) })] })), approvalRequired && (_jsx(Box, { sx: { mt: status === 'complete' && result !== undefined ? 3 : 0 }, children: approvalState === 'approved' ? (_jsxs(Box, { children: [_jsx(Text, { sx: { color: 'success.fg', fontSize: 1, display: 'block' }, children: chatText.approvedRunning }), approvalDecisionSource === 'external' && (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block' }, children: chatText.approvedElsewhere }))] })) : approvalState === 'denied' ? (_jsxs(Box, { children: [_jsx(Text, { sx: { color: 'danger.fg', fontSize: 1, display: 'block' }, children: chatText.deniedWontRun }), approvalDecisionSource === 'external' && (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 0, display: 'block' }, children: chatText.decidedElsewhere }))] })) : (_jsxs(_Fragment, { children: [_jsx(Text, { sx: { fontSize: 1, color: 'fg.default' }, children: chatText.approvalNeeded }), _jsxs(Box, { sx: { mt: 2, display: 'flex', gap: 2 }, children: [_jsx(Button, { size: "small", onClick: onApprove, disabled: approvalLoading || !onApprove, children: chatText.approve }), _jsx(Button, { size: "small", variant: "danger", onClick: onDeny, disabled: approvalLoading || !onDeny, children: chatText.deny })] })] })) })), status === 'error' && effectiveExecutionError && (_jsxs(Box, { children: [_jsxs(Text, { sx: {
|
|
271
275
|
display: 'block',
|
|
272
276
|
fontSize: 0,
|
|
273
277
|
fontWeight: 'semibold',
|
|
@@ -275,7 +279,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
275
279
|
textTransform: 'uppercase',
|
|
276
280
|
letterSpacing: '0.05em',
|
|
277
281
|
mb: 2,
|
|
278
|
-
}, children: [_jsx(AlertIcon, { size: 12 }), "
|
|
282
|
+
}, children: [_jsx(AlertIcon, { size: 12 }), " ", chatText.executionError] }), _jsxs(Box, { sx: {
|
|
279
283
|
backgroundColor: 'danger.subtle',
|
|
280
284
|
borderRadius: 2,
|
|
281
285
|
border: '1px solid',
|
|
@@ -286,7 +290,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
286
290
|
fontSize: 0,
|
|
287
291
|
color: 'fg.muted',
|
|
288
292
|
mt: 1,
|
|
289
|
-
}, children:
|
|
293
|
+
}, children: chatText.executionErrorWhy })] })] })), status === 'error' && effectiveCodeError && (_jsxs(Box, { children: [_jsxs(Text, { sx: {
|
|
290
294
|
display: 'block',
|
|
291
295
|
fontSize: 0,
|
|
292
296
|
fontWeight: 'semibold',
|
|
@@ -294,7 +298,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
294
298
|
textTransform: 'uppercase',
|
|
295
299
|
letterSpacing: '0.05em',
|
|
296
300
|
mb: 2,
|
|
297
|
-
}, children: ["
|
|
301
|
+
}, children: [chatText.toolCodeError, ": ", effectiveCodeError.name] }), _jsxs(Box, { sx: {
|
|
298
302
|
backgroundColor: 'severe.subtle',
|
|
299
303
|
borderRadius: 2,
|
|
300
304
|
border: '1px solid',
|
|
@@ -326,7 +330,7 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
326
330
|
textTransform: 'uppercase',
|
|
327
331
|
letterSpacing: '0.05em',
|
|
328
332
|
mb: 2,
|
|
329
|
-
}, children:
|
|
333
|
+
}, children: chatText.errorHeading }), _jsx(Box, { sx: {
|
|
330
334
|
backgroundColor: 'danger.subtle',
|
|
331
335
|
borderRadius: 2,
|
|
332
336
|
border: '1px solid',
|
|
@@ -342,18 +346,18 @@ export function ToolCallDisplay({ toolCallId, toolName, args, result, status, er
|
|
|
342
346
|
textTransform: 'uppercase',
|
|
343
347
|
letterSpacing: '0.05em',
|
|
344
348
|
mb: 2,
|
|
345
|
-
}, children: [_jsx(AlertIcon, { size: 12 }), "
|
|
349
|
+
}, children: [_jsx(AlertIcon, { size: 12 }), " ", chatText.processExited] }), _jsxs(Box, { sx: {
|
|
346
350
|
backgroundColor: 'attention.subtle',
|
|
347
351
|
borderRadius: 2,
|
|
348
352
|
border: '1px solid',
|
|
349
353
|
borderColor: 'attention.muted',
|
|
350
354
|
p: 2,
|
|
351
|
-
}, children: [
|
|
355
|
+
}, children: [_jsx(Text, { sx: { fontSize: 1, color: 'attention.fg' }, children: chatText.exitedWithCode(String(effectiveExitCode)) }), _jsx(Text, { sx: {
|
|
352
356
|
display: 'block',
|
|
353
357
|
fontSize: 0,
|
|
354
358
|
color: 'fg.muted',
|
|
355
359
|
mt: 1,
|
|
356
|
-
}, children:
|
|
360
|
+
}, children: chatText.nonZeroExit })] }), effectiveExitOutput && (_jsx(Box, { sx: {
|
|
357
361
|
mt: 2,
|
|
358
362
|
backgroundColor: 'canvas.inset',
|
|
359
363
|
borderRadius: 2,
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** A tool line's words around the tool's name: "Using " list_invoices "…". */
|
|
2
|
+
export type AroundName = {
|
|
3
|
+
before: string;
|
|
4
|
+
after: string;
|
|
5
|
+
};
|
|
6
|
+
/** What the chat says itself, in one language. */
|
|
7
|
+
export type ChatWords = {
|
|
8
|
+
/** The prompt's placeholder in a LOOP workspace. */
|
|
9
|
+
placeholder: string;
|
|
10
|
+
/** The prompt's placeholder when nothing else says one. */
|
|
11
|
+
typeMessage: string;
|
|
12
|
+
/** The prompt's name for a screen reader. */
|
|
13
|
+
messageInput: string;
|
|
14
|
+
send: string;
|
|
15
|
+
stop: string;
|
|
16
|
+
pauseKernelBusy: string;
|
|
17
|
+
/** The starters under the prompt, for a screen reader. */
|
|
18
|
+
suggestedPrompts: string;
|
|
19
|
+
/** A demo's shared key has run out. */
|
|
20
|
+
demoKeyExpired: string;
|
|
21
|
+
/** The person's key has run out. */
|
|
22
|
+
keyExpired: string;
|
|
23
|
+
/** The empty chat's title. */
|
|
24
|
+
startConversation: string;
|
|
25
|
+
/** The empty chat's line when it has no starters. */
|
|
26
|
+
sendToBegin: string;
|
|
27
|
+
copyTurn: string;
|
|
28
|
+
removeTurn: string;
|
|
29
|
+
/** What the agent says when its answer failed. */
|
|
30
|
+
error: (message: string) => string;
|
|
31
|
+
/** While the agent thinks, in the balloon. */
|
|
32
|
+
thinking: string;
|
|
33
|
+
toolPreparing: string;
|
|
34
|
+
toolExecuting: string;
|
|
35
|
+
toolComplete: string;
|
|
36
|
+
toolExecutionFailed: string;
|
|
37
|
+
toolCodeError: string;
|
|
38
|
+
toolExited: string;
|
|
39
|
+
toolFailed: string;
|
|
40
|
+
awaitingApproval: string;
|
|
41
|
+
noParameters: string;
|
|
42
|
+
/** More arguments than the summary shows: "(+2 more)". */
|
|
43
|
+
moreArguments: (count: number) => string;
|
|
44
|
+
parameters: string;
|
|
45
|
+
result: string;
|
|
46
|
+
executionError: string;
|
|
47
|
+
executionErrorWhy: string;
|
|
48
|
+
errorHeading: string;
|
|
49
|
+
processExited: string;
|
|
50
|
+
exitedWithCode: (code: number | string) => string;
|
|
51
|
+
nonZeroExit: string;
|
|
52
|
+
toolRunning: AroundName;
|
|
53
|
+
toolDone: AroundName;
|
|
54
|
+
toolFailedLine: AroundName;
|
|
55
|
+
approve: string;
|
|
56
|
+
deny: string;
|
|
57
|
+
approveAll: string;
|
|
58
|
+
approvalNeeded: string;
|
|
59
|
+
approvedRunning: string;
|
|
60
|
+
approvedElsewhere: string;
|
|
61
|
+
deniedWontRun: string;
|
|
62
|
+
decidedElsewhere: string;
|
|
63
|
+
approvalsPending: (count: number) => string;
|
|
64
|
+
toolApprovalsPending: string;
|
|
65
|
+
collapse: string;
|
|
66
|
+
review: string;
|
|
67
|
+
dismiss: string;
|
|
68
|
+
approvalTitle: string;
|
|
69
|
+
arguments: string;
|
|
70
|
+
approvalWarning: string;
|
|
71
|
+
rememberChoice: string;
|
|
72
|
+
/** An approval waits and cannot be answered in the balloon itself. */
|
|
73
|
+
waitingOpen: string;
|
|
74
|
+
/** It waits on the person's yes. */
|
|
75
|
+
waitingForYou: string;
|
|
76
|
+
/** Its deployment is paused. */
|
|
77
|
+
paused: string;
|
|
78
|
+
/** How many more approvals wait: "2 more". */
|
|
79
|
+
moreWaiting: (count: number) => string;
|
|
80
|
+
showMore: string;
|
|
81
|
+
showLess: string;
|
|
82
|
+
now: string;
|
|
83
|
+
conversation: string;
|
|
84
|
+
suggestions: string;
|
|
85
|
+
expandConversation: string;
|
|
86
|
+
expand: string;
|
|
87
|
+
expandWhat: (what: string) => string;
|
|
88
|
+
theVisual: string;
|
|
89
|
+
/** The floating button's tooltip. */
|
|
90
|
+
talkTo: (name: string) => string;
|
|
91
|
+
};
|
|
92
|
+
/** The chat's words, by language. Another language reads English. */
|
|
93
|
+
export declare const CHAT_WORDS: Record<string, ChatWords>;
|
|
94
|
+
/** The English words: what the chat says when nothing says a language. */
|
|
95
|
+
export declare const ENGLISH_CHAT_WORDS: ChatWords;
|
|
96
|
+
/**
|
|
97
|
+
* The language the chat speaks to a person who prefers these, as BCP 47
|
|
98
|
+
* tags them: the first it is said in (`fr-CA` reads `fr`), else English.
|
|
99
|
+
*/
|
|
100
|
+
export declare function chatLanguage(preferred: readonly string[]): string;
|
|
101
|
+
/** The chat's words in a language: its own, else its language's, else English. */
|
|
102
|
+
export declare function chatWords(language: string | undefined): ChatWords;
|