@admin-layout/tailwind-ui 12.2.4-alpha.63 → 12.2.4-alpha.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AIToolbar/components/completion/Files.d.ts +3 -3
- package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -1
- package/lib/components/AIToolbar/components/completion/Files.js +66 -36
- package/lib/components/AIToolbar/components/completion/Files.js.map +1 -1
- package/lib/components/AIToolbar/components/completion/Input.js +1 -1
- package/lib/components/AIToolbar/components/speech/Warning.d.ts.map +1 -1
- package/lib/components/AIToolbar/components/speech/Warning.js +101 -29
- package/lib/components/AIToolbar/components/speech/Warning.js.map +1 -1
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts +2 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -1
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js +1 -2
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -1
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts +20 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts.map +1 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js +249 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js.map +1 -0
- package/lib/components/CharacterSlotPicker/index.d.ts +3 -0
- package/lib/components/CharacterSlotPicker/index.d.ts.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/activeCharacterPreference.d.ts +2 -1
- package/lib/hooks/activeCharacterPreference.d.ts.map +1 -1
- package/lib/hooks/activeCharacterPreference.js +9 -2
- package/lib/hooks/activeCharacterPreference.js.map +1 -1
- package/lib/hooks/characterOverrides.d.ts +29 -0
- package/lib/hooks/characterOverrides.d.ts.map +1 -0
- package/lib/hooks/characterOverrides.js +130 -0
- package/lib/hooks/characterOverrides.js.map +1 -0
- package/lib/hooks/characterSlotsPreference.d.ts +33 -0
- package/lib/hooks/characterSlotsPreference.d.ts.map +1 -0
- package/lib/hooks/characterSlotsPreference.js +141 -0
- package/lib/hooks/characterSlotsPreference.js.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useGlobalShortcutBridge.d.ts +21 -0
- package/lib/hooks/useGlobalShortcutBridge.d.ts.map +1 -0
- package/lib/hooks/useGlobalShortcutBridge.js +68 -0
- package/lib/hooks/useGlobalShortcutBridge.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/shardui/command.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UseCompletionReturn } from '../types';
|
|
2
|
-
export declare
|
|
1
|
+
import type { UseCompletionReturn } from '../types';
|
|
2
|
+
export declare function Files({ attachedFiles, handleFileSelect, removeFile, onRemoveAllFiles, isLoading, isFilesPopoverOpen, setIsFilesPopoverOpen, supportsImages, maxFiles, toolbarShowElementTitles, }: UseCompletionReturn & {
|
|
3
3
|
supportsImages?: boolean;
|
|
4
4
|
maxFiles?: number;
|
|
5
5
|
toolbarShowElementTitles?: boolean;
|
|
6
|
-
})
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=Files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Files.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/completion/Files.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Files.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/completion/Files.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAuB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAsBzE,wBAAgB,KAAK,CAAC,EAClB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,QAA4B,EAC5B,wBAAwB,GAC3B,EAAE,mBAAmB,GAAG;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC,2CAuKA"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useRef}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import {Popover,PopoverTrigger,PopoverContent}from'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import
|
|
2
|
-
const
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {PaperclipIcon,PlusIcon,XIcon,TrashIcon}from'lucide-react';import {useRef}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import {Popover,PopoverTrigger,PopoverContent}from'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import {ScrollArea}from'../../../../shardui/scroll-area.js';import'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';const DEFAULT_MAX_FILES = 10;
|
|
2
|
+
const FILE_ACCEPT = 'image/*,.txt,.md,.markdown,text/plain,text/markdown,text/x-markdown';
|
|
3
|
+
const IMAGE_FILE_EXTENSION = /\.(png|jpe?g|gif|webp)$/i;
|
|
4
|
+
function isImageFile(file) {
|
|
5
|
+
return (file.type?.startsWith('image/') ?? false) || IMAGE_FILE_EXTENSION.test(file.name);
|
|
6
|
+
}
|
|
7
|
+
function formatFileSize(size) {
|
|
8
|
+
if (typeof size !== 'number') {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return `${(size / 1024 / 1024).toFixed(2)} MB`;
|
|
12
|
+
}
|
|
13
|
+
function getMimeType(file) {
|
|
14
|
+
return file.type && file.type.includes('/') ? file.type : 'application/octet-stream';
|
|
15
|
+
}
|
|
16
|
+
function Files({
|
|
3
17
|
attachedFiles,
|
|
4
18
|
handleFileSelect,
|
|
5
19
|
removeFile,
|
|
@@ -10,7 +24,7 @@ const Files = ({
|
|
|
10
24
|
supportsImages,
|
|
11
25
|
maxFiles = DEFAULT_MAX_FILES,
|
|
12
26
|
toolbarShowElementTitles
|
|
13
|
-
})
|
|
27
|
+
}) {
|
|
14
28
|
const fileInputRef = useRef(null);
|
|
15
29
|
const showTitles = toolbarShowElementTitles !== false;
|
|
16
30
|
const handleAddMoreClick = () => {
|
|
@@ -28,7 +42,7 @@ const Files = ({
|
|
|
28
42
|
size: "icon",
|
|
29
43
|
disabled: isLoading || supportsImages === false,
|
|
30
44
|
className: "cursor-pointer",
|
|
31
|
-
title: showTitles ? supportsImages !== false ? 'Attach
|
|
45
|
+
title: showTitles ? supportsImages !== false ? 'Attach files' : 'File upload not supported by current AI provider' : undefined,
|
|
32
46
|
children: jsx(PaperclipIcon, {
|
|
33
47
|
className: "h-4 w-4"
|
|
34
48
|
})
|
|
@@ -45,7 +59,7 @@ const Files = ({
|
|
|
45
59
|
className: "p-4 space-y-3",
|
|
46
60
|
children: [jsx("p", {
|
|
47
61
|
className: "text-sm text-muted-foreground",
|
|
48
|
-
children: "No
|
|
62
|
+
children: "No files attached yet. Choose files to add them to your message."
|
|
49
63
|
}), jsxs(Button, {
|
|
50
64
|
type: "button",
|
|
51
65
|
className: "w-full",
|
|
@@ -54,14 +68,14 @@ const Files = ({
|
|
|
54
68
|
onClick: () => fileInputRef.current?.click(),
|
|
55
69
|
children: [jsx(PlusIcon, {
|
|
56
70
|
className: "h-4 w-4 mr-2"
|
|
57
|
-
}), "Choose
|
|
71
|
+
}), "Choose files"]
|
|
58
72
|
})]
|
|
59
73
|
}) : jsxs(Fragment, {
|
|
60
74
|
children: [jsxs("div", {
|
|
61
75
|
className: "flex items-center justify-between px-4 py-2 border-b bg-muted/30 shrink-0",
|
|
62
76
|
children: [jsxs("h3", {
|
|
63
77
|
className: "font-semibold text-sm select-none",
|
|
64
|
-
children: ["Attached
|
|
78
|
+
children: ["Attached Files (", attachedFiles.length, "/", maxFiles, ")"]
|
|
65
79
|
}), jsx(Button, {
|
|
66
80
|
size: "icon",
|
|
67
81
|
variant: "ghost",
|
|
@@ -76,32 +90,48 @@ const Files = ({
|
|
|
76
90
|
className: "p-4 min-h-0 flex-1 max-h-[min(32rem,calc(85vh-10rem))]",
|
|
77
91
|
children: jsx("div", {
|
|
78
92
|
className: `gap-3 ${attachedFiles.length <= 2 ? 'flex flex-col' : 'grid grid-cols-2'}`,
|
|
79
|
-
children: attachedFiles.map(file =>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
className: "
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
className: "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
children: attachedFiles.map(file => {
|
|
94
|
+
const imageFile = isImageFile(file);
|
|
95
|
+
const sizeLabel = formatFileSize(file.size);
|
|
96
|
+
const mimeType = getMimeType(file);
|
|
97
|
+
return jsxs("div", {
|
|
98
|
+
className: "relative group border rounded-lg overflow-hidden bg-muted/20 min-h-[8rem]",
|
|
99
|
+
children: [imageFile && file.base64 ? jsx("img", {
|
|
100
|
+
src: `data:${mimeType};base64,${file.base64}`,
|
|
101
|
+
alt: file.name,
|
|
102
|
+
className: "w-full object-cover max-h-64"
|
|
103
|
+
}) : jsxs("div", {
|
|
104
|
+
className: "flex min-h-32 flex-col items-center justify-center gap-2 p-4 text-center",
|
|
105
|
+
children: [jsx(PaperclipIcon, {
|
|
106
|
+
className: "h-8 w-8 text-muted-foreground"
|
|
107
|
+
}), jsx("div", {
|
|
108
|
+
className: "max-w-full truncate text-sm font-medium",
|
|
109
|
+
children: file.name
|
|
110
|
+
}), sizeLabel ? jsx("div", {
|
|
111
|
+
className: "text-xs text-muted-foreground",
|
|
112
|
+
children: sizeLabel
|
|
113
|
+
}) : null]
|
|
114
|
+
}), imageFile ? jsxs("div", {
|
|
115
|
+
className: "absolute bottom-0 left-0 right-0 bg-black/70 text-white p-2 text-xs",
|
|
116
|
+
children: [jsx("div", {
|
|
117
|
+
className: "truncate font-medium",
|
|
118
|
+
children: file.name
|
|
119
|
+
}), sizeLabel ? jsx("div", {
|
|
120
|
+
className: "text-gray-300",
|
|
121
|
+
children: sizeLabel
|
|
122
|
+
}) : null]
|
|
123
|
+
}) : null, jsx(Button, {
|
|
124
|
+
size: "icon",
|
|
125
|
+
variant: "default",
|
|
126
|
+
className: "absolute top-2 right-2 h-6 w-6 cursor-pointer",
|
|
127
|
+
onClick: () => removeFile(file.id),
|
|
128
|
+
title: showTitles ? 'Remove file' : undefined,
|
|
129
|
+
children: jsx(XIcon, {
|
|
130
|
+
className: "h-3 w-3"
|
|
131
|
+
})
|
|
93
132
|
})]
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
variant: "default",
|
|
97
|
-
className: "absolute top-2 right-2 h-6 w-6 cursor-pointer",
|
|
98
|
-
onClick: () => removeFile(file.id),
|
|
99
|
-
title: showTitles ? 'Remove image' : undefined,
|
|
100
|
-
children: jsx(XIcon, {
|
|
101
|
-
className: "h-3 w-3"
|
|
102
|
-
})
|
|
103
|
-
})]
|
|
104
|
-
}, file.id))
|
|
133
|
+
}, file.id);
|
|
134
|
+
})
|
|
105
135
|
})
|
|
106
136
|
}), jsxs("div", {
|
|
107
137
|
className: "shrink-0 border-t bg-background p-3 flex flex-row gap-2",
|
|
@@ -112,14 +142,14 @@ const Files = ({
|
|
|
112
142
|
variant: "outline",
|
|
113
143
|
children: [jsx(PlusIcon, {
|
|
114
144
|
className: "h-4 w-4 mr-2"
|
|
115
|
-
}), "Add More
|
|
145
|
+
}), "Add More Files ", !canAddMore && `(${maxFiles} max)`]
|
|
116
146
|
}), jsxs(Button, {
|
|
117
147
|
className: "w-2/4",
|
|
118
148
|
variant: "destructive",
|
|
119
149
|
onClick: onRemoveAllFiles,
|
|
120
150
|
children: [jsx(TrashIcon, {
|
|
121
151
|
className: "h-4 w-4 mr-2"
|
|
122
|
-
}), "Remove All
|
|
152
|
+
}), "Remove All Files"]
|
|
123
153
|
})]
|
|
124
154
|
})]
|
|
125
155
|
})
|
|
@@ -128,9 +158,9 @@ const Files = ({
|
|
|
128
158
|
ref: fileInputRef,
|
|
129
159
|
type: "file",
|
|
130
160
|
multiple: true,
|
|
131
|
-
accept:
|
|
161
|
+
accept: FILE_ACCEPT,
|
|
132
162
|
onChange: handleFileSelect,
|
|
133
163
|
className: "hidden"
|
|
134
164
|
})]
|
|
135
165
|
});
|
|
136
|
-
}
|
|
166
|
+
}export{Files};//# sourceMappingURL=Files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Files.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Files.js","sources":["../../../../../src/components/AIToolbar/components/completion/Files.tsx"],"sourcesContent":[null],"names":[],"mappings":"6nEAyCC,iBAAA,GAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -84,7 +84,7 @@ import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useRef,useMemo,useLayo
|
|
|
84
84
|
},
|
|
85
85
|
className: cn('relative z-[200] flex h-[min(90vh,calc(100dvh-1rem))] flex-col overflow-hidden border p-0 text-popover-foreground shadow-lg',
|
|
86
86
|
// Solid base when no wallpaper; translucent so the wallpaper bleeds through when one is selected.
|
|
87
|
-
chatBgImage ? 'bg-popover/70' : 'bg-popover', 'w-[calc(100vw-16px)] max-w-[
|
|
87
|
+
chatBgImage ? 'bg-popover/70' : 'bg-popover', 'w-[calc(100vw-16px)] max-w-[760px] min-w-0 rounded-md'),
|
|
88
88
|
children: [chatBgImage ? jsxs(Fragment, {
|
|
89
89
|
children: [jsx("div", {
|
|
90
90
|
"aria-hidden": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/Warning.tsx"],"names":[],"mappings":"AAIA,UAAU,YAAY;IAClB,SAAS,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"Warning.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/Warning.tsx"],"names":[],"mappings":"AAIA,UAAU,YAAY;IAClB,SAAS,EAAE,OAAO,CAAC;CACtB;AAsDD,eAAO,MAAM,OAAO,GAAI,eAAe,YAAY,4CA+LlD,CAAC"}
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
import {jsxs,jsx
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useState}from'react';import {InfoIcon,ChevronDownIcon,AudioWaveformIcon,MicIcon,KeyboardIcon,CameraIcon}from'lucide-react';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';const GLOBAL_SHORTCUTS = [{
|
|
2
|
+
label: 'Toggle Yantra Bar',
|
|
3
|
+
description: 'Show or hide the floating bar from anywhere.',
|
|
4
|
+
macKeys: ['⌘', '⇧', 'Y'],
|
|
5
|
+
otherKeys: ['Ctrl', 'Shift', 'Y']
|
|
6
|
+
}, {
|
|
7
|
+
label: 'Force-hide Bar',
|
|
8
|
+
description: 'Emergency escape — always hides the bar and drops focus.',
|
|
9
|
+
macKeys: ['⌘', '⇧', 'H'],
|
|
10
|
+
otherKeys: ['Ctrl', 'Shift', 'H']
|
|
11
|
+
}, {
|
|
12
|
+
label: 'Toggle microphone',
|
|
13
|
+
description: 'Turn the mic on or off for voice conversations.',
|
|
14
|
+
macKeys: ['⌘', '⇧', 'M'],
|
|
15
|
+
otherKeys: ['Ctrl', 'Shift', 'M']
|
|
16
|
+
}, {
|
|
17
|
+
label: 'Toggle audio output',
|
|
18
|
+
description: 'Mute or unmute the assistant’s voice playback.',
|
|
19
|
+
macKeys: ['⌘', '⇧', 'V'],
|
|
20
|
+
otherKeys: ['Ctrl', 'Shift', 'V']
|
|
21
|
+
}, {
|
|
22
|
+
label: 'Toggle Eye agent',
|
|
23
|
+
description: 'Start or stop the ambient activity tracker.',
|
|
24
|
+
macKeys: ['⌘', '⇧', 'E'],
|
|
25
|
+
otherKeys: ['Ctrl', 'Shift', 'E']
|
|
26
|
+
}, {
|
|
27
|
+
label: 'Switch to default character',
|
|
28
|
+
description: 'Activates the slot you marked as default.',
|
|
29
|
+
macKeys: ['⌘', '⌥', '0'],
|
|
30
|
+
otherKeys: ['Ctrl', 'Alt', '0']
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Switch to character slot 1–9',
|
|
33
|
+
description: 'Activates the character assigned to slots 1 through 9.',
|
|
34
|
+
macKeys: ['⌘', '⌥', '1…9'],
|
|
35
|
+
otherKeys: ['Ctrl', 'Alt', '1…9']
|
|
36
|
+
}];
|
|
37
|
+
const Warning = ({
|
|
2
38
|
isVadMode
|
|
3
39
|
}) => {
|
|
4
40
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
@@ -68,34 +104,32 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState}from'react';i
|
|
|
68
104
|
className: "px-1.5 py-0.5 rounded bg-background border border-border font-mono",
|
|
69
105
|
children: "\u2191"
|
|
70
106
|
})]
|
|
71
|
-
}),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
children: "Esc"
|
|
98
|
-
})]
|
|
107
|
+
}), jsxs("div", {
|
|
108
|
+
className: cn('flex items-center justify-between p-1.5 rounded bg-muted/50', isVadMode && 'opacity-50'),
|
|
109
|
+
children: [jsxs("span", {
|
|
110
|
+
className: "text-muted-foreground",
|
|
111
|
+
children: ["Start/Stop", isVadMode ? ' (manual)' : '']
|
|
112
|
+
}), jsx("kbd", {
|
|
113
|
+
className: "px-1.5 py-0.5 rounded bg-background border border-border font-mono",
|
|
114
|
+
children: "Enter"
|
|
115
|
+
})]
|
|
116
|
+
}), jsxs("div", {
|
|
117
|
+
className: cn('flex items-center justify-between p-1.5 rounded bg-muted/50', isVadMode && 'opacity-50'),
|
|
118
|
+
children: [jsxs("span", {
|
|
119
|
+
className: "text-muted-foreground",
|
|
120
|
+
children: ["Start record", isVadMode ? ' (manual)' : '']
|
|
121
|
+
}), jsx("kbd", {
|
|
122
|
+
className: "px-1.5 py-0.5 rounded bg-background border border-border font-mono",
|
|
123
|
+
children: "Space"
|
|
124
|
+
})]
|
|
125
|
+
}), jsxs("div", {
|
|
126
|
+
className: cn('flex items-center justify-between p-1.5 rounded bg-muted/50', isVadMode && 'opacity-50'),
|
|
127
|
+
children: [jsxs("span", {
|
|
128
|
+
className: "text-muted-foreground",
|
|
129
|
+
children: ["Discard", isVadMode ? ' (manual)' : '']
|
|
130
|
+
}), jsx("kbd", {
|
|
131
|
+
className: "px-1.5 py-0.5 rounded bg-background border border-border font-mono",
|
|
132
|
+
children: "Esc"
|
|
99
133
|
})]
|
|
100
134
|
}), jsxs("div", {
|
|
101
135
|
className: "flex items-center justify-between p-1.5 rounded bg-muted/50",
|
|
@@ -108,6 +142,44 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState}from'react';i
|
|
|
108
142
|
})]
|
|
109
143
|
})]
|
|
110
144
|
})]
|
|
145
|
+
}), jsxs("div", {
|
|
146
|
+
className: "space-y-2",
|
|
147
|
+
children: [jsxs("div", {
|
|
148
|
+
className: "flex items-center gap-1.5",
|
|
149
|
+
children: [jsx(KeyboardIcon, {
|
|
150
|
+
className: "w-3 h-3 text-muted-foreground"
|
|
151
|
+
}), jsx("span", {
|
|
152
|
+
className: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide",
|
|
153
|
+
children: "System-wide Global Shortcuts"
|
|
154
|
+
})]
|
|
155
|
+
}), jsx("p", {
|
|
156
|
+
className: "text-[10px] text-muted-foreground/80",
|
|
157
|
+
children: "Registered by the desktop app. These work even when the bar is hidden or another app is focused."
|
|
158
|
+
}), jsx("div", {
|
|
159
|
+
className: "space-y-1.5",
|
|
160
|
+
children: GLOBAL_SHORTCUTS.map(shortcut => {
|
|
161
|
+
const keys = isMac ? shortcut.macKeys : shortcut.otherKeys;
|
|
162
|
+
return jsxs("div", {
|
|
163
|
+
className: "flex items-start justify-between gap-2 p-1.5 rounded bg-muted/50",
|
|
164
|
+
children: [jsxs("div", {
|
|
165
|
+
className: "min-w-0 flex-1",
|
|
166
|
+
children: [jsx("div", {
|
|
167
|
+
className: "text-[10px] font-medium text-foreground leading-tight",
|
|
168
|
+
children: shortcut.label
|
|
169
|
+
}), jsx("p", {
|
|
170
|
+
className: "text-[9px] text-muted-foreground leading-tight mt-0.5",
|
|
171
|
+
children: shortcut.description
|
|
172
|
+
})]
|
|
173
|
+
}), jsx("div", {
|
|
174
|
+
className: "flex shrink-0 items-center gap-1",
|
|
175
|
+
children: keys.map((key, idx) => jsx("kbd", {
|
|
176
|
+
className: "px-1.5 py-0.5 rounded bg-background border border-border font-mono text-[9px]",
|
|
177
|
+
children: key
|
|
178
|
+
}, `${shortcut.label}-${key}-${idx}`))
|
|
179
|
+
})]
|
|
180
|
+
}, shortcut.label);
|
|
181
|
+
})
|
|
182
|
+
})]
|
|
111
183
|
}), jsxs("div", {
|
|
112
184
|
className: "space-y-2",
|
|
113
185
|
children: [jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Warning.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Warning.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { readPreferredActiveCharacterFileName } from '../../../hooks/activeCharacterPreference';
|
|
1
2
|
export interface ActiveCharacter {
|
|
2
3
|
/** Manifest `name` (or filesystem stem) — e.g. "Seraphina". */
|
|
3
4
|
name: string;
|
|
@@ -38,6 +39,7 @@ export interface MarketplaceCharacterEntry {
|
|
|
38
39
|
* resolves. Triggers a re-render of any active character hook.
|
|
39
40
|
*/
|
|
40
41
|
export declare function setMarketplaceCharacters(entries: MarketplaceCharacterEntry[]): void;
|
|
42
|
+
export { readPreferredActiveCharacterFileName };
|
|
41
43
|
/**
|
|
42
44
|
* Return the active character (name + avatar) or null when none is installed
|
|
43
45
|
* / we're not running under Tauri. Selection follows `pickActiveMerged` (file_name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveCharacter.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useActiveCharacter.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"names":[],"mappings":"AA2BA,OAAO,EAGH,oCAAoC,EAEvC,MAAM,0CAA0C,CAAC;AASlD,MAAM,WAAW,eAAe;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC5B,sDAAsD;IACtD,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,gFAAgF;IAChF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iFAAiF;IACjF,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC5C;AASD;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAiCD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,EAAE,GAAG,IAAI,CASnF;AAkMD,OAAO,EAAE,oCAAoC,EAAE,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,IAAI,CAqC3D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAmFpD"}
|
|
@@ -230,7 +230,6 @@ function useCharacterPreferenceListeners(reload, bump) {
|
|
|
230
230
|
};
|
|
231
231
|
}, [reload, bump]);
|
|
232
232
|
}
|
|
233
|
-
// main API
|
|
234
233
|
/**
|
|
235
234
|
* Return the active character (name + avatar) or null when none is installed
|
|
236
235
|
* / we're not running under Tauri. Selection follows `pickActiveMerged` (file_name
|
|
@@ -357,4 +356,4 @@ function useCharacterPicker() {
|
|
|
357
356
|
activeName,
|
|
358
357
|
setActive
|
|
359
358
|
};
|
|
360
|
-
}export{setMarketplaceCharacters,useActiveCharacter,useCharacterPicker};//# sourceMappingURL=useActiveCharacter.js.map
|
|
359
|
+
}export{readPreferredActiveCharacterFileName,setMarketplaceCharacters,useActiveCharacter,useCharacterPicker};//# sourceMappingURL=useActiveCharacter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveCharacter.js","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useActiveCharacter.js","sources":["../../../../src/components/AIToolbar/hooks/useActiveCharacter.ts"],"sourcesContent":[null],"names":[],"mappings":"2ZA2BA;AAcA;;;;;;AAMI;AACH;AAED;;;AAGI;AACH;AAED;;;;AAII;;;AAGH;AASD;;;;MAQI,uBAAqB,GAAA,0BAAA;;;AAGrB;AACH;AAiCD;;;;AAIG,MAAA,4BAAA,GAAA,8BAAA;AACH;AA2MA,MAAA,uBAAS,GAAA,CAAA,YAAoC,EAAE,UAAC,CAAA;AAEhD;;;;AAIG,EAAA,sBAAA,CAAA,GAAA,CAAA,EAAA,CAAA;AACH,EAAA,OAAA,MAAA,sBAAgB,CAAA,MAAkB,CAAA,EAAI,CAAA;AAuCtC;;;AAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 3×3 grid of character slots (1–9).
|
|
3
|
+
*
|
|
4
|
+
* - Click an empty tile → opens a small "pick" popover listing installed
|
|
5
|
+
* characters; clicking one assigns it to the slot.
|
|
6
|
+
* - Click a filled tile → activates that character (`setActive(name)`).
|
|
7
|
+
* - Right-click (or "×" badge) a filled tile → clears the slot.
|
|
8
|
+
* - The default slot wears a ring + star; any tile's ⋆ button promotes it
|
|
9
|
+
* to default.
|
|
10
|
+
*
|
|
11
|
+
* Self-contained: pulls the installed character list from
|
|
12
|
+
* `useCharacterPicker()` and stores assignments via
|
|
13
|
+
* `useCharacterSlots()`. No props required.
|
|
14
|
+
*/
|
|
15
|
+
export interface CharacterSlotPickerProps {
|
|
16
|
+
/** Optional className applied to the outer wrapper. */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function CharacterSlotPicker({ className }: CharacterSlotPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=CharacterSlotPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterSlotPicker.d.ts","sourceRoot":"","sources":["../../../src/components/CharacterSlotPicker/CharacterSlotPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqQH,MAAM,WAAW,wBAAwB;IACrC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CA6D1E"}
|