@theoremjs/react 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +246 -2
- package/client/attachment-hover-preview.d.ts +11 -0
- package/client/attachment-hover-preview.js +36 -0
- package/client/audio-level.d.ts +5 -0
- package/client/audio-level.js +24 -0
- package/client/composer-attachments.d.ts +30 -0
- package/client/composer-attachments.js +33 -0
- package/client/composer-drawer.d.ts +19 -0
- package/client/composer-drawer.js +15 -0
- package/client/composer-hints.d.ts +25 -0
- package/client/composer-hints.js +20 -0
- package/client/composer-primary.d.ts +16 -0
- package/client/composer-primary.js +25 -0
- package/client/decision-transport.d.ts +48 -0
- package/client/decision-transport.js +102 -0
- package/client/decode-composer-draft.d.ts +11 -0
- package/client/decode-composer-draft.js +12 -0
- package/client/encode-composer-draft.d.ts +9 -0
- package/client/encode-composer-draft.js +34 -0
- package/client/encode-files.d.ts +18 -0
- package/client/encode-files.js +54 -0
- package/client/failure.d.ts +32 -0
- package/client/failure.js +34 -0
- package/client/generation-selection.d.ts +15 -0
- package/client/generation-selection.js +24 -0
- package/client/host-call.d.ts +51 -0
- package/client/host-call.js +42 -0
- package/client/host-transport.d.ts +68 -0
- package/client/host-transport.js +74 -0
- package/client/image-output.d.ts +6 -0
- package/client/image-output.js +13 -0
- package/client/index.d.ts +20 -0
- package/client/index.js +18 -0
- package/client/ink-waveform.d.ts +17 -0
- package/client/ink-waveform.js +69 -0
- package/client/live/apply-live-turn-tool-event.d.ts +14 -0
- package/client/live/apply-live-turn-tool-event.js +39 -0
- package/client/live/live-captions.d.ts +23 -0
- package/client/live/live-captions.js +70 -0
- package/client/live/live-mic-forward.d.ts +29 -0
- package/client/live/live-mic-forward.js +37 -0
- package/client/live/live-state.d.ts +11 -0
- package/client/live/live-state.js +20 -0
- package/client/live/live-tool.d.ts +11 -0
- package/client/live/live-tool.js +1 -0
- package/client/live/live-video.d.ts +10 -0
- package/client/live/live-video.js +71 -0
- package/client/live/run-live-tool-call.d.ts +17 -0
- package/client/live/run-live-tool-call.js +32 -0
- package/client/live-client.d.ts +141 -0
- package/client/live-client.js +638 -0
- package/client/live-errors.d.ts +2 -0
- package/client/live-errors.js +9 -0
- package/client/live-messages.d.ts +110 -0
- package/client/live-messages.js +67 -0
- package/client/mic-capture.d.ts +4 -0
- package/client/mic-capture.js +6 -0
- package/client/oauth-popup.d.ts +26 -0
- package/client/oauth-popup.js +30 -0
- package/client/pcm-downsample.d.ts +4 -0
- package/client/pcm-downsample.js +45 -0
- package/client/run-commit.d.ts +61 -0
- package/client/run-commit.js +124 -0
- package/client/run-session.d.ts +80 -0
- package/client/run-session.js +215 -0
- package/client/schema-fields.d.ts +63 -0
- package/client/schema-fields.js +178 -0
- package/client/shaped-data.d.ts +118 -0
- package/client/shaped-data.js +314 -0
- package/client/source-citations.d.ts +13 -0
- package/client/source-citations.js +56 -0
- package/client/state-fields.d.ts +16 -0
- package/client/state-fields.js +44 -0
- package/client/tool-result.d.ts +78 -0
- package/client/tool-result.js +275 -0
- package/client/tool-resume.d.ts +33 -0
- package/client/tool-resume.js +11 -0
- package/client/trace-feed.d.ts +13 -0
- package/client/trace-feed.js +18 -0
- package/client/trace-story.d.ts +163 -0
- package/client/trace-story.js +416 -0
- package/client/trace-view.d.ts +130 -0
- package/client/trace-view.js +293 -0
- package/client/transcript-groups.d.ts +114 -0
- package/client/transcript-groups.js +167 -0
- package/client/transcript-scroll.d.ts +7 -0
- package/client/transcript-scroll.js +6 -0
- package/client/transport.d.ts +176 -0
- package/client/transport.js +256 -0
- package/client/turn-client.d.ts +35 -0
- package/client/turn-client.js +93 -0
- package/client/voice-label.d.ts +2 -0
- package/client/voice-label.js +15 -0
- package/client/voice-recorder.d.ts +27 -0
- package/client/voice-recorder.js +165 -0
- package/client/walk-away.d.ts +34 -0
- package/client/walk-away.js +48 -0
- package/client/wire-line.d.ts +56 -0
- package/client/wire-line.js +90 -0
- package/client/worklets/mic-capture.js +16 -0
- package/components/InkWaveform.d.ts +10 -0
- package/components/InkWaveform.js +108 -0
- package/components/live/use-live-runner-controls.d.ts +48 -0
- package/components/live/use-live-runner-controls.js +100 -0
- package/components/live/use-live-runner-model.d.ts +45 -0
- package/components/live/use-live-runner-model.js +175 -0
- package/components/live/use-live-runner-ui.d.ts +65 -0
- package/components/live/use-live-runner-ui.js +159 -0
- package/components/live/use-live-session-client.d.ts +41 -0
- package/components/live/use-live-session-client.js +123 -0
- package/components/use-composer-voice.d.ts +28 -0
- package/components/use-composer-voice.js +90 -0
- package/components/use-editor-selection.d.ts +3 -0
- package/components/use-editor-selection.js +16 -0
- package/components/use-voice-playback.d.ts +16 -0
- package/components/use-voice-playback.js +68 -0
- package/hooks/use-described.d.ts +8 -0
- package/hooks/use-described.js +23 -0
- package/hooks/use-theorem-chat-actions.d.ts +75 -0
- package/hooks/use-theorem-chat-actions.js +265 -0
- package/hooks/use-theorem-chat-state.d.ts +66 -0
- package/hooks/use-theorem-chat-state.js +118 -0
- package/hooks/use-theorem-chat.d.ts +63 -0
- package/hooks/use-theorem-chat.js +340 -0
- package/hooks/use-theorem-decision.d.ts +23 -0
- package/hooks/use-theorem-decision.js +75 -0
- package/hooks/use-theorem-host.d.ts +44 -0
- package/hooks/use-theorem-host.js +117 -0
- package/hooks/use-theorem-interface.d.ts +19 -0
- package/hooks/use-theorem-interface.js +25 -0
- package/hooks/use-trace-records.d.ts +4 -0
- package/hooks/use-trace-records.js +7 -0
- package/index.d.ts +14 -0
- package/index.js +14 -0
- package/live.d.ts +8 -0
- package/live.js +10 -0
- package/package.json +73 -4
- package/server/credential-store.d.ts +24 -0
- package/server/credential-store.js +14 -0
- package/server/decision-handler.d.ts +34 -0
- package/server/decision-handler.js +55 -0
- package/server/handler.d.ts +114 -0
- package/server/handler.js +568 -0
- package/server/json-response.d.ts +2 -0
- package/server/json-response.js +7 -0
- package/server/mod.d.ts +16 -0
- package/server/mod.js +15 -0
- package/server/request-check.d.ts +16 -0
- package/server/request-check.js +34 -0
- package/server/session-store.d.ts +74 -0
- package/server/session-store.js +49 -0
- package/server/steer-inbox.d.ts +35 -0
- package/server/steer-inbox.js +52 -0
- package/server/walk-away.d.ts +22 -0
- package/server/walk-away.js +41 -0
- package/styles/ink-controls.css +134 -0
- package/ui/ChatComposerBar.d.ts +39 -0
- package/ui/ChatComposerBar.js +251 -0
- package/ui/ChatTranscript.d.ts +30 -0
- package/ui/ChatTranscript.js +474 -0
- package/ui/ConsoleFrame.d.ts +47 -0
- package/ui/ConsoleFrame.js +46 -0
- package/ui/DecisionAnswers.d.ts +15 -0
- package/ui/DecisionAnswers.js +102 -0
- package/ui/LiveRunner.d.ts +28 -0
- package/ui/LiveRunner.js +193 -0
- package/ui/SchemaFields.d.ts +10 -0
- package/ui/SchemaFields.js +122 -0
- package/ui/ShapedData.d.ts +11 -0
- package/ui/ShapedData.js +151 -0
- package/ui/SidePanel.d.ts +57 -0
- package/ui/SidePanel.js +50 -0
- package/ui/StateFields.d.ts +36 -0
- package/ui/StateFields.js +96 -0
- package/ui/TheoremChat.d.ts +71 -0
- package/ui/TheoremChat.js +146 -0
- package/ui/TheoremDecision.d.ts +38 -0
- package/ui/TheoremDecision.js +87 -0
- package/ui/TheoremHost.d.ts +38 -0
- package/ui/TheoremHost.js +150 -0
- package/ui/ToolGateCard.d.ts +28 -0
- package/ui/ToolGateCard.js +100 -0
- package/ui/ToolResult.d.ts +10 -0
- package/ui/ToolResult.js +60 -0
- package/ui/ToolResultCharts.d.ts +5 -0
- package/ui/ToolResultCharts.js +86 -0
- package/ui/TraceCharts.d.ts +13 -0
- package/ui/TraceCharts.js +235 -0
- package/ui/TraceGuardrails.d.ts +10 -0
- package/ui/TraceGuardrails.js +56 -0
- package/ui/TraceInspector.d.ts +6 -0
- package/ui/TraceInspector.js +189 -0
- package/ui/TraceInspectorPanel.d.ts +24 -0
- package/ui/TraceInspectorPanel.js +57 -0
- package/ui/TraceOverview.d.ts +34 -0
- package/ui/TraceOverview.js +96 -0
- package/ui/TraceSpanDetail.d.ts +10 -0
- package/ui/TraceSpanDetail.js +188 -0
- package/ui/TraceStory.d.ts +20 -0
- package/ui/TraceStory.js +107 -0
- package/ui/TraceValues.d.ts +36 -0
- package/ui/TraceValues.js +113 -0
- package/ui/TraceWaterfall.d.ts +13 -0
- package/ui/TraceWaterfall.js +132 -0
- package/ui/VoiceNote.d.ts +12 -0
- package/ui/VoiceNote.js +28 -0
- package/ui/built/theme.css +774 -0
- package/ui/built/theorem.d.ts +13 -0
- package/ui/built/theorem.js +631 -0
- package/ui/built/theorem.variants.d.ts +16 -0
- package/ui/disclosure-motion.d.ts +6 -0
- package/ui/disclosure-motion.js +163 -0
- package/ui/icons.d.ts +4 -0
- package/ui/icons.js +37 -0
- package/ui/index.d.ts +25 -0
- package/ui/index.js +29 -0
- package/ui/labels-provider.d.ts +16 -0
- package/ui/labels-provider.js +61 -0
- package/ui/labels.d.ts +1153 -0
- package/ui/labels.js +603 -0
- package/ui/theme.d.ts +10 -0
- package/ui/theme.js +13 -0
- package/ui/theorem-theme.d.ts +10 -0
- package/ui/theorem-theme.js +83 -0
- package/ui/trace-palette.d.ts +24 -0
- package/ui/trace-palette.js +24 -0
- package/ui/trace-patterns.d.ts +32 -0
- package/ui/trace-patterns.js +44 -0
- package/ui/transcript-copy-text.d.ts +4 -0
- package/ui/transcript-copy-text.js +39 -0
package/ui/labels.js
ADDED
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default UI's words, as an Astryx i18n catalog under `@theorem.*` keys:
|
|
3
|
+
* the same mechanism that words Astryx's own components (`@astryx.*`), so one
|
|
4
|
+
* override table replaces any line on screen, per locale. Messages are ICU
|
|
5
|
+
* (`{handle}`, `{n, plural, …}`); `params` names the values each one is given.
|
|
6
|
+
* Failures are worded by the profile lexicon, not here.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { IntlMessageFormat } from 'intl-messageformat';
|
|
11
|
+
export const THEOREM_UI_CATALOG = {
|
|
12
|
+
'@theorem.agent.handle': {
|
|
13
|
+
defaultMessage: '@{handle}',
|
|
14
|
+
description: "The agent's name above its messages, on the landing and in captions.",
|
|
15
|
+
params: ['handle'],
|
|
16
|
+
},
|
|
17
|
+
'@theorem.chat.greeting': { defaultMessage: 'What are we working on?', description: 'Chat landing heading, before the first message.' },
|
|
18
|
+
'@theorem.chat.loading': { defaultMessage: 'Loading…', description: 'Spinner label while the profile loads.' },
|
|
19
|
+
'@theorem.chat.live_unsupported.title': {
|
|
20
|
+
defaultMessage: "Live profiles aren't supported here",
|
|
21
|
+
description: 'Shown when TheoremChat is pointed at a live profile.',
|
|
22
|
+
},
|
|
23
|
+
'@theorem.chat.live_unsupported.description': {
|
|
24
|
+
defaultMessage: 'Use LiveRunner from @theoremjs/react/live.',
|
|
25
|
+
description: 'Where to go instead, under the live-profile warning.',
|
|
26
|
+
},
|
|
27
|
+
'@theorem.composer.placeholder': {
|
|
28
|
+
defaultMessage: 'Message @{handle}',
|
|
29
|
+
description: 'Empty composer placeholder.',
|
|
30
|
+
params: ['handle'],
|
|
31
|
+
},
|
|
32
|
+
'@theorem.composer.listening': { defaultMessage: 'Listening…', description: 'Composer placeholder while a voice note records.' },
|
|
33
|
+
'@theorem.composer.attach': { defaultMessage: 'Attach files', description: 'Paperclip button.' },
|
|
34
|
+
'@theorem.composer.record': { defaultMessage: 'Record voice', description: 'Microphone button, idle.' },
|
|
35
|
+
'@theorem.composer.stop_recording': { defaultMessage: 'Stop recording', description: 'Microphone button, recording.' },
|
|
36
|
+
'@theorem.composer.send_options': { defaultMessage: 'More send options', description: 'Menu button beside send.' },
|
|
37
|
+
'@theorem.composer.model': { defaultMessage: 'Model', description: 'Model selector (screen readers).' },
|
|
38
|
+
'@theorem.composer.effort': { defaultMessage: 'Effort', description: 'Effort selector (screen readers).' },
|
|
39
|
+
'@theorem.composer.menu.queue': { defaultMessage: 'Queue', description: 'Send menu item.' },
|
|
40
|
+
'@theorem.composer.menu.queue.description': {
|
|
41
|
+
defaultMessage: 'Send it once this reply finishes.',
|
|
42
|
+
description: 'Send menu item detail: the message waits its turn.',
|
|
43
|
+
},
|
|
44
|
+
'@theorem.composer.menu.steer': { defaultMessage: 'Steer this reply', description: 'Send menu item.' },
|
|
45
|
+
'@theorem.composer.menu.steer.description': {
|
|
46
|
+
defaultMessage: 'Add it to the reply in progress. The agent reads it at its next step.',
|
|
47
|
+
description: 'Send menu item detail: the message joins the running reply instead of waiting.',
|
|
48
|
+
},
|
|
49
|
+
'@theorem.composer.menu.send_now': { defaultMessage: 'Send now', description: 'Send menu item.' },
|
|
50
|
+
'@theorem.composer.menu.send_now.description': {
|
|
51
|
+
defaultMessage: 'Stop this reply and send it instead.',
|
|
52
|
+
description: 'Send menu item detail: ends the running reply (or its wait for approval), then sends.',
|
|
53
|
+
},
|
|
54
|
+
'@theorem.composer.menu.stash': { defaultMessage: 'Stash', description: 'Send menu item.' },
|
|
55
|
+
'@theorem.composer.menu.stash.description': {
|
|
56
|
+
defaultMessage: 'Set it aside to send later.',
|
|
57
|
+
description: 'Send menu item detail: the message waits in the composer until sent.',
|
|
58
|
+
},
|
|
59
|
+
'@theorem.composer.hint.stash-selected-draft.message': {
|
|
60
|
+
defaultMessage: 'Replacing this?',
|
|
61
|
+
description: 'Hint when the whole draft is selected and could be stashed.',
|
|
62
|
+
},
|
|
63
|
+
'@theorem.composer.hint.stash-selected-draft.action': { defaultMessage: 'Stash it', description: 'The hint\'s button.' },
|
|
64
|
+
'@theorem.composer.drawer.steer': { defaultMessage: 'steering', description: 'Drawer header when only steering messages wait.' },
|
|
65
|
+
'@theorem.composer.drawer.queue': { defaultMessage: 'queued', description: 'Drawer header when only queued messages wait.' },
|
|
66
|
+
'@theorem.composer.drawer.stash': { defaultMessage: 'stashed', description: 'Drawer header when only stashed messages wait.' },
|
|
67
|
+
'@theorem.composer.drawer.attached': { defaultMessage: 'attached', description: 'Drawer header when only files wait.' },
|
|
68
|
+
'@theorem.composer.drawer.steer.count': { defaultMessage: '{n} steering', description: 'One part of a mixed drawer header.', params: ['n'] },
|
|
69
|
+
'@theorem.composer.drawer.queue.count': { defaultMessage: '{n} queued', description: 'One part of a mixed drawer header.', params: ['n'] },
|
|
70
|
+
'@theorem.composer.drawer.stash.count': { defaultMessage: '{n} stashed', description: 'One part of a mixed drawer header.', params: ['n'] },
|
|
71
|
+
'@theorem.composer.drawer.attached.count': {
|
|
72
|
+
defaultMessage: '{n} attached',
|
|
73
|
+
description: 'One part of a mixed drawer header.',
|
|
74
|
+
params: ['n'],
|
|
75
|
+
},
|
|
76
|
+
'@theorem.composer.drawer.separator': { defaultMessage: ' · ', description: 'Between the parts of a mixed drawer header.' },
|
|
77
|
+
'@theorem.composer.pending.steer': { defaultMessage: 'Steering', description: 'Badge on a waiting steering message.' },
|
|
78
|
+
'@theorem.composer.pending.queue': { defaultMessage: 'Queued', description: 'Badge on a waiting queued message.' },
|
|
79
|
+
'@theorem.composer.pending.stash': { defaultMessage: 'Stashed', description: 'Badge on a waiting stashed message.' },
|
|
80
|
+
'@theorem.composer.pending.edit': { defaultMessage: 'Edit', description: 'Waiting message: back into the composer.' },
|
|
81
|
+
'@theorem.composer.pending.queue_action': { defaultMessage: 'Queue', description: 'Stashed message: queue it.' },
|
|
82
|
+
'@theorem.composer.pending.send_now': { defaultMessage: 'Send now', description: 'Waiting message: send it now.' },
|
|
83
|
+
'@theorem.composer.pending.move_up': { defaultMessage: 'Move up', description: 'Waiting message: earlier.' },
|
|
84
|
+
'@theorem.composer.pending.move_down': { defaultMessage: 'Move down', description: 'Waiting message: later.' },
|
|
85
|
+
'@theorem.composer.pending.remove': { defaultMessage: 'Remove', description: 'Waiting message: discard.' },
|
|
86
|
+
'@theorem.transcript.copy': { defaultMessage: 'Copy', description: 'Copy a message.' },
|
|
87
|
+
'@theorem.transcript.copied': { defaultMessage: 'Copied', description: 'Right after copying a message.' },
|
|
88
|
+
'@theorem.transcript.now': { defaultMessage: 'now', description: 'Message time during its first minute.' },
|
|
89
|
+
'@theorem.transcript.generated_image': { defaultMessage: 'Generated image', description: 'Alt text for a generated image.' },
|
|
90
|
+
'@theorem.transcript.generated_video': { defaultMessage: 'Generated video', description: 'Alt text for a generated video.' },
|
|
91
|
+
'@theorem.transcript.open_generated_image': { defaultMessage: 'Open generated image', description: 'Opens the image full size.' },
|
|
92
|
+
'@theorem.transcript.generating_image': { defaultMessage: 'Generating image', description: 'Placeholder while an image generates.' },
|
|
93
|
+
'@theorem.transcript.sources': { defaultMessage: 'Sources', description: 'The row of source chips (screen readers).' },
|
|
94
|
+
'@theorem.transcript.tool_input': { defaultMessage: 'Input', description: "A tool call's arguments, in its detail." },
|
|
95
|
+
'@theorem.transcript.tool_input_edited': {
|
|
96
|
+
defaultMessage: 'Input (edited)',
|
|
97
|
+
description: "A tool call's arguments after the user edited them on approval.",
|
|
98
|
+
},
|
|
99
|
+
'@theorem.transcript.tool_output': { defaultMessage: 'Output', description: "A tool call's result, in its detail." },
|
|
100
|
+
'@theorem.transcript.tool_error': { defaultMessage: 'Error', description: "A failed tool call's failure, in its detail." },
|
|
101
|
+
'@theorem.data.view': { defaultMessage: 'View as', description: 'Switch between tool data drawn by its shape and its JSON.' },
|
|
102
|
+
'@theorem.data.shaped': { defaultMessage: 'Data', description: 'Tool data drawn as fields, sections and tables.' },
|
|
103
|
+
'@theorem.data.json': { defaultMessage: 'JSON', description: 'Tool data as its raw JSON.' },
|
|
104
|
+
'@theorem.data.item': {
|
|
105
|
+
defaultMessage: 'Item {index}',
|
|
106
|
+
description: 'A list row with no name of its own.',
|
|
107
|
+
params: ['index'],
|
|
108
|
+
},
|
|
109
|
+
'@theorem.data.none': { defaultMessage: 'Empty', description: 'An empty list or object in tool data.' },
|
|
110
|
+
'@theorem.data.yes': { defaultMessage: 'Yes', description: 'A true value in tool data.' },
|
|
111
|
+
'@theorem.data.no': { defaultMessage: 'No', description: 'A false value in tool data.' },
|
|
112
|
+
'@theorem.data.more': {
|
|
113
|
+
defaultMessage: '{count} more — switch to JSON to see them',
|
|
114
|
+
description: 'Rows past the shown ones, left to the JSON view.',
|
|
115
|
+
params: ['count'],
|
|
116
|
+
},
|
|
117
|
+
'@theorem.data.large': {
|
|
118
|
+
defaultMessage: 'Too large to lay out — showing the first {size} of its JSON',
|
|
119
|
+
description: 'A payload too big to draw by its shape, shown as the start of its JSON.',
|
|
120
|
+
params: ['size'],
|
|
121
|
+
},
|
|
122
|
+
'@theorem.transcript.copy_text.tool': {
|
|
123
|
+
defaultMessage: 'Tool: {name}',
|
|
124
|
+
description: 'A tool call in copied message text.',
|
|
125
|
+
params: ['name'],
|
|
126
|
+
},
|
|
127
|
+
'@theorem.transcript.copy_text.media': {
|
|
128
|
+
defaultMessage: '[{mimeType} media]',
|
|
129
|
+
description: 'Media without a link, in copied message text.',
|
|
130
|
+
params: ['mimeType'],
|
|
131
|
+
},
|
|
132
|
+
'@theorem.transcript.working': { defaultMessage: 'Working…', description: 'Turn status while running, start unknown.' },
|
|
133
|
+
'@theorem.transcript.working_for': {
|
|
134
|
+
defaultMessage: 'Working for {duration}',
|
|
135
|
+
description: 'Turn status while running.',
|
|
136
|
+
params: ['duration'],
|
|
137
|
+
},
|
|
138
|
+
'@theorem.transcript.worked': { defaultMessage: 'Worked', description: 'Turn status once done, duration unknown.' },
|
|
139
|
+
'@theorem.transcript.worked_for': {
|
|
140
|
+
defaultMessage: 'Worked for {duration}',
|
|
141
|
+
description: 'Turn status once done.',
|
|
142
|
+
params: ['duration'],
|
|
143
|
+
},
|
|
144
|
+
'@theorem.duration.milliseconds': { defaultMessage: '{ms}ms', description: 'Under a second.', params: ['ms'] },
|
|
145
|
+
'@theorem.duration.belowTenth': { defaultMessage: '<0.1ms', description: 'Above zero but under a tenth of a millisecond, such as a quick guardrail check.' },
|
|
146
|
+
'@theorem.duration.seconds': { defaultMessage: '{seconds}s', description: 'Under a minute.', params: ['seconds'] },
|
|
147
|
+
'@theorem.duration.minutes': { defaultMessage: '{minutes}m', description: 'Whole minutes.', params: ['minutes'] },
|
|
148
|
+
'@theorem.duration.minutes_seconds': {
|
|
149
|
+
defaultMessage: '{minutes}m {seconds}s',
|
|
150
|
+
description: 'Minutes and seconds.',
|
|
151
|
+
params: ['minutes', 'seconds'],
|
|
152
|
+
},
|
|
153
|
+
'@theorem.gate.approval.badge': { defaultMessage: 'Approval required', description: 'Tool approval card badge.' },
|
|
154
|
+
'@theorem.gate.approval.title': { defaultMessage: 'Tool:', description: 'Before the tool name on the approval card.' },
|
|
155
|
+
'@theorem.gate.approval.input': { defaultMessage: 'Input arguments', description: 'Expands the arguments the tool would run with.' },
|
|
156
|
+
'@theorem.gate.approval.deny': { defaultMessage: 'Deny', description: 'Approval card button.' },
|
|
157
|
+
'@theorem.gate.approval.approve': { defaultMessage: 'Approve', description: 'Approval card button.' },
|
|
158
|
+
'@theorem.gate.approval.denied': { defaultMessage: 'Denied', description: 'After denying.' },
|
|
159
|
+
'@theorem.gate.approval.approved_session': {
|
|
160
|
+
defaultMessage: 'Approved for this session',
|
|
161
|
+
description: 'After approving a tool whose consent lasts the session.',
|
|
162
|
+
},
|
|
163
|
+
'@theorem.gate.approval.approved_once': { defaultMessage: 'Approved once', description: 'After approving a single run.' },
|
|
164
|
+
'@theorem.gate.tag.confirmation': { defaultMessage: 'confirmation', description: 'Gate kind tag.' },
|
|
165
|
+
'@theorem.gate.tag.permission': { defaultMessage: 'permission', description: 'Gate kind tag.' },
|
|
166
|
+
'@theorem.gate.tag.auth': { defaultMessage: 'auth', description: 'Gate kind tag.' },
|
|
167
|
+
'@theorem.gate.tag.auto': { defaultMessage: 'auto', description: 'Tool permission tag.' },
|
|
168
|
+
'@theorem.gate.tag.session_consent': { defaultMessage: 'session_consent', description: 'Tool permission tag.' },
|
|
169
|
+
'@theorem.gate.tag.always_confirm': { defaultMessage: 'always_confirm', description: 'Tool permission tag.' },
|
|
170
|
+
'@theorem.gate.tag.bearer': { defaultMessage: 'bearer', description: 'Credential type tag.' },
|
|
171
|
+
'@theorem.gate.tag.api_key': { defaultMessage: 'api_key', description: 'Credential type tag.' },
|
|
172
|
+
'@theorem.gate.tag.oauth2': { defaultMessage: 'oauth2', description: 'Credential type tag.' },
|
|
173
|
+
'@theorem.gate.auth.badge': { defaultMessage: 'Sign-in required', description: 'Credential card badge.' },
|
|
174
|
+
'@theorem.gate.auth.title': { defaultMessage: 'Authentication:', description: 'Before the tool name on the credential card.' },
|
|
175
|
+
'@theorem.gate.auth.resource': { defaultMessage: 'Resource: {resource}', description: 'What the credential is for.', params: ['resource'] },
|
|
176
|
+
'@theorem.gate.auth.no_oauth': {
|
|
177
|
+
defaultMessage: 'No OAuth authorization endpoint is configured.',
|
|
178
|
+
description: 'OAuth tool without an authorization URL.',
|
|
179
|
+
},
|
|
180
|
+
'@theorem.gate.auth.authorize': { defaultMessage: 'Authorize with provider', description: 'Opens the OAuth sign-in.' },
|
|
181
|
+
'@theorem.gate.auth.provided': {
|
|
182
|
+
defaultMessage: 'Credential provided for {slot}',
|
|
183
|
+
description: 'After submitting a credential or finishing an OAuth sign-in.',
|
|
184
|
+
params: ['slot'],
|
|
185
|
+
},
|
|
186
|
+
'@theorem.gate.auth.api_key': { defaultMessage: 'API key', description: 'Secret field label, API-key tools.' },
|
|
187
|
+
'@theorem.gate.auth.bearer': { defaultMessage: 'Bearer token', description: 'Secret field label, bearer tools.' },
|
|
188
|
+
'@theorem.gate.auth.secret_placeholder': {
|
|
189
|
+
defaultMessage: "Secret for slot ''{slot}''",
|
|
190
|
+
description: 'Secret field placeholder.',
|
|
191
|
+
params: ['slot'],
|
|
192
|
+
},
|
|
193
|
+
'@theorem.gate.auth.secret_note': {
|
|
194
|
+
defaultMessage: ' ',
|
|
195
|
+
description: 'Under the secret field: how the host handles the credential. Blank by default, since only the host knows; the playground says it is used for one call.',
|
|
196
|
+
},
|
|
197
|
+
'@theorem.gate.auth.submit': { defaultMessage: 'Submit & continue', description: 'Sends the credential.' },
|
|
198
|
+
'@theorem.voice_note.name': {
|
|
199
|
+
defaultMessage: 'voice.{format}',
|
|
200
|
+
description: "A voice note's name, by audio format (webm, wav, mp3, m4a, ogg).",
|
|
201
|
+
params: ['format'],
|
|
202
|
+
},
|
|
203
|
+
'@theorem.voice_note.unnamed': { defaultMessage: 'voice note', description: "A voice note's name when its format is unknown." },
|
|
204
|
+
'@theorem.voice_note.play': { defaultMessage: 'Play {name}', description: 'Voice note, paused.', params: ['name'] },
|
|
205
|
+
'@theorem.voice_note.pause': { defaultMessage: 'Pause {name}', description: 'Voice note, playing.', params: ['name'] },
|
|
206
|
+
'@theorem.voice_note.remove': { defaultMessage: 'Remove {name}', description: 'Unstages a voice note.', params: ['name'] },
|
|
207
|
+
'@theorem.decision.state': { defaultMessage: 'State', description: 'The JSON a decision is asked about (field label).' },
|
|
208
|
+
'@theorem.decision.state_size': {
|
|
209
|
+
defaultMessage: '{size} of {limit}',
|
|
210
|
+
description: "The state's size against the profile's limit, under the field.",
|
|
211
|
+
params: ['size', 'limit'],
|
|
212
|
+
},
|
|
213
|
+
'@theorem.decision.view': { defaultMessage: 'Edit as', description: 'Switch between the state as fields and as JSON.' },
|
|
214
|
+
'@theorem.decision.fields': { defaultMessage: 'Fields', description: 'The state edited field by field.' },
|
|
215
|
+
'@theorem.decision.add_item': { defaultMessage: 'Add to {field}', description: 'Adds a row to a list in the state.', params: ['field'] },
|
|
216
|
+
'@theorem.decision.remove_item': { defaultMessage: 'Remove {item}', description: 'Removes a row from a list in the state.', params: ['item'] },
|
|
217
|
+
'@theorem.decision.add_value': { defaultMessage: 'Add a value', description: 'A list of words in the state, while it is empty.' },
|
|
218
|
+
'@theorem.decision.invalid_json': { defaultMessage: 'Not valid JSON yet', description: "The state doesn't parse." },
|
|
219
|
+
'@theorem.decision.null_state': { defaultMessage: 'State can’t be null', description: 'The state is the JSON null.' },
|
|
220
|
+
'@theorem.decision.too_large': {
|
|
221
|
+
defaultMessage: 'Over the {limit} limit',
|
|
222
|
+
description: "The state is larger than the profile's limit.",
|
|
223
|
+
params: ['limit'],
|
|
224
|
+
},
|
|
225
|
+
'@theorem.decision.decide': { defaultMessage: 'Decide', description: 'Asks the questions about the state.' },
|
|
226
|
+
'@theorem.decision.deciding': { defaultMessage: 'Deciding…', description: 'The decide button while it runs.' },
|
|
227
|
+
'@theorem.decision.stop': { defaultMessage: 'Stop', description: 'Cancels the running decision.' },
|
|
228
|
+
'@theorem.decision.confidence': {
|
|
229
|
+
defaultMessage: '{percent} sure',
|
|
230
|
+
description: "How sure the model is of a choice or score; percent is formatted, e.g. '92%'.",
|
|
231
|
+
params: ['percent'],
|
|
232
|
+
},
|
|
233
|
+
'@theorem.decision.option': {
|
|
234
|
+
defaultMessage: '{label}, {percent}',
|
|
235
|
+
description: "One option and its probability (screen readers); percent is formatted.",
|
|
236
|
+
params: ['label', 'percent'],
|
|
237
|
+
},
|
|
238
|
+
'@theorem.decision.score_of': {
|
|
239
|
+
defaultMessage: '{score} of {max}',
|
|
240
|
+
description: 'A score on its scale from 0, e.g. 1.4 of 3.',
|
|
241
|
+
params: ['score', 'max'],
|
|
242
|
+
},
|
|
243
|
+
'@theorem.decision.type.choice': { defaultMessage: 'Choice', description: 'A question that picks one label.' },
|
|
244
|
+
'@theorem.decision.type.score': { defaultMessage: 'Score', description: 'A question that places the state on a scale.' },
|
|
245
|
+
'@theorem.decision.type.noul': { defaultMessage: 'Noul', description: 'A question answered with one number.' },
|
|
246
|
+
'@theorem.decision.tokens': {
|
|
247
|
+
defaultMessage: '{count, plural, one {# token} other {# tokens}}',
|
|
248
|
+
description: 'Input tokens the decision used, in the line under the answers.',
|
|
249
|
+
params: ['count'],
|
|
250
|
+
},
|
|
251
|
+
'@theorem.host.tool': { defaultMessage: 'Tool', description: 'Picks which of the host’s tools to call (field label).' },
|
|
252
|
+
'@theorem.host.request': { defaultMessage: 'Request', description: 'The input a tool call sends (card heading).' },
|
|
253
|
+
'@theorem.host.response': { defaultMessage: 'Response', description: 'What a tool call returned (section heading).' },
|
|
254
|
+
'@theorem.host.run': { defaultMessage: 'Run', description: 'Calls the tool with the request.' },
|
|
255
|
+
'@theorem.host.image': { defaultMessage: 'Image the tool returned', description: 'Alt text for an image a tool returned beside its output.' },
|
|
256
|
+
'@theorem.host.running': { defaultMessage: 'Running…', description: 'The run button while the call runs.' },
|
|
257
|
+
'@theorem.host.stop': { defaultMessage: 'Stop', description: 'Cancels the running call.' },
|
|
258
|
+
'@theorem.host.missing': {
|
|
259
|
+
defaultMessage: 'Needs {fields}',
|
|
260
|
+
description: 'Required fields the request is still missing, under the form.',
|
|
261
|
+
params: ['fields'],
|
|
262
|
+
},
|
|
263
|
+
'@theorem.host.shortcut': { defaultMessage: '⌘↵ to run', description: 'The keyboard shortcut that runs the call, under the form.' },
|
|
264
|
+
'@theorem.host.no_tools': { defaultMessage: 'This host has no tools yet', description: 'A host profile that allows no tools.' },
|
|
265
|
+
'@theorem.host.earlier': { defaultMessage: 'Earlier calls', description: 'Heading over this page’s previous tool calls.' },
|
|
266
|
+
'@theorem.host.kind.function': { defaultMessage: 'Function', description: 'A tool that runs a function on the host.' },
|
|
267
|
+
'@theorem.host.kind.http': { defaultMessage: 'HTTP', description: 'A tool that calls an HTTP endpoint.' },
|
|
268
|
+
'@theorem.host.kind.mcp': { defaultMessage: 'MCP', description: 'A tool served by an MCP server.' },
|
|
269
|
+
'@theorem.host.access.read-only': { defaultMessage: 'Read-only', description: 'A tool that only reads.' },
|
|
270
|
+
'@theorem.host.access.read-write': { defaultMessage: 'Read-write', description: 'A tool that can change things.' },
|
|
271
|
+
'@theorem.host.access.destructive': { defaultMessage: 'Destructive', description: 'A tool that can delete or overwrite.' },
|
|
272
|
+
'@theorem.host.status.running': { defaultMessage: 'Running', description: 'A tool call in progress.' },
|
|
273
|
+
'@theorem.host.status.gate': { defaultMessage: 'Waiting', description: 'A tool call paused on approval or sign-in.' },
|
|
274
|
+
'@theorem.host.status.complete': { defaultMessage: 'Done', description: 'A tool call that returned.' },
|
|
275
|
+
'@theorem.host.status.error': { defaultMessage: 'Failed', description: 'A tool call that failed.' },
|
|
276
|
+
'@theorem.host.status.cancel': { defaultMessage: 'Stopped', description: 'A tool call that was cancelled.' },
|
|
277
|
+
'@theorem.panel.trace.name': { defaultMessage: 'Trace', description: 'Trace side panel (screen readers).' },
|
|
278
|
+
'@theorem.panel.trace.show': { defaultMessage: 'Show trace', description: 'Trace panel toggle, closed.' },
|
|
279
|
+
'@theorem.panel.trace.hide': { defaultMessage: 'Hide trace', description: 'Trace panel toggle, open.' },
|
|
280
|
+
'@theorem.panel.trace.resize': { defaultMessage: 'Resize trace', description: 'Trace panel drag handle.' },
|
|
281
|
+
'@theorem.panel.trace.empty.title': { defaultMessage: 'No trace yet', description: 'Empty trace panel.' },
|
|
282
|
+
'@theorem.panel.trace.empty.description': {
|
|
283
|
+
defaultMessage: 'Spans for each run will show here.',
|
|
284
|
+
description: 'Empty trace panel.',
|
|
285
|
+
},
|
|
286
|
+
'@theorem.panel.trace.summary': {
|
|
287
|
+
defaultMessage: '{traces, plural, one {# trace} other {# traces}} · {spans, plural, one {# span} other {# spans}}',
|
|
288
|
+
description: 'Trace panel line under the search: how many traces and spans it holds.',
|
|
289
|
+
params: ['traces', 'spans'],
|
|
290
|
+
},
|
|
291
|
+
'@theorem.panel.trace.separator': { defaultMessage: ' · ', description: 'Between facts on one trace panel line.' },
|
|
292
|
+
'@theorem.panel.trace.search': { defaultMessage: 'Search spans', description: 'Trace panel search (screen readers).' },
|
|
293
|
+
'@theorem.panel.trace.search.placeholder': {
|
|
294
|
+
defaultMessage: 'Filter by type, status, model, text…',
|
|
295
|
+
description: 'Trace panel search, empty.',
|
|
296
|
+
},
|
|
297
|
+
'@theorem.panel.trace.search.text': { defaultMessage: 'Any text', description: 'Search field matching any text a span holds.' },
|
|
298
|
+
'@theorem.panel.trace.search.text.description': {
|
|
299
|
+
defaultMessage: 'Names, values and stored text.',
|
|
300
|
+
description: 'What the any-text search field matches.',
|
|
301
|
+
},
|
|
302
|
+
'@theorem.panel.trace.no_match': { defaultMessage: 'No spans match', description: 'Trace panel, when the search matches nothing.' },
|
|
303
|
+
'@theorem.panel.trace.back': { defaultMessage: 'Back', description: 'Leaves an open span for its turn.' },
|
|
304
|
+
'@theorem.panel.trace.show_text': { defaultMessage: 'Show text', description: 'Reveals stored text, JSON or messages.' },
|
|
305
|
+
'@theorem.panel.trace.hide_text': { defaultMessage: 'Hide text', description: 'Hides revealed stored text.' },
|
|
306
|
+
'@theorem.panel.trace.other': { defaultMessage: 'Other', description: 'Group for attributes the trace catalog does not name.' },
|
|
307
|
+
'@theorem.panel.trace.yes': { defaultMessage: 'Yes', description: 'A true trace value.' },
|
|
308
|
+
'@theorem.panel.trace.no': { defaultMessage: 'No', description: 'A false trace value.' },
|
|
309
|
+
'@theorem.panel.trace.tokens': { defaultMessage: 'Tokens', description: 'Card of token counts.' },
|
|
310
|
+
'@theorem.panel.trace.errors': { defaultMessage: 'Errors', description: 'Card counting failed spans.' },
|
|
311
|
+
'@theorem.panel.trace.at_least': {
|
|
312
|
+
defaultMessage: 'At least {value}',
|
|
313
|
+
description: 'A total some calls did not report.',
|
|
314
|
+
params: ['value'],
|
|
315
|
+
},
|
|
316
|
+
'@theorem.panel.trace.about': {
|
|
317
|
+
defaultMessage: 'About {value}',
|
|
318
|
+
description: 'A total with estimated counts.',
|
|
319
|
+
params: ['value'],
|
|
320
|
+
},
|
|
321
|
+
'@theorem.panel.trace.offset': {
|
|
322
|
+
defaultMessage: '+{duration}',
|
|
323
|
+
description: 'When an event happened, after its span started.',
|
|
324
|
+
params: ['duration'],
|
|
325
|
+
},
|
|
326
|
+
'@theorem.panel.trace.unit.milliseconds': { defaultMessage: 'ms', description: 'Unit of a search field in milliseconds.' },
|
|
327
|
+
'@theorem.panel.trace.unit.seconds': { defaultMessage: 's', description: 'Unit of a search field in seconds.' },
|
|
328
|
+
'@theorem.panel.trace.unit.usd': { defaultMessage: 'USD', description: 'Unit of a search field in US dollars.' },
|
|
329
|
+
'@theorem.panel.trace.turn': {
|
|
330
|
+
defaultMessage: '{label} {index} of {count}',
|
|
331
|
+
description: 'Which root of the trace is shown: "Turn 2 of 3".',
|
|
332
|
+
params: ['label', 'index', 'count'],
|
|
333
|
+
},
|
|
334
|
+
'@theorem.panel.trace.turns': { defaultMessage: 'Turns', description: 'List of every turn of the conversation; a row opens its turn.' },
|
|
335
|
+
'@theorem.panel.trace.conversation': {
|
|
336
|
+
defaultMessage: '{count, plural, one {# turn} other {# turns}}',
|
|
337
|
+
description: 'Heading of the whole-conversation view: how many turns it holds.',
|
|
338
|
+
params: ['count'],
|
|
339
|
+
},
|
|
340
|
+
'@theorem.panel.trace.conversation.back': { defaultMessage: 'All turns', description: 'Leaves a turn for the whole-conversation view.' },
|
|
341
|
+
'@theorem.panel.trace.previous': { defaultMessage: 'Previous turn', description: 'Opens the turn before this one.' },
|
|
342
|
+
'@theorem.panel.trace.next': { defaultMessage: 'Next turn', description: 'Opens the turn after this one.' },
|
|
343
|
+
'@theorem.panel.trace.calls': { defaultMessage: 'Tool calls', description: "List of every call of a host's trace; a row opens its call." },
|
|
344
|
+
'@theorem.panel.trace.calls.count': {
|
|
345
|
+
defaultMessage: '{count, plural, one {# tool call} other {# tool calls}}',
|
|
346
|
+
description: "Heading of a host's whole-trace view: how many tool calls it holds.",
|
|
347
|
+
params: ['count'],
|
|
348
|
+
},
|
|
349
|
+
'@theorem.panel.trace.calls.back': { defaultMessage: 'All tool calls', description: "Leaves a call for the host's whole-trace view." },
|
|
350
|
+
'@theorem.panel.trace.calls.previous': { defaultMessage: 'Previous call', description: 'Opens the tool call before this one.' },
|
|
351
|
+
'@theorem.panel.trace.calls.next': { defaultMessage: 'Next call', description: 'Opens the tool call after this one.' },
|
|
352
|
+
'@theorem.panel.trace.steps': { defaultMessage: 'Steps', description: 'Card counting the model and tool calls of a turn.' },
|
|
353
|
+
'@theorem.panel.trace.steps.detail': {
|
|
354
|
+
defaultMessage: '{calls, plural, one {# model call} other {# model calls}} · {tools, plural, one {# tool} other {# tools}}',
|
|
355
|
+
description: 'Under the steps count: how many were model calls and tool calls.',
|
|
356
|
+
params: ['calls', 'tools'],
|
|
357
|
+
},
|
|
358
|
+
'@theorem.panel.trace.failed': {
|
|
359
|
+
defaultMessage: '{count} failed',
|
|
360
|
+
description: 'Under the steps count, when some failed.',
|
|
361
|
+
params: ['count'],
|
|
362
|
+
},
|
|
363
|
+
'@theorem.panel.trace.firstText': { defaultMessage: 'First text', description: 'Card: how long the person waited before any of the answer appeared.' },
|
|
364
|
+
'@theorem.panel.trace.rate': {
|
|
365
|
+
defaultMessage: '{rate} tokens/s',
|
|
366
|
+
description: 'Under the first-text time: how fast the model wrote once it started.',
|
|
367
|
+
params: ['rate'],
|
|
368
|
+
},
|
|
369
|
+
'@theorem.panel.trace.held': {
|
|
370
|
+
defaultMessage: '{duration} held back',
|
|
371
|
+
description: 'Under the first-text time: how long guardrails held written text back before showing it.',
|
|
372
|
+
params: ['duration'],
|
|
373
|
+
},
|
|
374
|
+
'@theorem.panel.trace.guardrails': { defaultMessage: 'Guardrails', description: 'Card: the time guardrail checks took in a turn.' },
|
|
375
|
+
'@theorem.panel.trace.guardrails.passed': {
|
|
376
|
+
defaultMessage: 'Passed: {checks}',
|
|
377
|
+
description: 'Under the guardrail checks that acted: the checks that let the text through, each with what it checked and its time.',
|
|
378
|
+
params: ['checks'],
|
|
379
|
+
},
|
|
380
|
+
'@theorem.panel.trace.guardrails.from': {
|
|
381
|
+
defaultMessage: 'from {tool}',
|
|
382
|
+
description: 'A guardrail check: the tool the checked text came from.',
|
|
383
|
+
params: ['tool'],
|
|
384
|
+
},
|
|
385
|
+
'@theorem.panel.trace.guardrails.detail': {
|
|
386
|
+
defaultMessage: '{checks, plural, one {# check} other {# checks}} · {flagged, plural, =0 {all passed} other {# acted}}',
|
|
387
|
+
description: 'Under the guardrail time: how many checks ran, and how many redacted, flagged or blocked.',
|
|
388
|
+
params: ['checks', 'flagged'],
|
|
389
|
+
},
|
|
390
|
+
'@theorem.panel.trace.tokens.detail': {
|
|
391
|
+
defaultMessage: '{input} in · {output} out',
|
|
392
|
+
description: 'Under the token total: tokens read and written.',
|
|
393
|
+
params: ['input', 'output'],
|
|
394
|
+
},
|
|
395
|
+
'@theorem.panel.trace.time': { defaultMessage: 'Where the time went', description: 'Bar splitting a turn into model, tool and other time.' },
|
|
396
|
+
'@theorem.panel.trace.time.model': { defaultMessage: 'Model', description: 'Time spent waiting on the model.' },
|
|
397
|
+
'@theorem.panel.trace.time.tools': { defaultMessage: 'Tools', description: 'Time spent running tools.' },
|
|
398
|
+
'@theorem.panel.trace.time.guardrails': { defaultMessage: 'Guardrails', description: 'Time guardrail checks took: on the input, the stream and the answer.' },
|
|
399
|
+
'@theorem.panel.trace.time.hooks': { defaultMessage: 'Hooks', description: "Time the host's turn hooks took." },
|
|
400
|
+
'@theorem.panel.trace.time.other': {
|
|
401
|
+
defaultMessage: 'Other',
|
|
402
|
+
description: 'Time spent on none of these: waiting between steps, the host, the network.',
|
|
403
|
+
},
|
|
404
|
+
'@theorem.panel.trace.charts.calls': {
|
|
405
|
+
defaultMessage: 'Tokens per model call',
|
|
406
|
+
description: 'Chart of each model call: its tokens stacked as a bar.',
|
|
407
|
+
},
|
|
408
|
+
'@theorem.panel.trace.charts.cached': { defaultMessage: 'Cached', description: 'Legend: input tokens read from cache.' },
|
|
409
|
+
'@theorem.panel.trace.charts.input': { defaultMessage: 'Input', description: 'Legend: input tokens read fresh.' },
|
|
410
|
+
'@theorem.panel.trace.charts.output': { defaultMessage: 'Output', description: 'Legend: tokens the model wrote.' },
|
|
411
|
+
'@theorem.panel.trace.charts.slowest': { defaultMessage: 'Slowest steps', description: 'Chart ranking the steps that took longest.' },
|
|
412
|
+
'@theorem.panel.trace.charts.modelShare': { defaultMessage: '{share} on the model', description: "Beside a chart's total time: the model's share.", params: ['share'] },
|
|
413
|
+
'@theorem.panel.trace.charts.cachedShare': { defaultMessage: '{share} of input cached', description: "Beside a chart's total tokens: the input read from cache.", params: ['share'] },
|
|
414
|
+
'@theorem.panel.trace.charts.turnTime': { defaultMessage: 'Time per turn', description: 'Chart of each turn: its model, tool and other time stacked.' },
|
|
415
|
+
'@theorem.panel.trace.charts.callTime': { defaultMessage: 'Time per call', description: "Chart of each tool call of a host's trace: its tool, check and hook time stacked." },
|
|
416
|
+
'@theorem.panel.trace.charts.turnTokens': { defaultMessage: 'Tokens per turn', description: 'Chart of each turn: its tokens stacked as a bar.' },
|
|
417
|
+
'@theorem.panel.trace.charts.turn': { defaultMessage: 'Turn {index}', description: 'A turn, by its order in the conversation.', params: ['index'] },
|
|
418
|
+
'@theorem.panel.trace.charts.hostCall': { defaultMessage: 'Call {index}', description: "A tool call, by its order in a host's trace.", params: ['index'] },
|
|
419
|
+
'@theorem.panel.trace.charts.call': { defaultMessage: 'Model call {index}', description: 'A model call, by its order in the turn.', params: ['index'] },
|
|
420
|
+
'@theorem.panel.trace.charts.tokens': {
|
|
421
|
+
defaultMessage: '{cached} cached · {fresh} new in · {output} out',
|
|
422
|
+
description: "A model call's tokens: read from cache, read fresh, and written.",
|
|
423
|
+
params: ['cached', 'fresh', 'output'],
|
|
424
|
+
},
|
|
425
|
+
'@theorem.panel.trace.story': { defaultMessage: 'What happened', description: 'The turn told step by step.' },
|
|
426
|
+
'@theorem.panel.trace.story.asked': { defaultMessage: 'User asked', description: 'The first step: what the user sent.' },
|
|
427
|
+
'@theorem.panel.trace.story.requested': {
|
|
428
|
+
defaultMessage: 'Asked for {count, plural, one {# tool} other {# tools}}',
|
|
429
|
+
description: 'A model call that answered with tool calls.',
|
|
430
|
+
params: ['count'],
|
|
431
|
+
},
|
|
432
|
+
'@theorem.panel.trace.story.wrote': { defaultMessage: 'Wrote a reply', description: 'A model call that answered with text.' },
|
|
433
|
+
'@theorem.panel.trace.story.answered': { defaultMessage: 'Answered', description: 'The last step: the turn ended with this answer.' },
|
|
434
|
+
'@theorem.panel.trace.story.failed': { defaultMessage: 'Ended with an error', description: 'The last step, when the turn failed.' },
|
|
435
|
+
'@theorem.panel.trace.timeline': { defaultMessage: 'Timeline', description: 'Every span of the turn on one time axis.' },
|
|
436
|
+
'@theorem.panel.trace.timeline.zoom': {
|
|
437
|
+
defaultMessage: 'Drag across the strip to zoom',
|
|
438
|
+
description: 'Hint beside the activity strip that zooms the timeline.',
|
|
439
|
+
},
|
|
440
|
+
'@theorem.panel.trace.timeline.reset': {
|
|
441
|
+
defaultMessage: 'Show the whole turn',
|
|
442
|
+
description: 'Zooms the timeline back out to the full turn.',
|
|
443
|
+
},
|
|
444
|
+
'@theorem.panel.trace.input': { defaultMessage: 'Input', description: 'What a span was given.' },
|
|
445
|
+
'@theorem.panel.trace.output': { defaultMessage: 'Output', description: 'What a span gave back.' },
|
|
446
|
+
'@theorem.panel.trace.details': { defaultMessage: 'All details', description: "A span's every attribute, event and link." },
|
|
447
|
+
'@theorem.panel.trace.close': { defaultMessage: 'Close', description: 'Closes the open span.' },
|
|
448
|
+
'@theorem.panel.captions.name': { defaultMessage: 'Captions', description: 'Captions side panel (screen readers).' },
|
|
449
|
+
'@theorem.panel.captions.show': { defaultMessage: 'Show captions', description: 'Captions panel toggle, closed.' },
|
|
450
|
+
'@theorem.panel.captions.hide': { defaultMessage: 'Hide captions', description: 'Captions panel toggle, open.' },
|
|
451
|
+
'@theorem.panel.captions.resize': { defaultMessage: 'Resize captions', description: 'Captions panel drag handle.' },
|
|
452
|
+
'@theorem.panel.captions.empty.title': { defaultMessage: 'No captions yet', description: 'Empty captions panel.' },
|
|
453
|
+
'@theorem.panel.captions.empty.description': {
|
|
454
|
+
defaultMessage: 'What you and the agent say will show here.',
|
|
455
|
+
description: 'Empty captions panel.',
|
|
456
|
+
},
|
|
457
|
+
'@theorem.live.greeting': { defaultMessage: 'Ready when you are.', description: 'Live landing heading, before a call.' },
|
|
458
|
+
'@theorem.live.start_voice_call': { defaultMessage: 'Start voice call', description: 'Live landing, voice profiles.' },
|
|
459
|
+
'@theorem.live.start_call': { defaultMessage: 'Start call', description: 'Starts or restarts a call.' },
|
|
460
|
+
'@theorem.live.start_video_call': { defaultMessage: 'Start video call', description: 'Live landing, video profiles.' },
|
|
461
|
+
'@theorem.live.microphone': { defaultMessage: 'Microphone', description: 'Mic toggle.' },
|
|
462
|
+
'@theorem.live.mute': { defaultMessage: 'Mute', description: 'Mic toggle tooltip, unmuted.' },
|
|
463
|
+
'@theorem.live.unmute': { defaultMessage: 'Unmute', description: 'Mic toggle tooltip, muted.' },
|
|
464
|
+
'@theorem.live.camera': { defaultMessage: 'Camera', description: 'Camera toggle.' },
|
|
465
|
+
'@theorem.live.camera_on': { defaultMessage: 'Turn camera on', description: 'Camera toggle tooltip, off.' },
|
|
466
|
+
'@theorem.live.camera_off': { defaultMessage: 'Turn camera off', description: 'Camera toggle tooltip, on.' },
|
|
467
|
+
'@theorem.live.flip_camera': { defaultMessage: 'Flip camera', description: 'Switches front and back camera.' },
|
|
468
|
+
'@theorem.live.end_call': { defaultMessage: 'End call', description: 'Hangs up.' },
|
|
469
|
+
'@theorem.live.controls': { defaultMessage: 'Call controls', description: 'The control toolbar (screen readers).' },
|
|
470
|
+
'@theorem.live.new_session': { defaultMessage: 'New session', description: 'Captions divider between calls.' },
|
|
471
|
+
'@theorem.live.camera_preview': { defaultMessage: 'Camera preview', description: 'Self-view (screen readers).' },
|
|
472
|
+
'@theorem.live.state.calling_tool': { defaultMessage: 'calling {tool}', description: 'Call status: a tool runs.', params: ['tool'] },
|
|
473
|
+
'@theorem.live.state.connecting': { defaultMessage: 'connecting', description: 'Call status.' },
|
|
474
|
+
'@theorem.live.state.requesting_mic': { defaultMessage: 'requesting mic', description: 'Call status.' },
|
|
475
|
+
'@theorem.live.state.speaking': { defaultMessage: 'speaking', description: 'Call status: the agent speaks.' },
|
|
476
|
+
'@theorem.live.state.connected': { defaultMessage: 'connected', description: 'Call status.' },
|
|
477
|
+
'@theorem.live.state.muted': { defaultMessage: 'muted', description: 'Call status.' },
|
|
478
|
+
'@theorem.live.state.listening': { defaultMessage: 'listening', description: 'Call status.' },
|
|
479
|
+
'@theorem.live.state.error': { defaultMessage: 'error', description: 'Call status.' },
|
|
480
|
+
'@theorem.live.state.ended': { defaultMessage: 'ended', description: 'Call status.' },
|
|
481
|
+
};
|
|
482
|
+
/** A single kind is just its word ("queued"); a mix spells out each count ("2 queued · 1 attached"). */
|
|
483
|
+
export function composerDrawerLabel(t, summary) {
|
|
484
|
+
const [only] = summary.parts;
|
|
485
|
+
if (summary.parts.length === 1 && only)
|
|
486
|
+
return t(`@theorem.composer.drawer.${only.kind}`);
|
|
487
|
+
return summary.parts
|
|
488
|
+
.map((part) => t(`@theorem.composer.drawer.${part.kind}.count`, { n: part.n }))
|
|
489
|
+
.join(t('@theorem.composer.drawer.separator'));
|
|
490
|
+
}
|
|
491
|
+
/** Wall-clock duration, matching Seance's builder-trace formatter: "<0.1ms", "0.4ms", "850ms", "3.2s", "12s", "1m 5s". */
|
|
492
|
+
export function workDuration(t, durationMs) {
|
|
493
|
+
const ms = Math.max(0, durationMs);
|
|
494
|
+
// A guardrail check can take a fraction of a millisecond; one decimal keeps it from reading as nothing.
|
|
495
|
+
if (ms > 0 && ms < 0.05)
|
|
496
|
+
return t('@theorem.duration.belowTenth');
|
|
497
|
+
if (ms < 10)
|
|
498
|
+
return t('@theorem.duration.milliseconds', { ms: Math.round(ms * 10) / 10 });
|
|
499
|
+
if (ms < 1_000)
|
|
500
|
+
return t('@theorem.duration.milliseconds', { ms: Math.round(ms) });
|
|
501
|
+
if (ms < 10_000)
|
|
502
|
+
return t('@theorem.duration.seconds', { seconds: Math.round(ms / 100) / 10 });
|
|
503
|
+
if (ms < 60_000)
|
|
504
|
+
return t('@theorem.duration.seconds', { seconds: Math.round(ms / 1_000) });
|
|
505
|
+
return minutesAndSeconds(t, Math.floor(ms / 60_000), Math.round((ms % 60_000) / 1_000));
|
|
506
|
+
}
|
|
507
|
+
/** Whole-second ticker while a turn runs: "0s", "12s", "1m 5s". */
|
|
508
|
+
function liveDuration(t, durationMs) {
|
|
509
|
+
const total = Math.floor(Math.max(0, durationMs) / 1_000);
|
|
510
|
+
if (total < 60)
|
|
511
|
+
return t('@theorem.duration.seconds', { seconds: total });
|
|
512
|
+
return minutesAndSeconds(t, Math.floor(total / 60), total % 60);
|
|
513
|
+
}
|
|
514
|
+
function minutesAndSeconds(t, minutes, seconds) {
|
|
515
|
+
if (seconds === 0)
|
|
516
|
+
return t('@theorem.duration.minutes', { minutes });
|
|
517
|
+
return t('@theorem.duration.minutes_seconds', { minutes, seconds });
|
|
518
|
+
}
|
|
519
|
+
/** "Working for 12s" while streaming (when the start is known), "Worked for 3.2s" after. */
|
|
520
|
+
export function workStatusLabel(t, status) {
|
|
521
|
+
if (!status)
|
|
522
|
+
return '';
|
|
523
|
+
if (status.phase === 'working') {
|
|
524
|
+
return status.elapsedMs === undefined
|
|
525
|
+
? t('@theorem.transcript.working')
|
|
526
|
+
: t('@theorem.transcript.working_for', { duration: liveDuration(t, status.elapsedMs) });
|
|
527
|
+
}
|
|
528
|
+
return status.elapsedMs === undefined
|
|
529
|
+
? t('@theorem.transcript.worked')
|
|
530
|
+
: t('@theorem.transcript.worked_for', { duration: workDuration(t, status.elapsedMs) });
|
|
531
|
+
}
|
|
532
|
+
/** A live call's status line; `calling_tool` names the tool. */
|
|
533
|
+
export function liveStateLabel(t, state, toolName) {
|
|
534
|
+
if (state === 'calling_tool')
|
|
535
|
+
return t('@theorem.live.state.calling_tool', { tool: toolName ?? '' });
|
|
536
|
+
return t(`@theorem.live.state.${state}`);
|
|
537
|
+
}
|
|
538
|
+
/** A voice note's name from its audio format; the unnamed line when the format is unknown. */
|
|
539
|
+
export function voiceNoteName(t, format) {
|
|
540
|
+
return format ? t('@theorem.voice_note.name', { format }) : t('@theorem.voice_note.unnamed');
|
|
541
|
+
}
|
|
542
|
+
const CATALOG_KEYS = new Set(Object.keys(THEOREM_UI_CATALOG));
|
|
543
|
+
function catalogParams(key) {
|
|
544
|
+
const entry = THEOREM_UI_CATALOG[key];
|
|
545
|
+
return entry?.params ?? [];
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Checks a label table before it renders: every `@theorem.*` key must exist
|
|
549
|
+
* and its message must format with that key's values only; with `strict`
|
|
550
|
+
* (the `labels` prop), every other key must be an `@astryx.*` line whose
|
|
551
|
+
* message parses. A host's own Astryx overrides are checked for `@theorem.*`
|
|
552
|
+
* keys only, since the rest may be the host app's own strings. Throws, naming
|
|
553
|
+
* the locale and key, so a typo fails at mount instead of showing a raw key or
|
|
554
|
+
* crashing mid-render.
|
|
555
|
+
*/
|
|
556
|
+
export function assertLabelOverrides(labels, strict) {
|
|
557
|
+
for (const [locale, table] of Object.entries(labels)) {
|
|
558
|
+
if (!isLocale(locale))
|
|
559
|
+
throw new Error(`Theorem labels: ${locale}: not a BCP 47 locale`); // lexicon-exempt: builder contract error
|
|
560
|
+
for (const [key, message] of Object.entries(table ?? {})) {
|
|
561
|
+
if (!strict && !key.startsWith('@theorem.'))
|
|
562
|
+
continue;
|
|
563
|
+
const problem = labelProblem(locale, key, message);
|
|
564
|
+
if (problem)
|
|
565
|
+
throw new Error(`Theorem labels: ${locale} ${key}: ${problem}`); // lexicon-exempt: builder contract error
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function isLocale(locale) {
|
|
570
|
+
try {
|
|
571
|
+
return Intl.getCanonicalLocales(locale).length === 1;
|
|
572
|
+
}
|
|
573
|
+
catch {
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
function labelProblem(locale, key, message) {
|
|
578
|
+
if (typeof message !== 'string')
|
|
579
|
+
return 'the message must be a string';
|
|
580
|
+
const theorem = key.startsWith('@theorem.');
|
|
581
|
+
if (!theorem && !key.startsWith('@astryx.'))
|
|
582
|
+
return 'keys start with @theorem. or @astryx.';
|
|
583
|
+
if (theorem && !CATALOG_KEYS.has(key))
|
|
584
|
+
return 'no such label';
|
|
585
|
+
let format;
|
|
586
|
+
try {
|
|
587
|
+
format = new IntlMessageFormat(message, locale);
|
|
588
|
+
}
|
|
589
|
+
catch (error) {
|
|
590
|
+
return `not a valid ICU message (${String(error)})`;
|
|
591
|
+
}
|
|
592
|
+
if (!theorem)
|
|
593
|
+
return undefined;
|
|
594
|
+
const params = catalogParams(key);
|
|
595
|
+
try {
|
|
596
|
+
format.format(Object.fromEntries(params.map((name) => [name, 1])));
|
|
597
|
+
}
|
|
598
|
+
catch (error) {
|
|
599
|
+
const allowed = params.length > 0 ? `may only use ${params.map((name) => `{${name}}`).join(', ')}` : 'takes no values';
|
|
600
|
+
return `the message ${allowed} (${String(error)})`;
|
|
601
|
+
}
|
|
602
|
+
return undefined;
|
|
603
|
+
}
|
package/ui/theme.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type DefinedTheme } from '@astryxdesign/core/theme';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export type TheoremThemeProviderProps = {
|
|
4
|
+
/** Force a theme. Omit to inherit the host's `<Theme>`, or fall back to {@link theoremTheme}. */
|
|
5
|
+
theme?: DefinedTheme;
|
|
6
|
+
mode?: 'system' | 'light' | 'dark';
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/** Wraps children in the Theorem theme unless the host already provides an Astryx theme. */
|
|
10
|
+
export declare function TheoremThemeProvider({ theme, mode, children }: TheoremThemeProviderProps): import("react").JSX.Element;
|
package/ui/theme.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Theme, ThemeContext } from '@astryxdesign/core/theme';
|
|
3
|
+
import { use } from 'react';
|
|
4
|
+
import { theoremTheme } from './built/theorem.js';
|
|
5
|
+
/** Wraps children in the Theorem theme unless the host already provides an Astryx theme. */
|
|
6
|
+
export function TheoremThemeProvider({ theme, mode = 'system', children }) {
|
|
7
|
+
// Ask the React tree, not `useThemeName()`: outside a Theme that falls back to
|
|
8
|
+
// the <html> attribute our own Theme sets, which would unmount it in a loop.
|
|
9
|
+
const hostTheme = use(ThemeContext);
|
|
10
|
+
if (hostTheme != null && !theme)
|
|
11
|
+
return _jsx(_Fragment, { children: children });
|
|
12
|
+
return (_jsx(Theme, { theme: theme ?? theoremTheme, mode: mode, children: children }));
|
|
13
|
+
}
|