@sero-ai/ui 0.4.0 → 0.4.2
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/.turbo/turbo-build.log +628 -628
- package/.turbo/turbo-test.log +18 -0
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +22 -2
- package/LICENSE +201 -0
- package/dist/components/ai-elements/agent.cjs +6 -6
- package/dist/components/ai-elements/agent.js +6 -6
- package/dist/components/ai-elements/artifact.cjs +2 -2
- package/dist/components/ai-elements/artifact.js +2 -2
- package/dist/components/ai-elements/attachments.cjs +2 -2
- package/dist/components/ai-elements/attachments.js +2 -2
- package/dist/components/ai-elements/chain-of-thought.cjs +2 -2
- package/dist/components/ai-elements/chain-of-thought.js +2 -2
- package/dist/components/ai-elements/code-block.cjs +7 -5
- package/dist/components/ai-elements/code-block.d.cts +2 -1
- package/dist/components/ai-elements/code-block.d.ts +2 -1
- package/dist/components/ai-elements/code-block.js +7 -5
- package/dist/components/ai-elements/commit.cjs +2 -2
- package/dist/components/ai-elements/commit.js +2 -2
- package/dist/components/ai-elements/confirmation.cjs +1 -1
- package/dist/components/ai-elements/confirmation.js +1 -1
- package/dist/components/ai-elements/conversation.cjs +2 -2
- package/dist/components/ai-elements/conversation.js +2 -2
- package/dist/components/ai-elements/environment-variables.cjs +3 -3
- package/dist/components/ai-elements/environment-variables.js +3 -3
- package/dist/components/ai-elements/file-tree.cjs +1 -1
- package/dist/components/ai-elements/file-tree.js +1 -1
- package/dist/components/ai-elements/inline-citation.cjs +3 -3
- package/dist/components/ai-elements/inline-citation.js +3 -3
- package/dist/components/ai-elements/jsx-preview.cjs +1 -1
- package/dist/components/ai-elements/jsx-preview.js +1 -1
- package/dist/components/ai-elements/message.cjs +1 -1
- package/dist/components/ai-elements/message.js +1 -1
- package/dist/components/ai-elements/package-info.cjs +4 -4
- package/dist/components/ai-elements/package-info.js +4 -4
- package/dist/components/ai-elements/prompt-input-context.cjs +2 -3
- package/dist/components/ai-elements/prompt-input-context.js +2 -3
- package/dist/components/ai-elements/queue.cjs +2 -2
- package/dist/components/ai-elements/queue.js +2 -2
- package/dist/components/ai-elements/reasoning.cjs +2 -2
- package/dist/components/ai-elements/reasoning.js +2 -2
- package/dist/components/ai-elements/sandbox.cjs +3 -3
- package/dist/components/ai-elements/sandbox.js +3 -3
- package/dist/components/ai-elements/schema-display.cjs +12 -12
- package/dist/components/ai-elements/schema-display.js +12 -12
- package/dist/components/ai-elements/speech-input.cjs +18 -2
- package/dist/components/ai-elements/speech-input.js +16 -0
- package/dist/components/ai-elements/stack-trace.cjs +1 -1
- package/dist/components/ai-elements/stack-trace.js +1 -1
- package/dist/components/ai-elements/task.cjs +3 -3
- package/dist/components/ai-elements/task.js +3 -3
- package/dist/components/ai-elements/terminal.cjs +2 -2
- package/dist/components/ai-elements/terminal.js +2 -2
- package/dist/components/ai-elements/test-results.cjs +4 -4
- package/dist/components/ai-elements/test-results.js +4 -4
- package/dist/components/ai-elements/tool.cjs +4 -4
- package/dist/components/ai-elements/tool.js +4 -4
- package/dist/components/ai-elements/transcription.cjs +1 -1
- package/dist/components/ai-elements/transcription.js +1 -1
- package/dist/components/ai-elements/web-preview.cjs +2 -2
- package/dist/components/ai-elements/web-preview.js +2 -2
- package/dist/components/context-editor/CapabilitySection.cjs +2 -2
- package/dist/components/context-editor/CapabilitySection.js +2 -2
- package/dist/components/context-editor/ContextEditor.cjs +2 -2
- package/dist/components/context-editor/ContextEditor.js +2 -2
- package/dist/components/context-editor/PresetBar.cjs +3 -3
- package/dist/components/context-editor/PresetBar.js +3 -3
- package/dist/components/context-editor/SystemPromptSection.cjs +4 -4
- package/dist/components/context-editor/SystemPromptSection.js +4 -4
- package/dist/components/context-editor/parts.cjs +6 -6
- package/dist/components/context-editor/parts.js +6 -6
- package/dist/components/dashboard/activity-list.cjs +2 -2
- package/dist/components/dashboard/activity-list.js +2 -2
- package/dist/components/dashboard/catalog.cjs +1 -322
- package/dist/components/dashboard/catalog.d.cts +1 -2
- package/dist/components/dashboard/catalog.d.ts +1 -2
- package/dist/components/dashboard/catalog.js +0 -322
- package/dist/components/dashboard/catalog.json +312 -0
- package/dist/components/dashboard/empty-state.cjs +1 -1
- package/dist/components/dashboard/empty-state.js +1 -1
- package/dist/components/dashboard/index.d.cts +1 -1
- package/dist/components/dashboard/index.d.ts +1 -1
- package/dist/components/dashboard/item-list.cjs +2 -2
- package/dist/components/dashboard/item-list.js +2 -2
- package/dist/components/dashboard/layout.cjs +1 -1
- package/dist/components/dashboard/layout.js +1 -1
- package/dist/components/dashboard/metric.cjs +1 -1
- package/dist/components/dashboard/metric.js +1 -1
- package/dist/components/dashboard/stale-indicator.cjs +1 -1
- package/dist/components/dashboard/stale-indicator.js +1 -1
- package/dist/components/dashboard/status.cjs +6 -2
- package/dist/components/dashboard/status.js +7 -3
- package/dist/components/dashboard/tone.cjs +9 -1
- package/dist/components/dashboard/tone.d.cts +7 -1
- package/dist/components/dashboard/tone.d.ts +7 -1
- package/dist/components/dashboard/tone.js +8 -0
- package/dist/components/dashboard/typography.cjs +4 -4
- package/dist/components/dashboard/typography.d.cts +1 -1
- package/dist/components/dashboard/typography.d.ts +1 -1
- package/dist/components/dashboard/typography.js +4 -4
- package/dist/components/model-selection/available-model-picker.cjs +6 -6
- package/dist/components/model-selection/available-model-picker.js +6 -6
- package/dist/components/model-selection/thinking-level-picker.cjs +1 -1
- package/dist/components/model-selection/thinking-level-picker.js +1 -1
- package/dist/components/model-selection/thinking-picker.cjs +70 -0
- package/dist/components/model-selection/thinking-picker.d.cts +12 -0
- package/dist/components/model-selection/thinking-picker.d.ts +12 -0
- package/dist/components/model-selection/thinking-picker.js +70 -0
- package/dist/components/ui/accordion.cjs +2 -2
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui/alert-dialog.cjs +4 -2
- package/dist/components/ui/alert-dialog.js +4 -2
- package/dist/components/ui/alert.cjs +2 -2
- package/dist/components/ui/alert.js +2 -2
- package/dist/components/ui/avatar.cjs +2 -2
- package/dist/components/ui/avatar.js +2 -2
- package/dist/components/ui/breadcrumb.cjs +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button-group.cjs +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.cjs +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.cjs +2 -2
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/card.cjs +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.cjs +3 -2
- package/dist/components/ui/carousel.js +2 -1
- package/dist/components/ui/chart.cjs +36 -27
- package/dist/components/ui/chart.d.cts +21 -17
- package/dist/components/ui/chart.d.ts +21 -17
- package/dist/components/ui/chart.js +30 -21
- package/dist/components/ui/combobox.cjs +7 -5
- package/dist/components/ui/combobox.js +7 -5
- package/dist/components/ui/command.cjs +3 -3
- package/dist/components/ui/command.js +3 -3
- package/dist/components/ui/context-menu.cjs +10 -7
- package/dist/components/ui/context-menu.js +10 -7
- package/dist/components/ui/dialog.cjs +4 -2
- package/dist/components/ui/dialog.js +4 -2
- package/dist/components/ui/drawer.cjs +4 -2
- package/dist/components/ui/drawer.js +4 -2
- package/dist/components/ui/dropdown-menu.cjs +10 -7
- package/dist/components/ui/dropdown-menu.js +10 -7
- package/dist/components/ui/empty.cjs +2 -2
- package/dist/components/ui/empty.js +2 -2
- package/dist/components/ui/field.cjs +5 -5
- package/dist/components/ui/field.js +5 -5
- package/dist/components/ui/form.cjs +2 -2
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/hover-card.cjs +3 -1
- package/dist/components/ui/hover-card.js +3 -1
- package/dist/components/ui/input-group.cjs +3 -3
- package/dist/components/ui/input-group.js +3 -3
- package/dist/components/ui/input-otp.cjs +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/item.cjs +3 -3
- package/dist/components/ui/item.js +3 -3
- package/dist/components/ui/label.cjs +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/menubar.cjs +9 -7
- package/dist/components/ui/menubar.js +9 -7
- package/dist/components/ui/native-select.cjs +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.cjs +2 -2
- package/dist/components/ui/navigation-menu.js +2 -2
- package/dist/components/ui/plugin-safety-disclaimer.cjs +1 -1
- package/dist/components/ui/plugin-safety-disclaimer.js +1 -1
- package/dist/components/ui/popover.cjs +4 -2
- package/dist/components/ui/popover.js +4 -2
- package/dist/components/ui/select.cjs +5 -3
- package/dist/components/ui/select.js +5 -3
- package/dist/components/ui/sheet.cjs +4 -2
- package/dist/components/ui/sheet.js +4 -2
- package/dist/components/ui/sidebar.cjs +5 -5
- package/dist/components/ui/sidebar.js +5 -5
- package/dist/components/ui/table.cjs +2 -2
- package/dist/components/ui/table.js +2 -2
- package/dist/components/ui/tabs.cjs +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/toggle.cjs +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/tooltip.cjs +3 -1
- package/dist/components/ui/tooltip.js +3 -1
- package/dist/index.cjs +5 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/plugin-style-scope-context.cjs +10 -0
- package/dist/plugin-style-scope-context.d.cts +13 -0
- package/dist/plugin-style-scope-context.d.ts +13 -0
- package/dist/plugin-style-scope-context.js +10 -0
- package/dist/plugin-style-scope.cjs +25 -0
- package/dist/plugin-style-scope.d.cts +11 -0
- package/dist/plugin-style-scope.d.ts +11 -0
- package/dist/plugin-style-scope.js +25 -0
- package/dist/reference.cjs +1251 -3
- package/dist/reference.d.cts +11 -5
- package/dist/reference.d.ts +11 -5
- package/dist/reference.js +1224 -6
- package/dist/styles/globals.css +22 -3
- package/dist/styles/plugin-theme.css +80 -0
- package/dist/styles/plugin.css +14 -2
- package/package.json +53 -70
- package/scripts/ensure-pnpm-publish.mjs +23 -0
- package/scripts/smoke-dist.mjs +68 -0
- package/src/components/ai-elements/agent.tsx +6 -6
- package/src/components/ai-elements/artifact.tsx +2 -2
- package/src/components/ai-elements/attachments.tsx +2 -2
- package/src/components/ai-elements/chain-of-thought.tsx +2 -2
- package/src/components/ai-elements/code-block.tsx +6 -3
- package/src/components/ai-elements/commit.tsx +2 -2
- package/src/components/ai-elements/confirmation.tsx +1 -1
- package/src/components/ai-elements/conversation.tsx +2 -2
- package/src/components/ai-elements/environment-variables.tsx +3 -3
- package/src/components/ai-elements/file-tree.tsx +1 -1
- package/src/components/ai-elements/inline-citation.tsx +3 -3
- package/src/components/ai-elements/jsx-preview.tsx +1 -1
- package/src/components/ai-elements/message.tsx +1 -1
- package/src/components/ai-elements/package-info.tsx +4 -4
- package/src/components/ai-elements/prompt-input-context.tsx +3 -2
- package/src/components/ai-elements/queue.tsx +2 -2
- package/src/components/ai-elements/reasoning.tsx +2 -2
- package/src/components/ai-elements/sandbox.tsx +3 -3
- package/src/components/ai-elements/schema-display.tsx +12 -12
- package/src/components/ai-elements/speech-input.tsx +17 -0
- package/src/components/ai-elements/stack-trace.tsx +1 -1
- package/src/components/ai-elements/task.tsx +3 -3
- package/src/components/ai-elements/terminal.tsx +2 -2
- package/src/components/ai-elements/test-results.tsx +4 -4
- package/src/components/ai-elements/tool.tsx +4 -4
- package/src/components/ai-elements/transcription.tsx +1 -1
- package/src/components/ai-elements/web-preview.tsx +2 -2
- package/src/components/context-editor/CapabilitySection.tsx +2 -2
- package/src/components/context-editor/ContextEditor.tsx +2 -2
- package/src/components/context-editor/PresetBar.tsx +3 -3
- package/src/components/context-editor/SystemPromptSection.tsx +4 -4
- package/src/components/context-editor/parts.tsx +6 -6
- package/src/components/dashboard/__tests__/catalog.test.ts +7 -2
- package/src/components/dashboard/__tests__/state.test.tsx +19 -2
- package/src/components/dashboard/activity-list.tsx +2 -2
- package/src/components/dashboard/catalog.json +312 -0
- package/src/components/dashboard/catalog.ts +6 -328
- package/src/components/dashboard/empty-state.tsx +1 -1
- package/src/components/dashboard/index.ts +2 -2
- package/src/components/dashboard/item-list.tsx +2 -2
- package/src/components/dashboard/layout.tsx +1 -1
- package/src/components/dashboard/metric.tsx +1 -1
- package/src/components/dashboard/stale-indicator.tsx +1 -1
- package/src/components/dashboard/status.tsx +15 -2
- package/src/components/dashboard/tone.ts +13 -0
- package/src/components/dashboard/typography.tsx +5 -5
- package/src/components/model-selection/available-model-picker.tsx +7 -7
- package/src/components/model-selection/thinking-level-picker.tsx +1 -1
- package/src/components/model-selection/thinking-picker.tsx +90 -0
- package/src/components/ui/accordion.tsx +2 -2
- package/src/components/ui/alert-dialog.tsx +4 -2
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/avatar.tsx +2 -2
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/button-group.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/calendar.tsx +3 -3
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/carousel.tsx +2 -1
- package/src/components/ui/chart.tsx +54 -36
- package/src/components/ui/combobox.tsx +7 -5
- package/src/components/ui/command.tsx +3 -3
- package/src/components/ui/context-menu.tsx +10 -7
- package/src/components/ui/dialog.tsx +4 -2
- package/src/components/ui/drawer.tsx +4 -2
- package/src/components/ui/dropdown-menu.tsx +10 -7
- package/src/components/ui/empty.tsx +2 -2
- package/src/components/ui/field.tsx +5 -5
- package/src/components/ui/form.tsx +2 -2
- package/src/components/ui/hover-card.tsx +3 -1
- package/src/components/ui/input-group.tsx +3 -3
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +3 -3
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +9 -7
- package/src/components/ui/native-select.tsx +1 -1
- package/src/components/ui/navigation-menu.tsx +2 -2
- package/src/components/ui/plugin-safety-disclaimer.tsx +1 -1
- package/src/components/ui/popover.tsx +4 -2
- package/src/components/ui/select.tsx +5 -3
- package/src/components/ui/sheet.tsx +4 -2
- package/src/components/ui/sidebar.tsx +5 -5
- package/src/components/ui/table.tsx +2 -2
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +3 -1
- package/src/index.ts +5 -1
- package/src/plugin-style-scope-context.ts +21 -0
- package/src/plugin-style-scope.test.tsx +38 -0
- package/src/plugin-style-scope.tsx +35 -0
- package/src/styles/globals.css +22 -3
- package/src/styles/plugin-theme.css +80 -0
- package/src/styles/plugin.css +14 -2
- package/tsup.config.ts +13 -3
- package/tsup.reference.config.ts +15 -0
- package/dist/components/reference/ActivityExample.cjs +0 -47
- package/dist/components/reference/ActivityExample.d.cts +0 -5
- package/dist/components/reference/ActivityExample.d.ts +0 -5
- package/dist/components/reference/ActivityExample.js +0 -47
- package/dist/components/reference/ResourceExample.cjs +0 -54
- package/dist/components/reference/ResourceExample.d.cts +0 -5
- package/dist/components/reference/ResourceExample.d.ts +0 -5
- package/dist/components/reference/ResourceExample.js +0 -54
- package/dist/components/reference/SchedulerExample.cjs +0 -68
- package/dist/components/reference/SchedulerExample.d.cts +0 -5
- package/dist/components/reference/SchedulerExample.d.ts +0 -5
- package/dist/components/reference/SchedulerExample.js +0 -68
- package/dist/components/reference/StarterExample.cjs +0 -34
- package/dist/components/reference/StarterExample.d.cts +0 -5
- package/dist/components/reference/StarterExample.d.ts +0 -5
- package/dist/components/reference/StarterExample.js +0 -34
- package/dist/components/reference/index.cjs +0 -10
- package/dist/components/reference/index.d.cts +0 -5
- package/dist/components/reference/index.d.ts +0 -5
- package/dist/components/reference/index.js +0 -10
- package/dist/dashboard-catalog.cjs +0 -8
- package/dist/dashboard-catalog.d.cts +0 -1
- package/dist/dashboard-catalog.d.ts +0 -1
- package/dist/dashboard-catalog.js +0 -8
- package/src/dashboard-catalog.ts +0 -13
|
@@ -30,6 +30,7 @@ const SpeechInput = ({
|
|
|
30
30
|
const [isRecognitionReady, setIsRecognitionReady] = _react.useState.call(void 0, false);
|
|
31
31
|
const recognitionRef = _react.useRef.call(void 0, null);
|
|
32
32
|
const mediaRecorderRef = _react.useRef.call(void 0, null);
|
|
33
|
+
const mediaRecorderCleanupRef = _react.useRef.call(void 0, null);
|
|
33
34
|
const streamRef = _react.useRef.call(void 0, null);
|
|
34
35
|
const audioChunksRef = _react.useRef.call(void 0, []);
|
|
35
36
|
const onTranscriptionChangeRef = _react.useRef.call(void 0, onTranscriptionChange);
|
|
@@ -88,6 +89,7 @@ const SpeechInput = ({
|
|
|
88
89
|
if (_optionalChain([mediaRecorderRef, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.state]) === "recording") {
|
|
89
90
|
mediaRecorderRef.current.stop();
|
|
90
91
|
}
|
|
92
|
+
_optionalChain([mediaRecorderCleanupRef, 'access', _7 => _7.current, 'optionalCall', _8 => _8()]);
|
|
91
93
|
if (streamRef.current) {
|
|
92
94
|
for (const track of streamRef.current.getTracks()) {
|
|
93
95
|
track.stop();
|
|
@@ -115,6 +117,7 @@ const SpeechInput = ({
|
|
|
115
117
|
track.stop();
|
|
116
118
|
}
|
|
117
119
|
streamRef.current = null;
|
|
120
|
+
cleanupMediaRecorder();
|
|
118
121
|
const audioBlob = new Blob(audioChunksRef.current, {
|
|
119
122
|
type: "audio/webm"
|
|
120
123
|
});
|
|
@@ -123,7 +126,7 @@ const SpeechInput = ({
|
|
|
123
126
|
try {
|
|
124
127
|
const transcript = await onAudioRecordedRef.current(audioBlob);
|
|
125
128
|
if (transcript) {
|
|
126
|
-
_optionalChain([onTranscriptionChangeRef, 'access',
|
|
129
|
+
_optionalChain([onTranscriptionChangeRef, 'access', _9 => _9.current, 'optionalCall', _10 => _10(transcript)]);
|
|
127
130
|
}
|
|
128
131
|
} catch (e) {
|
|
129
132
|
} finally {
|
|
@@ -137,11 +140,24 @@ const SpeechInput = ({
|
|
|
137
140
|
track.stop();
|
|
138
141
|
}
|
|
139
142
|
streamRef.current = null;
|
|
143
|
+
cleanupMediaRecorder();
|
|
144
|
+
};
|
|
145
|
+
const cleanupMediaRecorder = () => {
|
|
146
|
+
mediaRecorder.removeEventListener("dataavailable", handleDataAvailable);
|
|
147
|
+
mediaRecorder.removeEventListener("stop", handleStop);
|
|
148
|
+
mediaRecorder.removeEventListener("error", handleError);
|
|
149
|
+
if (mediaRecorderRef.current === mediaRecorder) {
|
|
150
|
+
mediaRecorderRef.current = null;
|
|
151
|
+
}
|
|
152
|
+
if (mediaRecorderCleanupRef.current === cleanupMediaRecorder) {
|
|
153
|
+
mediaRecorderCleanupRef.current = null;
|
|
154
|
+
}
|
|
140
155
|
};
|
|
141
156
|
mediaRecorder.addEventListener("dataavailable", handleDataAvailable);
|
|
142
157
|
mediaRecorder.addEventListener("stop", handleStop);
|
|
143
158
|
mediaRecorder.addEventListener("error", handleError);
|
|
144
159
|
mediaRecorderRef.current = mediaRecorder;
|
|
160
|
+
mediaRecorderCleanupRef.current = cleanupMediaRecorder;
|
|
145
161
|
mediaRecorder.start();
|
|
146
162
|
setIsListening(true);
|
|
147
163
|
} catch (e2) {
|
|
@@ -149,7 +165,7 @@ const SpeechInput = ({
|
|
|
149
165
|
}
|
|
150
166
|
}, []);
|
|
151
167
|
const stopMediaRecorder = _react.useCallback.call(void 0, () => {
|
|
152
|
-
if (_optionalChain([mediaRecorderRef, 'access',
|
|
168
|
+
if (_optionalChain([mediaRecorderRef, 'access', _11 => _11.current, 'optionalAccess', _12 => _12.state]) === "recording") {
|
|
153
169
|
mediaRecorderRef.current.stop();
|
|
154
170
|
}
|
|
155
171
|
setIsListening(false);
|
|
@@ -30,6 +30,7 @@ const SpeechInput = ({
|
|
|
30
30
|
const [isRecognitionReady, setIsRecognitionReady] = useState(false);
|
|
31
31
|
const recognitionRef = useRef(null);
|
|
32
32
|
const mediaRecorderRef = useRef(null);
|
|
33
|
+
const mediaRecorderCleanupRef = useRef(null);
|
|
33
34
|
const streamRef = useRef(null);
|
|
34
35
|
const audioChunksRef = useRef([]);
|
|
35
36
|
const onTranscriptionChangeRef = useRef(onTranscriptionChange);
|
|
@@ -88,6 +89,7 @@ const SpeechInput = ({
|
|
|
88
89
|
if (mediaRecorderRef.current?.state === "recording") {
|
|
89
90
|
mediaRecorderRef.current.stop();
|
|
90
91
|
}
|
|
92
|
+
mediaRecorderCleanupRef.current?.();
|
|
91
93
|
if (streamRef.current) {
|
|
92
94
|
for (const track of streamRef.current.getTracks()) {
|
|
93
95
|
track.stop();
|
|
@@ -115,6 +117,7 @@ const SpeechInput = ({
|
|
|
115
117
|
track.stop();
|
|
116
118
|
}
|
|
117
119
|
streamRef.current = null;
|
|
120
|
+
cleanupMediaRecorder();
|
|
118
121
|
const audioBlob = new Blob(audioChunksRef.current, {
|
|
119
122
|
type: "audio/webm"
|
|
120
123
|
});
|
|
@@ -137,11 +140,24 @@ const SpeechInput = ({
|
|
|
137
140
|
track.stop();
|
|
138
141
|
}
|
|
139
142
|
streamRef.current = null;
|
|
143
|
+
cleanupMediaRecorder();
|
|
144
|
+
};
|
|
145
|
+
const cleanupMediaRecorder = () => {
|
|
146
|
+
mediaRecorder.removeEventListener("dataavailable", handleDataAvailable);
|
|
147
|
+
mediaRecorder.removeEventListener("stop", handleStop);
|
|
148
|
+
mediaRecorder.removeEventListener("error", handleError);
|
|
149
|
+
if (mediaRecorderRef.current === mediaRecorder) {
|
|
150
|
+
mediaRecorderRef.current = null;
|
|
151
|
+
}
|
|
152
|
+
if (mediaRecorderCleanupRef.current === cleanupMediaRecorder) {
|
|
153
|
+
mediaRecorderCleanupRef.current = null;
|
|
154
|
+
}
|
|
140
155
|
};
|
|
141
156
|
mediaRecorder.addEventListener("dataavailable", handleDataAvailable);
|
|
142
157
|
mediaRecorder.addEventListener("stop", handleStop);
|
|
143
158
|
mediaRecorder.addEventListener("error", handleError);
|
|
144
159
|
mediaRecorderRef.current = mediaRecorder;
|
|
160
|
+
mediaRecorderCleanupRef.current = cleanupMediaRecorder;
|
|
145
161
|
mediaRecorder.start();
|
|
146
162
|
setIsListening(true);
|
|
147
163
|
} catch {
|
|
@@ -131,7 +131,7 @@ const StackTrace = _react.memo.call(void 0,
|
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
133
|
className: _utils.cn.call(void 0,
|
|
134
|
-
"not-prose w-full overflow-hidden rounded-lg border bg-background font-mono text-
|
|
134
|
+
"not-prose w-full overflow-hidden rounded-lg border bg-background font-mono text-base",
|
|
135
135
|
className
|
|
136
136
|
),
|
|
137
137
|
...props,
|
|
@@ -131,7 +131,7 @@ const StackTrace = memo(
|
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
133
|
className: cn(
|
|
134
|
-
"not-prose w-full overflow-hidden rounded-lg border bg-background font-mono text-
|
|
134
|
+
"not-prose w-full overflow-hidden rounded-lg border bg-background font-mono text-base",
|
|
135
135
|
className
|
|
136
136
|
),
|
|
137
137
|
...props,
|
|
@@ -22,7 +22,7 @@ const TaskItemFile = ({
|
|
|
22
22
|
children
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
const TaskItem = ({ children, className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _utils.cn.call(void 0, "text-muted-foreground text-
|
|
25
|
+
const TaskItem = ({ children, className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _utils.cn.call(void 0, "text-muted-foreground text-base", className), ...props, children });
|
|
26
26
|
const Task = ({
|
|
27
27
|
defaultOpen = true,
|
|
28
28
|
className,
|
|
@@ -33,9 +33,9 @@ const TaskTrigger = ({
|
|
|
33
33
|
className,
|
|
34
34
|
title,
|
|
35
35
|
...props
|
|
36
|
-
}) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _collapsible.CollapsibleTrigger, { asChild: true, className: _utils.cn.call(void 0, "group", className), ...props, children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-
|
|
36
|
+
}) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _collapsible.CollapsibleTrigger, { asChild: true, className: _utils.cn.call(void 0, "group", className), ...props, children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-base transition-colors hover:text-foreground", children: [
|
|
37
37
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, { className: "size-4" }),
|
|
38
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-
|
|
38
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-base", children: title }),
|
|
39
39
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "size-4 transition-transform group-data-[state=open]:rotate-180" })
|
|
40
40
|
] }))) });
|
|
41
41
|
const TaskContent = ({
|
|
@@ -22,7 +22,7 @@ const TaskItemFile = ({
|
|
|
22
22
|
children
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
const TaskItem = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("text-muted-foreground text-
|
|
25
|
+
const TaskItem = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("text-muted-foreground text-base", className), ...props, children });
|
|
26
26
|
const Task = ({
|
|
27
27
|
defaultOpen = true,
|
|
28
28
|
className,
|
|
@@ -33,9 +33,9 @@ const TaskTrigger = ({
|
|
|
33
33
|
className,
|
|
34
34
|
title,
|
|
35
35
|
...props
|
|
36
|
-
}) => /* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, className: cn("group", className), ...props, children: children ?? /* @__PURE__ */ jsxs("div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-
|
|
36
|
+
}) => /* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, className: cn("group", className), ...props, children: children ?? /* @__PURE__ */ jsxs("div", { className: "flex w-full cursor-pointer items-center gap-2 text-muted-foreground text-base transition-colors hover:text-foreground", children: [
|
|
37
37
|
/* @__PURE__ */ jsx(SearchIcon, { className: "size-4" }),
|
|
38
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
38
|
+
/* @__PURE__ */ jsx("p", { className: "text-base", children: title }),
|
|
39
39
|
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 transition-transform group-data-[state=open]:rotate-180" })
|
|
40
40
|
] }) });
|
|
41
41
|
const TaskContent = ({
|
|
@@ -78,7 +78,7 @@ const TerminalTitle = ({
|
|
|
78
78
|
}) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
|
-
className: _utils.cn.call(void 0, "flex items-center gap-2 text-
|
|
81
|
+
className: _utils.cn.call(void 0, "flex items-center gap-2 text-base text-zinc-400", className),
|
|
82
82
|
...props,
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.TerminalIcon, { className: "size-4" }),
|
|
@@ -196,7 +196,7 @@ const TerminalContent = ({
|
|
|
196
196
|
"div",
|
|
197
197
|
{
|
|
198
198
|
className: _utils.cn.call(void 0,
|
|
199
|
-
"max-h-96 overflow-auto p-4 font-mono text-
|
|
199
|
+
"max-h-96 overflow-auto p-4 font-mono text-base leading-relaxed",
|
|
200
200
|
className
|
|
201
201
|
),
|
|
202
202
|
ref: containerRef,
|
|
@@ -78,7 +78,7 @@ const TerminalTitle = ({
|
|
|
78
78
|
}) => /* @__PURE__ */ jsxs(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
|
-
className: cn("flex items-center gap-2 text-
|
|
81
|
+
className: cn("flex items-center gap-2 text-base text-zinc-400", className),
|
|
82
82
|
...props,
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ jsx(TerminalIcon, { className: "size-4" }),
|
|
@@ -196,7 +196,7 @@ const TerminalContent = ({
|
|
|
196
196
|
"div",
|
|
197
197
|
{
|
|
198
198
|
className: cn(
|
|
199
|
-
"max-h-96 overflow-auto p-4 font-mono text-
|
|
199
|
+
"max-h-96 overflow-auto p-4 font-mono text-base leading-relaxed",
|
|
200
200
|
className
|
|
201
201
|
),
|
|
202
202
|
ref: containerRef,
|
|
@@ -113,7 +113,7 @@ const TestResultsDuration = ({
|
|
|
113
113
|
if (!_optionalChain([summary, 'optionalAccess', _ => _.duration])) {
|
|
114
114
|
return null;
|
|
115
115
|
}
|
|
116
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _utils.cn.call(void 0, "text-muted-foreground text-
|
|
116
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _utils.cn.call(void 0, "text-muted-foreground text-base", className), ...props, children: _nullishCoalesce(children, () => ( formatDuration(summary.duration))) });
|
|
117
117
|
};
|
|
118
118
|
const TestResultsProgress = ({
|
|
119
119
|
className,
|
|
@@ -193,7 +193,7 @@ const TestSuiteName = ({
|
|
|
193
193
|
children: [
|
|
194
194
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" }),
|
|
195
195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TestStatusIcon, { status }),
|
|
196
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-
|
|
196
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-base", children: _nullishCoalesce(children, () => ( name)) })
|
|
197
197
|
]
|
|
198
198
|
}
|
|
199
199
|
);
|
|
@@ -250,7 +250,7 @@ const Test = ({
|
|
|
250
250
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TestContext.Provider, { value: contextValue, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
251
251
|
"div",
|
|
252
252
|
{
|
|
253
|
-
className: _utils.cn.call(void 0, "flex items-center gap-2 px-4 py-2 text-
|
|
253
|
+
className: _utils.cn.call(void 0, "flex items-center gap-2 px-4 py-2 text-base", className),
|
|
254
254
|
...props,
|
|
255
255
|
children: _nullishCoalesce(children, () => ( /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
256
256
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TestStatus, {}),
|
|
@@ -333,7 +333,7 @@ const TestErrorMessage = ({
|
|
|
333
333
|
"p",
|
|
334
334
|
{
|
|
335
335
|
className: _utils.cn.call(void 0,
|
|
336
|
-
"font-medium text-red-700 text-
|
|
336
|
+
"font-medium text-red-700 text-base dark:text-red-400",
|
|
337
337
|
className
|
|
338
338
|
),
|
|
339
339
|
...props,
|
|
@@ -113,7 +113,7 @@ const TestResultsDuration = ({
|
|
|
113
113
|
if (!summary?.duration) {
|
|
114
114
|
return null;
|
|
115
115
|
}
|
|
116
|
-
return /* @__PURE__ */ jsx("span", { className: cn("text-muted-foreground text-
|
|
116
|
+
return /* @__PURE__ */ jsx("span", { className: cn("text-muted-foreground text-base", className), ...props, children: children ?? formatDuration(summary.duration) });
|
|
117
117
|
};
|
|
118
118
|
const TestResultsProgress = ({
|
|
119
119
|
className,
|
|
@@ -193,7 +193,7 @@ const TestSuiteName = ({
|
|
|
193
193
|
children: [
|
|
194
194
|
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" }),
|
|
195
195
|
/* @__PURE__ */ jsx(TestStatusIcon, { status }),
|
|
196
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-
|
|
196
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-base", children: children ?? name })
|
|
197
197
|
]
|
|
198
198
|
}
|
|
199
199
|
);
|
|
@@ -250,7 +250,7 @@ const Test = ({
|
|
|
250
250
|
return /* @__PURE__ */ jsx(TestContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
251
251
|
"div",
|
|
252
252
|
{
|
|
253
|
-
className: cn("flex items-center gap-2 px-4 py-2 text-
|
|
253
|
+
className: cn("flex items-center gap-2 px-4 py-2 text-base", className),
|
|
254
254
|
...props,
|
|
255
255
|
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
256
256
|
/* @__PURE__ */ jsx(TestStatus, {}),
|
|
@@ -333,7 +333,7 @@ const TestErrorMessage = ({
|
|
|
333
333
|
"p",
|
|
334
334
|
{
|
|
335
335
|
className: cn(
|
|
336
|
-
"font-medium text-red-700 text-
|
|
336
|
+
"font-medium text-red-700 text-base dark:text-red-400",
|
|
337
337
|
className
|
|
338
338
|
),
|
|
339
339
|
...props,
|
|
@@ -65,7 +65,7 @@ const ToolHeader = ({
|
|
|
65
65
|
...props,
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
68
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.WrenchIcon, { className: "size-
|
|
68
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.WrenchIcon, { className: "size-3.5 text-muted-foreground" }),
|
|
69
69
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-sm", children: _nullishCoalesce(title, () => ( derivedName)) }),
|
|
70
70
|
getStatusBadge(state)
|
|
71
71
|
] }),
|
|
@@ -86,7 +86,7 @@ const ToolContent = ({ className, ...props }) => /* @__PURE__ */ _jsxruntime.jsx
|
|
|
86
86
|
);
|
|
87
87
|
const ToolInput = ({ className, input, ...props }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _utils.cn.call(void 0, "space-y-2 overflow-hidden", className), ...props, children: [
|
|
88
88
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Parameters" }),
|
|
89
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { code: JSON.stringify(input, null, 2), language: "json" }) })
|
|
89
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { className: "text-sm", code: JSON.stringify(input, null, 2), language: "json" }) })
|
|
90
90
|
] });
|
|
91
91
|
const ToolOutput = ({
|
|
92
92
|
className,
|
|
@@ -99,9 +99,9 @@ const ToolOutput = ({
|
|
|
99
99
|
}
|
|
100
100
|
let Output = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: output });
|
|
101
101
|
if (typeof output === "object" && !_react.isValidElement.call(void 0, output)) {
|
|
102
|
-
Output = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { code: JSON.stringify(output, null, 2), language: "json" });
|
|
102
|
+
Output = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { className: "text-sm", code: JSON.stringify(output, null, 2), language: "json" });
|
|
103
103
|
} else if (typeof output === "string") {
|
|
104
|
-
Output = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { code: output, language: "json" });
|
|
104
|
+
Output = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _codeblock.CodeBlock, { className: "text-sm", code: output, language: "json" });
|
|
105
105
|
}
|
|
106
106
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _utils.cn.call(void 0, "space-y-2", className), ...props, children: [
|
|
107
107
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: errorText ? "Error" : "Result" }),
|
|
@@ -65,7 +65,7 @@ const ToolHeader = ({
|
|
|
65
65
|
...props,
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
68
|
-
/* @__PURE__ */ jsx(WrenchIcon, { className: "size-
|
|
68
|
+
/* @__PURE__ */ jsx(WrenchIcon, { className: "size-3.5 text-muted-foreground" }),
|
|
69
69
|
/* @__PURE__ */ jsx("span", { className: "font-medium text-sm", children: title ?? derivedName }),
|
|
70
70
|
getStatusBadge(state)
|
|
71
71
|
] }),
|
|
@@ -86,7 +86,7 @@ const ToolContent = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
86
86
|
);
|
|
87
87
|
const ToolInput = ({ className, input, ...props }) => /* @__PURE__ */ jsxs("div", { className: cn("space-y-2 overflow-hidden", className), ...props, children: [
|
|
88
88
|
/* @__PURE__ */ jsx("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: "Parameters" }),
|
|
89
|
-
/* @__PURE__ */ jsx("div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(input, null, 2), language: "json" }) })
|
|
89
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-md bg-muted/50", children: /* @__PURE__ */ jsx(CodeBlock, { className: "text-sm", code: JSON.stringify(input, null, 2), language: "json" }) })
|
|
90
90
|
] });
|
|
91
91
|
const ToolOutput = ({
|
|
92
92
|
className,
|
|
@@ -99,9 +99,9 @@ const ToolOutput = ({
|
|
|
99
99
|
}
|
|
100
100
|
let Output = /* @__PURE__ */ jsx("div", { children: output });
|
|
101
101
|
if (typeof output === "object" && !isValidElement(output)) {
|
|
102
|
-
Output = /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(output, null, 2), language: "json" });
|
|
102
|
+
Output = /* @__PURE__ */ jsx(CodeBlock, { className: "text-sm", code: JSON.stringify(output, null, 2), language: "json" });
|
|
103
103
|
} else if (typeof output === "string") {
|
|
104
|
-
Output = /* @__PURE__ */ jsx(CodeBlock, { code: output, language: "json" });
|
|
104
|
+
Output = /* @__PURE__ */ jsx(CodeBlock, { className: "text-sm", code: output, language: "json" });
|
|
105
105
|
}
|
|
106
106
|
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", className), ...props, children: [
|
|
107
107
|
/* @__PURE__ */ jsx("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: errorText ? "Error" : "Result" }),
|
|
@@ -130,7 +130,7 @@ const WebPreviewUrl = ({
|
|
|
130
130
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
131
131
|
_input.Input,
|
|
132
132
|
{
|
|
133
|
-
className: "h-8 flex-1 text-
|
|
133
|
+
className: "h-8 flex-1 text-base",
|
|
134
134
|
onChange: _nullishCoalesce(onChange, () => ( handleChange)),
|
|
135
135
|
onKeyDown: handleKeyDown,
|
|
136
136
|
placeholder: "Enter URL...",
|
|
@@ -170,7 +170,7 @@ const WebPreviewConsole = ({
|
|
|
170
170
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
171
171
|
_collapsible.Collapsible,
|
|
172
172
|
{
|
|
173
|
-
className: _utils.cn.call(void 0, "border-t bg-muted/50 font-mono text-
|
|
173
|
+
className: _utils.cn.call(void 0, "border-t bg-muted/50 font-mono text-base", className),
|
|
174
174
|
onOpenChange: setConsoleOpen,
|
|
175
175
|
open: consoleOpen,
|
|
176
176
|
...props,
|
|
@@ -130,7 +130,7 @@ const WebPreviewUrl = ({
|
|
|
130
130
|
return /* @__PURE__ */ jsx(
|
|
131
131
|
Input,
|
|
132
132
|
{
|
|
133
|
-
className: "h-8 flex-1 text-
|
|
133
|
+
className: "h-8 flex-1 text-base",
|
|
134
134
|
onChange: onChange ?? handleChange,
|
|
135
135
|
onKeyDown: handleKeyDown,
|
|
136
136
|
placeholder: "Enter URL...",
|
|
@@ -170,7 +170,7 @@ const WebPreviewConsole = ({
|
|
|
170
170
|
return /* @__PURE__ */ jsxs(
|
|
171
171
|
Collapsible,
|
|
172
172
|
{
|
|
173
|
-
className: cn("border-t bg-muted/50 font-mono text-
|
|
173
|
+
className: cn("border-t bg-muted/50 font-mono text-base", className),
|
|
174
174
|
onOpenChange: setConsoleOpen,
|
|
175
175
|
open: consoleOpen,
|
|
176
176
|
...props,
|
|
@@ -27,7 +27,7 @@ function CapabilitySection({
|
|
|
27
27
|
defaultOpen: false,
|
|
28
28
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-1", children: [
|
|
29
29
|
items.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-1 flex items-center justify-between rounded-md border-b border-border/20 px-2 pb-2", children: [
|
|
30
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
30
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium text-[var(--text-secondary)]", children: includeAllLabel }),
|
|
31
31
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
32
32
|
_switch.Switch,
|
|
33
33
|
{
|
|
@@ -47,7 +47,7 @@ function CapabilitySection({
|
|
|
47
47
|
},
|
|
48
48
|
item.name
|
|
49
49
|
)),
|
|
50
|
-
items.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
50
|
+
items.length === 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm italic text-[var(--text-muted)]", children: emptyLabel })
|
|
51
51
|
] })
|
|
52
52
|
}
|
|
53
53
|
);
|
|
@@ -27,7 +27,7 @@ function CapabilitySection({
|
|
|
27
27
|
defaultOpen: false,
|
|
28
28
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
29
29
|
items.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between rounded-md border-b border-border/20 px-2 pb-2", children: [
|
|
30
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[var(--text-secondary)]", children: includeAllLabel }),
|
|
31
31
|
/* @__PURE__ */ jsx(
|
|
32
32
|
Switch,
|
|
33
33
|
{
|
|
@@ -47,7 +47,7 @@ function CapabilitySection({
|
|
|
47
47
|
},
|
|
48
48
|
item.name
|
|
49
49
|
)),
|
|
50
|
-
items.length === 0 && /* @__PURE__ */ jsx("span", { className: "text-
|
|
50
|
+
items.length === 0 && /* @__PURE__ */ jsx("span", { className: "text-sm italic text-[var(--text-muted)]", children: emptyLabel })
|
|
51
51
|
] })
|
|
52
52
|
}
|
|
53
53
|
);
|
|
@@ -49,7 +49,7 @@ function ContextEditor({
|
|
|
49
49
|
showCloseButton: true,
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dialog.DialogHeader, { children: [
|
|
52
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dialog.DialogTitle, { className: "flex items-center gap-2 text-
|
|
52
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dialog.DialogTitle, { className: "flex items-center gap-2 text-base", children: [
|
|
53
53
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Settings2, { className: "size-4 text-[var(--text-muted)]" }),
|
|
54
54
|
title
|
|
55
55
|
] }),
|
|
@@ -74,7 +74,7 @@ function ContextEditor({
|
|
|
74
74
|
] }) }),
|
|
75
75
|
applyError && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-2 rounded-md border border-status-error-border bg-status-error-muted px-3 py-2", children: [
|
|
76
76
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "mt-0.5 size-3.5 shrink-0 text-status-error" }),
|
|
77
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
77
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-status-error", children: applyError })
|
|
78
78
|
] }),
|
|
79
79
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dialog.DialogFooter, { children: [
|
|
80
80
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -49,7 +49,7 @@ function ContextEditor({
|
|
|
49
49
|
showCloseButton: true,
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
52
|
-
/* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2 text-
|
|
52
|
+
/* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2 text-base", children: [
|
|
53
53
|
/* @__PURE__ */ jsx(Settings2, { className: "size-4 text-[var(--text-muted)]" }),
|
|
54
54
|
title
|
|
55
55
|
] }),
|
|
@@ -74,7 +74,7 @@ function ContextEditor({
|
|
|
74
74
|
] }) }),
|
|
75
75
|
applyError && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 rounded-md border border-status-error-border bg-status-error-muted px-3 py-2", children: [
|
|
76
76
|
/* @__PURE__ */ jsx(AlertCircle, { className: "mt-0.5 size-3.5 shrink-0 text-status-error" }),
|
|
77
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-status-error", children: applyError })
|
|
78
78
|
] }),
|
|
79
79
|
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
80
80
|
/* @__PURE__ */ jsx(
|
|
@@ -23,7 +23,7 @@ function PresetBar({
|
|
|
23
23
|
}) {
|
|
24
24
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
25
25
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
26
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
26
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium text-[var(--text-muted)]", children: "Preset:" }),
|
|
27
27
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _select.Select, { value: _nullishCoalesce(activePresetId, () => ( "")), onValueChange: onPresetChange, children: [
|
|
28
28
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _select.SelectTrigger, { size: "sm", className: "h-7 w-40 text-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _select.SelectValue, { placeholder: "Custom" }) }),
|
|
29
29
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _select.SelectContent, { children: allPresets.map((preset) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _select.SelectItem, { value: preset.id, children: preset.name }, preset.id)) })
|
|
@@ -43,7 +43,7 @@ function PresetBar({
|
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
45
|
onClick: onShowSave,
|
|
46
|
-
className: "flex items-center gap-1 rounded-md px-2 py-1 text-
|
|
46
|
+
className: "flex items-center gap-1 rounded-md px-2 py-1 text-sm text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-elevated)] hover:text-[var(--text-secondary)]",
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Save, { className: "size-3" }),
|
|
49
49
|
"Save as"
|
|
@@ -55,7 +55,7 @@ function PresetBar({
|
|
|
55
55
|
{
|
|
56
56
|
type: "button",
|
|
57
57
|
onClick: onReset,
|
|
58
|
-
className: "ml-auto flex items-center gap-1 rounded-md px-2 py-1 text-
|
|
58
|
+
className: "ml-auto flex items-center gap-1 rounded-md px-2 py-1 text-sm text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-elevated)] hover:text-[var(--text-secondary)]",
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcw, { className: "size-3" }),
|
|
61
61
|
"Reset"
|
|
@@ -23,7 +23,7 @@ function PresetBar({
|
|
|
23
23
|
}) {
|
|
24
24
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
25
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
26
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
26
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-[var(--text-muted)]", children: "Preset:" }),
|
|
27
27
|
/* @__PURE__ */ jsxs(Select, { value: activePresetId ?? "", onValueChange: onPresetChange, children: [
|
|
28
28
|
/* @__PURE__ */ jsx(SelectTrigger, { size: "sm", className: "h-7 w-40 text-xs", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Custom" }) }),
|
|
29
29
|
/* @__PURE__ */ jsx(SelectContent, { children: allPresets.map((preset) => /* @__PURE__ */ jsx(SelectItem, { value: preset.id, children: preset.name }, preset.id)) })
|
|
@@ -43,7 +43,7 @@ function PresetBar({
|
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
45
|
onClick: onShowSave,
|
|
46
|
-
className: "flex items-center gap-1 rounded-md px-2 py-1 text-
|
|
46
|
+
className: "flex items-center gap-1 rounded-md px-2 py-1 text-sm text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-elevated)] hover:text-[var(--text-secondary)]",
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ jsx(Save, { className: "size-3" }),
|
|
49
49
|
"Save as"
|
|
@@ -55,7 +55,7 @@ function PresetBar({
|
|
|
55
55
|
{
|
|
56
56
|
type: "button",
|
|
57
57
|
onClick: onReset,
|
|
58
|
-
className: "ml-auto flex items-center gap-1 rounded-md px-2 py-1 text-
|
|
58
|
+
className: "ml-auto flex items-center gap-1 rounded-md px-2 py-1 text-sm text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-elevated)] hover:text-[var(--text-secondary)]",
|
|
59
59
|
children: [
|
|
60
60
|
/* @__PURE__ */ jsx(RotateCcw, { className: "size-3" }),
|
|
61
61
|
"Reset"
|
|
@@ -27,13 +27,13 @@ function SystemPromptSection({
|
|
|
27
27
|
defaultOpen: false,
|
|
28
28
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
29
29
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
30
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
30
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-[var(--text-muted)]", children: systemPrompt === null ? c.defaultHint : systemPrompt === "" ? c.emptyHint : c.customHint }),
|
|
31
31
|
systemPrompt !== null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
34
|
type: "button",
|
|
35
35
|
onClick: () => onSystemPromptChange(null),
|
|
36
|
-
className: "text-
|
|
36
|
+
className: "text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-secondary)]",
|
|
37
37
|
children: "Reset to default"
|
|
38
38
|
}
|
|
39
39
|
)
|
|
@@ -44,11 +44,11 @@ function SystemPromptSection({
|
|
|
44
44
|
"aria-label": "System prompt",
|
|
45
45
|
value: displayedPrompt,
|
|
46
46
|
onChange: (event) => onSystemPromptChange(event.target.value),
|
|
47
|
-
className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-
|
|
47
|
+
className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-sm text-[var(--text-secondary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent-primary)]",
|
|
48
48
|
placeholder: c.placeholder
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-
|
|
51
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-[var(--text-muted)]", children: c.footnote })
|
|
52
52
|
] })
|
|
53
53
|
}
|
|
54
54
|
);
|
|
@@ -27,13 +27,13 @@ function SystemPromptSection({
|
|
|
27
27
|
defaultOpen: false,
|
|
28
28
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
29
29
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
30
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--text-muted)]", children: systemPrompt === null ? c.defaultHint : systemPrompt === "" ? c.emptyHint : c.customHint }),
|
|
31
31
|
systemPrompt !== null && /* @__PURE__ */ jsx(
|
|
32
32
|
"button",
|
|
33
33
|
{
|
|
34
34
|
type: "button",
|
|
35
35
|
onClick: () => onSystemPromptChange(null),
|
|
36
|
-
className: "text-
|
|
36
|
+
className: "text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-secondary)]",
|
|
37
37
|
children: "Reset to default"
|
|
38
38
|
}
|
|
39
39
|
)
|
|
@@ -44,11 +44,11 @@ function SystemPromptSection({
|
|
|
44
44
|
"aria-label": "System prompt",
|
|
45
45
|
value: displayedPrompt,
|
|
46
46
|
onChange: (event) => onSystemPromptChange(event.target.value),
|
|
47
|
-
className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-
|
|
47
|
+
className: "h-80 w-full resize-y rounded-md border border-border/30 bg-[var(--bg-base)] p-2 font-mono text-sm text-[var(--text-secondary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent-primary)]",
|
|
48
48
|
placeholder: c.placeholder
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */ jsx("p", { className: "text-
|
|
51
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-[var(--text-muted)]", children: c.footnote })
|
|
52
52
|
] })
|
|
53
53
|
}
|
|
54
54
|
);
|