@agentprojectcontext/apx 1.36.0 → 1.38.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/README.md +81 -3
- package/package.json +1 -1
- package/src/core/mascot.js +80 -80
- package/src/host/daemon/api/agents.js +6 -0
- package/src/host/daemon/api/conversations.js +9 -2
- package/src/host/daemon/api/web.js +20 -1
- package/src/host/daemon/desktop-ws.js +31 -0
- package/src/host/daemon/index.js +12 -2
- package/src/interfaces/cli/commands/agent.js +20 -0
- package/src/interfaces/cli/commands/chat.js +15 -6
- package/src/interfaces/cli/commands/identity.js +20 -1
- package/src/interfaces/cli/commands/update.js +2 -0
- package/src/interfaces/cli/index.js +14 -0
- package/src/interfaces/web/dist/assets/index-CQc_5t8F.js +629 -0
- package/src/interfaces/web/dist/assets/index-CQc_5t8F.js.map +1 -0
- package/src/interfaces/web/dist/assets/index-hwxuTPcK.css +1 -0
- package/src/interfaces/web/dist/index.html +2 -2
- package/src/interfaces/web/src/App.tsx +20 -9
- package/src/interfaces/web/src/components/ModelCombobox.tsx +1 -1
- package/src/interfaces/web/src/components/Roby.tsx +96 -0
- package/src/interfaces/web/src/components/TelegramChannelDialog.tsx +11 -11
- package/src/interfaces/web/src/components/TelegramSendDialog.tsx +5 -5
- package/src/interfaces/web/src/components/chat/MessageBubble.tsx +2 -2
- package/src/interfaces/web/src/components/chat/ModelPicker.tsx +5 -5
- package/src/interfaces/web/src/components/chat/ToolCall.tsx +23 -19
- package/src/interfaces/web/src/components/code/CodeArtifactsTab.tsx +10 -10
- package/src/interfaces/web/src/components/code/CodeContextTab.tsx +7 -7
- package/src/interfaces/web/src/components/code/CodeProjectPicker.tsx +3 -2
- package/src/interfaces/web/src/components/common/TabNav.tsx +3 -2
- package/src/interfaces/web/src/components/config/ConfigTabsEditor.tsx +3 -2
- package/src/interfaces/web/src/components/config/GlobalConfigEditor.tsx +2 -2
- package/src/interfaces/web/src/components/config/global-config-sections.ts +9 -9
- package/src/interfaces/web/src/components/config/project-config-sections.ts +61 -54
- package/src/interfaces/web/src/components/deck/DaemonCard.tsx +6 -5
- package/src/interfaces/web/src/components/inputs/KeyValueList.tsx +5 -4
- package/src/interfaces/web/src/components/inputs/VarTokenInput.tsx +3 -3
- package/src/interfaces/web/src/components/layout/ProjectSidebar.tsx +22 -9
- package/src/interfaces/web/src/components/settings/AdvancedPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/AppearancePanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/DefaultRouterCard.tsx +14 -14
- package/src/interfaces/web/src/components/settings/DevicesPanel.tsx +3 -3
- package/src/interfaces/web/src/components/settings/EnginesPanel.tsx +7 -7
- package/src/interfaces/web/src/components/settings/IdentityPanel.tsx +2 -2
- package/src/interfaces/web/src/components/settings/MemoryPanel.tsx +37 -37
- package/src/interfaces/web/src/components/settings/SkillsInspectorPanel.tsx +44 -35
- package/src/interfaces/web/src/components/settings/SuperAgentPanel.tsx +5 -5
- package/src/interfaces/web/src/components/settings/TelegramChannelsPanel.tsx +3 -3
- package/src/interfaces/web/src/components/settings/TelegramContactsPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/TelegramGlobalPanel.tsx +3 -3
- package/src/interfaces/web/src/components/settings/TelegramRolesPanel.tsx +1 -1
- package/src/interfaces/web/src/components/settings/providers/ProviderCard.tsx +6 -6
- package/src/interfaces/web/src/components/settings/providers/ProviderModal.tsx +36 -36
- package/src/interfaces/web/src/components/voice/VoiceProviderList.tsx +15 -14
- package/src/interfaces/web/src/components/voice/VoiceProviderModal.tsx +22 -22
- package/src/interfaces/web/src/components/voice/VoiceSttCard.tsx +18 -17
- package/src/interfaces/web/src/components/voice/VoiceTestCard.tsx +19 -18
- package/src/interfaces/web/src/hooks/useChat.ts +6 -5
- package/src/interfaces/web/src/i18n/en.ts +519 -2
- package/src/interfaces/web/src/i18n/es.ts +519 -2
- package/src/interfaces/web/src/i18n/index.ts +1 -1
- package/src/interfaces/web/src/lib/api/voice.ts +5 -5
- package/src/interfaces/web/src/screens/ProjectScreen.tsx +14 -1
- package/src/interfaces/web/src/screens/SettingsScreen.tsx +1 -1
- package/src/interfaces/web/src/screens/base/AgentDefaultsTab.tsx +8 -8
- package/src/interfaces/web/src/screens/base/ComingSoon.tsx +3 -2
- package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +12 -12
- package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +15 -15
- package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +37 -37
- package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +8 -8
- package/src/interfaces/web/src/screens/project/AgentBrainGraph.tsx +16 -10
- package/src/interfaces/web/src/screens/project/AgentDetailScreen.tsx +25 -24
- package/src/interfaces/web/src/screens/project/ChatTab.tsx +2 -2
- package/src/interfaces/web/src/screens/project/ConfigTab.tsx +3 -3
- package/src/interfaces/web/src/screens/project/McpsTab.tsx +6 -9
- package/src/interfaces/web/src/screens/project/RoutinesTab.tsx +66 -52
- package/src/interfaces/web/src/screens/project/TelegramTab.tsx +1 -1
- package/src/interfaces/web/dist/assets/index-Cm0KyPoZ.css +0 -1
- package/src/interfaces/web/dist/assets/index-DJKA763h.js +0 -628
- package/src/interfaces/web/dist/assets/index-DJKA763h.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Badge } from "../ui";
|
|
2
|
+
import { t } from "../../i18n";
|
|
2
3
|
import type { DeckManifest } from "../../lib/api/deck";
|
|
3
4
|
|
|
4
5
|
function uptimeHuman(s: number): string {
|
|
@@ -26,7 +27,7 @@ export function DaemonCard({ manifest }: DaemonCardProps) {
|
|
|
26
27
|
</span>
|
|
27
28
|
<div className="flex items-center gap-1.5">
|
|
28
29
|
<span className="size-2 rounded-full bg-emerald-500" />
|
|
29
|
-
<span className="text-muted-fg">
|
|
30
|
+
<span className="text-muted-fg">{t("modules_ui.deck_daemon_active", { uptime: uptimeHuman(d.uptime_s) })}</span>
|
|
30
31
|
</div>
|
|
31
32
|
</div>
|
|
32
33
|
|
|
@@ -36,7 +37,7 @@ export function DaemonCard({ manifest }: DaemonCardProps) {
|
|
|
36
37
|
</span>
|
|
37
38
|
<span className="text-muted-fg">·</span>
|
|
38
39
|
<span className="text-muted-fg">
|
|
39
|
-
|
|
40
|
+
{t("modules_ui.deck_daemon_started")}{" "}
|
|
40
41
|
{new Date(d.started_at).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}
|
|
41
42
|
</span>
|
|
42
43
|
</div>
|
|
@@ -44,13 +45,13 @@ export function DaemonCard({ manifest }: DaemonCardProps) {
|
|
|
44
45
|
{/* Safety summary */}
|
|
45
46
|
<div className="mt-2.5 flex flex-wrap gap-1.5">
|
|
46
47
|
{s.direct_shell === false && (
|
|
47
|
-
<Badge tone="success">
|
|
48
|
+
<Badge tone="success">{t("modules_ui.deck_safety_no_shell")}</Badge>
|
|
48
49
|
)}
|
|
49
50
|
{s.arbitrary_commands === false && (
|
|
50
|
-
<Badge tone="success">
|
|
51
|
+
<Badge tone="success">{t("modules_ui.deck_safety_no_arbitrary")}</Badge>
|
|
51
52
|
)}
|
|
52
53
|
{s.dangerous_actions_require_confirmation && (
|
|
53
|
-
<Badge tone="info">
|
|
54
|
+
<Badge tone="info">{t("modules_ui.deck_safety_confirm")}</Badge>
|
|
54
55
|
)}
|
|
55
56
|
</div>
|
|
56
57
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Plus, Trash2 } from "lucide-react";
|
|
2
2
|
import { Button, Input } from "../ui";
|
|
3
3
|
import { VarTokenInput } from "./VarTokenInput";
|
|
4
|
+
import { t } from "../../i18n";
|
|
4
5
|
|
|
5
6
|
// Editable list of {key,value} pairs. Used for MCP env (stdio) and headers
|
|
6
7
|
// (http). Values are run through VarTokenInput so `${var.X}` references
|
|
@@ -38,8 +39,8 @@ interface KeyValueListProps {
|
|
|
38
39
|
export function KeyValueList({
|
|
39
40
|
rows,
|
|
40
41
|
onChange,
|
|
41
|
-
keyPlaceholder = "
|
|
42
|
-
valuePlaceholder = "
|
|
42
|
+
keyPlaceholder = t("shared_ui.kv_key_ph"),
|
|
43
|
+
valuePlaceholder = t("shared_ui.kv_value_ph"),
|
|
43
44
|
varNames,
|
|
44
45
|
onCreateVar,
|
|
45
46
|
emptyLabel,
|
|
@@ -79,14 +80,14 @@ export function KeyValueList({
|
|
|
79
80
|
size="sm"
|
|
80
81
|
variant="ghost"
|
|
81
82
|
onClick={() => remove(i)}
|
|
82
|
-
aria-label="
|
|
83
|
+
aria-label={t("shared_ui.remove_row")}
|
|
83
84
|
>
|
|
84
85
|
<Trash2 size={13} />
|
|
85
86
|
</Button>
|
|
86
87
|
</div>
|
|
87
88
|
))}
|
|
88
89
|
<Button type="button" size="sm" variant="ghost" onClick={add}>
|
|
89
|
-
<Plus size={12} />
|
|
90
|
+
<Plus size={12} /> {t("shared_ui.add_row")}
|
|
90
91
|
</Button>
|
|
91
92
|
</div>
|
|
92
93
|
);
|
|
@@ -366,13 +366,13 @@ function VarPickerPopover({
|
|
|
366
366
|
ref={inputRef}
|
|
367
367
|
value={query}
|
|
368
368
|
onChange={(e) => onQuery(e.target.value)}
|
|
369
|
-
placeholder="
|
|
369
|
+
placeholder={t("shared_ui.search_variable_ph")}
|
|
370
370
|
className="w-full rounded bg-muted/40 px-2 py-1 text-xs font-mono outline-none"
|
|
371
371
|
/>
|
|
372
372
|
</div>
|
|
373
373
|
<ul className="max-h-44 overflow-auto p-1 text-xs">
|
|
374
374
|
{varNames.length === 0 && (
|
|
375
|
-
<li className="px-2 py-1.5 text-muted-foreground">
|
|
375
|
+
<li className="px-2 py-1.5 text-muted-foreground">{t("shared_ui.no_matches")}</li>
|
|
376
376
|
)}
|
|
377
377
|
{varNames.map((n) => (
|
|
378
378
|
<li key={n}>
|
|
@@ -399,7 +399,7 @@ function VarPickerPopover({
|
|
|
399
399
|
}}
|
|
400
400
|
className="flex w-full items-center gap-1 rounded px-2 py-1.5 text-left text-xs hover:bg-muted/60"
|
|
401
401
|
>
|
|
402
|
-
<Plus size={12} />
|
|
402
|
+
<Plus size={12} /> {t("shared_ui.create_variable")}
|
|
403
403
|
</button>
|
|
404
404
|
</div>
|
|
405
405
|
)}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// projects column, finally add + settings. The default workspace (id=0) is
|
|
4
4
|
// pinned first.
|
|
5
5
|
import { useLocation } from "react-router-dom";
|
|
6
|
-
import { Plus, Settings, Mic, Monitor, LayoutGrid, Terminal, Bot, type LucideIcon } from "lucide-react";
|
|
6
|
+
import { Plus, Settings, Mic, Monitor, LayoutGrid, Terminal, Bot, BookOpen, type LucideIcon } from "lucide-react";
|
|
7
7
|
import { Logo } from "./Logo";
|
|
8
8
|
import { ProjectAvatar } from "./ProjectAvatar";
|
|
9
9
|
import { Tip } from "../ui/tip";
|
|
@@ -103,7 +103,7 @@ export function ProjectSidebar({ onSelect, onOpenRoby }: Props) {
|
|
|
103
103
|
})}
|
|
104
104
|
|
|
105
105
|
<ProjectAvatar
|
|
106
|
-
label="
|
|
106
|
+
label={t("nav.add_project")}
|
|
107
107
|
isAdd
|
|
108
108
|
testId="nav-add-project"
|
|
109
109
|
icon={<Plus size={18} />}
|
|
@@ -114,7 +114,7 @@ export function ProjectSidebar({ onSelect, onOpenRoby }: Props) {
|
|
|
114
114
|
|
|
115
115
|
<div className="flex-1" />
|
|
116
116
|
<ProjectAvatar
|
|
117
|
-
label="
|
|
117
|
+
label={t("nav.settings")}
|
|
118
118
|
isSettings
|
|
119
119
|
testId="nav-settings"
|
|
120
120
|
icon={<Settings size={16} />}
|
|
@@ -122,6 +122,19 @@ export function ProjectSidebar({ onSelect, onOpenRoby }: Props) {
|
|
|
122
122
|
onClick={() => onSelect("/settings")}
|
|
123
123
|
title={t("nav.settings")}
|
|
124
124
|
/>
|
|
125
|
+
{/* Docs — opens the hosted documentation site in a new tab. */}
|
|
126
|
+
<Tip content={t("settings_ui.documentation")} side="right">
|
|
127
|
+
<a
|
|
128
|
+
href="https://agentprojectcontext.github.io/apx/docs/"
|
|
129
|
+
target="_blank"
|
|
130
|
+
rel="noopener noreferrer"
|
|
131
|
+
data-testid="nav-docs"
|
|
132
|
+
aria-label={t("settings_ui.documentation")}
|
|
133
|
+
className="mt-1 flex size-10 items-center justify-center rounded-xl border border-border/60 bg-muted/30 text-muted-fg transition-colors hover:bg-accent hover:text-foreground"
|
|
134
|
+
>
|
|
135
|
+
<BookOpen size={18} />
|
|
136
|
+
</a>
|
|
137
|
+
</Tip>
|
|
125
138
|
{/* Roby launcher — subtle (not a loud floating bubble), pinned under the
|
|
126
139
|
gear so it doesn't overlap the chat composer. */}
|
|
127
140
|
<Tip content={t("superagent.talk", { persona })} side="right">
|
|
@@ -142,12 +155,12 @@ export function ProjectSidebar({ onSelect, onOpenRoby }: Props) {
|
|
|
142
155
|
// Re-export for screens that still import projectKindLabel here.
|
|
143
156
|
export function projectKindLabel(kind?: string): string {
|
|
144
157
|
switch (kind) {
|
|
145
|
-
case "personal": return "
|
|
146
|
-
case "company": return "
|
|
147
|
-
case "app": return "
|
|
148
|
-
case "software": return "
|
|
149
|
-
case "default": return "
|
|
150
|
-
case "other": return "
|
|
158
|
+
case "personal": return t("settings_ui.kind_personal");
|
|
159
|
+
case "company": return t("settings_ui.kind_company");
|
|
160
|
+
case "app": return t("settings_ui.kind_app");
|
|
161
|
+
case "software": return t("settings_ui.kind_software");
|
|
162
|
+
case "default": return t("settings_ui.kind_default");
|
|
163
|
+
case "other": return t("settings_ui.kind_other");
|
|
151
164
|
default: return t("nav.project");
|
|
152
165
|
}
|
|
153
166
|
}
|
|
@@ -11,7 +11,7 @@ export function AdvancedPanel() {
|
|
|
11
11
|
const { health, isUp } = useDaemonStatus();
|
|
12
12
|
|
|
13
13
|
const reload = async () => {
|
|
14
|
-
try { await Admin.reload(); toast.success("
|
|
14
|
+
try { await Admin.reload(); toast.success(t("settings.advanced.reload_success")); }
|
|
15
15
|
catch (e) { toast.error((e as Error).message); }
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -53,7 +53,7 @@ export function AppearancePanel() {
|
|
|
53
53
|
</Section>
|
|
54
54
|
|
|
55
55
|
<Section title={t("settings.token")} description={t("settings.token_sub")}>
|
|
56
|
-
<Field label="
|
|
56
|
+
<Field label={t("settings_ui.bearer_label")}>
|
|
57
57
|
<Input
|
|
58
58
|
type="password"
|
|
59
59
|
placeholder={getToken() ? t("settings.token_active") : t("settings.token_paste")}
|
|
@@ -55,7 +55,7 @@ function ProviderModelPicker({
|
|
|
55
55
|
<UiSelect
|
|
56
56
|
value={provider}
|
|
57
57
|
onChange={setProvider}
|
|
58
|
-
placeholder={providerInvalid ?
|
|
58
|
+
placeholder={providerInvalid ? t("router_panel.provider_not_found", { name: provider }) : t("router_panel.provider_ph")}
|
|
59
59
|
options={providers.map((p) => ({ value: p.slug, label: p.slug, icon: ENGINE_ICONS[p.engine] }))}
|
|
60
60
|
/>
|
|
61
61
|
<ModelCombobox
|
|
@@ -63,7 +63,7 @@ function ProviderModelPicker({
|
|
|
63
63
|
onChange={setModel}
|
|
64
64
|
options={modelOptions}
|
|
65
65
|
invalid={providerInvalid}
|
|
66
|
-
invalidHint={
|
|
66
|
+
invalidHint={t("router_panel.provider_not_configured", { name: provider })}
|
|
67
67
|
/>
|
|
68
68
|
</div>
|
|
69
69
|
);
|
|
@@ -119,7 +119,7 @@ export function DefaultRouterCard() {
|
|
|
119
119
|
"super_agent.model_fallback.enabled": fallback.length > 0,
|
|
120
120
|
"super_agent.model_fallback.models": fallback,
|
|
121
121
|
});
|
|
122
|
-
toast.success("
|
|
122
|
+
toast.success(t("router_panel.saved_toast"));
|
|
123
123
|
setSaved({ model, fallback });
|
|
124
124
|
mutate();
|
|
125
125
|
} catch (e) {
|
|
@@ -153,12 +153,12 @@ export function DefaultRouterCard() {
|
|
|
153
153
|
return (
|
|
154
154
|
<Section
|
|
155
155
|
title={t("router_panel.title")}
|
|
156
|
-
description="
|
|
156
|
+
description={t("router_panel.description")}
|
|
157
157
|
>
|
|
158
158
|
<div className="space-y-4">
|
|
159
159
|
{/* Resolution preview */}
|
|
160
160
|
<div className="flex flex-wrap items-center gap-2 rounded-lg border border-border bg-muted/20 p-3">
|
|
161
|
-
<Badge tone="success"><GitBranch size={11} />
|
|
161
|
+
<Badge tone="success"><GitBranch size={11} /> {t("router_panel.badge_default")}</Badge>
|
|
162
162
|
<span className={`font-mono text-xs ${!providerExists(model) && model ? "text-amber-400" : ""}`}>{model || "—"}</span>
|
|
163
163
|
{fallback.map((m) => (
|
|
164
164
|
<span key={m} className="flex items-center gap-2 text-muted-fg">
|
|
@@ -169,17 +169,17 @@ export function DefaultRouterCard() {
|
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
171
|
{providers.length === 0 ? (
|
|
172
|
-
<p className="text-xs text-muted-fg">
|
|
172
|
+
<p className="text-xs text-muted-fg">{t("router_panel.no_providers")}</p>
|
|
173
173
|
) : (
|
|
174
|
-
<Field label="
|
|
174
|
+
<Field label={t("router_panel.active_model_label")} hint={t("router_panel.active_model_hint")}>
|
|
175
175
|
<ProviderModelPicker value={model} onChange={setModel} providers={providers} />
|
|
176
176
|
</Field>
|
|
177
177
|
)}
|
|
178
178
|
|
|
179
179
|
<div className="rounded-lg border border-border bg-muted/20 p-3">
|
|
180
180
|
<div className="mb-2">
|
|
181
|
-
<div className="text-sm font-medium">
|
|
182
|
-
<div className="text-xs text-muted-fg">
|
|
181
|
+
<div className="text-sm font-medium">{t("router_panel.fallback_title")}</div>
|
|
182
|
+
<div className="text-xs text-muted-fg">{t("router_panel.fallback_desc")}</div>
|
|
183
183
|
</div>
|
|
184
184
|
<ul className="mb-3 space-y-1">
|
|
185
185
|
{fallback.map((m, i) => {
|
|
@@ -200,7 +200,7 @@ export function DefaultRouterCard() {
|
|
|
200
200
|
</button>
|
|
201
201
|
)}
|
|
202
202
|
{editing ? (
|
|
203
|
-
<Button size="sm" variant="secondary" onClick={() => setEditIdx(null)}>
|
|
203
|
+
<Button size="sm" variant="secondary" onClick={() => setEditIdx(null)}>{t("router_panel.done")}</Button>
|
|
204
204
|
) : (
|
|
205
205
|
<Button size="sm" variant="ghost" onClick={() => setEditIdx(i)}><Pencil size={12} /></Button>
|
|
206
206
|
)}
|
|
@@ -211,21 +211,21 @@ export function DefaultRouterCard() {
|
|
|
211
211
|
</li>
|
|
212
212
|
);
|
|
213
213
|
})}
|
|
214
|
-
{fallback.length === 0 && <li className="text-xs text-muted-fg">
|
|
214
|
+
{fallback.length === 0 && <li className="text-xs text-muted-fg">{t("router_panel.fallback_empty")}</li>}
|
|
215
215
|
</ul>
|
|
216
216
|
{providers.length > 0 && (
|
|
217
217
|
<div className="space-y-2">
|
|
218
|
-
<div className="text-xs text-muted-fg">
|
|
218
|
+
<div className="text-xs text-muted-fg">{t("router_panel.add_to_chain")}</div>
|
|
219
219
|
<ProviderModelPicker value={newFallback} onChange={setNewFallback} providers={providers} />
|
|
220
220
|
<Button size="sm" variant="secondary" onClick={addFallback} disabled={!newFallback.includes(":") || newFallback.endsWith(":")}>
|
|
221
|
-
<Plus size={13} />
|
|
221
|
+
<Plus size={13} /> {t("router_panel.add_to_chain")}
|
|
222
222
|
</Button>
|
|
223
223
|
</div>
|
|
224
224
|
)}
|
|
225
225
|
</div>
|
|
226
226
|
|
|
227
227
|
<Button variant="primary" loading={busy} disabled={!dirty} onClick={submit}>
|
|
228
|
-
{dirty ? "
|
|
228
|
+
{dirty ? t("router_panel.save") : t("router_panel.saved")}
|
|
229
229
|
</Button>
|
|
230
230
|
</div>
|
|
231
231
|
</Section>
|
|
@@ -17,7 +17,7 @@ export function DevicesPanel() {
|
|
|
17
17
|
if (!confirm(t("settings.devices_revoke_confirm", { id }))) return;
|
|
18
18
|
try {
|
|
19
19
|
await Pair.revoke(id);
|
|
20
|
-
toast.success("
|
|
20
|
+
toast.success(t("settings.devices_revoke_success"));
|
|
21
21
|
mutate();
|
|
22
22
|
} catch (e) {
|
|
23
23
|
toast.error((e as Error).message);
|
|
@@ -46,9 +46,9 @@ export function DevicesPanel() {
|
|
|
46
46
|
<Badge tone={c.kind === "web" ? "info" : c.kind === "deck" ? "success" : "muted"}>{c.kind}</Badge>
|
|
47
47
|
<span className="font-mono text-xs text-muted-fg">…{c.token_suffix}</span>
|
|
48
48
|
<span className="ml-auto text-xs text-muted-fg">
|
|
49
|
-
|
|
49
|
+
{t("settings.devices_last_seen")} {c.last_seen ? new Date(c.last_seen).toLocaleString() : t("settings.devices_never")}
|
|
50
50
|
</span>
|
|
51
|
-
<Button size="sm" variant="destructive" onClick={() => revoke(c.id)}>
|
|
51
|
+
<Button size="sm" variant="destructive" onClick={() => revoke(c.id)}>{t("settings.devices_revoke")}</Button>
|
|
52
52
|
</li>
|
|
53
53
|
))}
|
|
54
54
|
</ul>
|
|
@@ -49,7 +49,7 @@ export function EnginesPanel() {
|
|
|
49
49
|
// JSON mode: replace the whole engines.<slug> block with the parsed object.
|
|
50
50
|
if (raw) {
|
|
51
51
|
await patch({ [`engines.${provider.slug}`]: raw });
|
|
52
|
-
toast.success("
|
|
52
|
+
toast.success(t("engines_panel.saved_json"));
|
|
53
53
|
mutate();
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
@@ -71,7 +71,7 @@ export function EnginesPanel() {
|
|
|
71
71
|
if (apiKeyValue) set[`${base}.api_key`] = apiKeyValue;
|
|
72
72
|
|
|
73
73
|
await patch(set, unset);
|
|
74
|
-
toast.success("
|
|
74
|
+
toast.success(t("engines_panel.saved"));
|
|
75
75
|
mutate();
|
|
76
76
|
};
|
|
77
77
|
|
|
@@ -83,10 +83,10 @@ export function EnginesPanel() {
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
const remove = async (p: Provider) => {
|
|
86
|
-
if (!confirm(
|
|
86
|
+
if (!confirm(t("engines_panel.delete_confirm", { name: p.name || p.slug }))) return;
|
|
87
87
|
try {
|
|
88
88
|
await patch(undefined, [`engines.${p.slug}`]);
|
|
89
|
-
toast.success("
|
|
89
|
+
toast.success(t("engines_panel.deleted"));
|
|
90
90
|
mutate();
|
|
91
91
|
} catch (e) { toast.error((e as Error).message); }
|
|
92
92
|
};
|
|
@@ -94,11 +94,11 @@ export function EnginesPanel() {
|
|
|
94
94
|
return (
|
|
95
95
|
<Section
|
|
96
96
|
title={t("engines_panel.title")}
|
|
97
|
-
description="
|
|
97
|
+
description={t("engines_panel.description")}
|
|
98
98
|
action={<Button size="sm" variant="primary" onClick={openCreate}><Plus size={14} /> {t("engines_panel.new_btn")}</Button>}
|
|
99
99
|
>
|
|
100
100
|
{providers.length === 0 ? (
|
|
101
|
-
<Empty>
|
|
101
|
+
<Empty>{t("engines_panel.empty")}</Empty>
|
|
102
102
|
) : (
|
|
103
103
|
<div className="grid grid-cols-1 items-stretch gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
|
104
104
|
{providers.map((p) => (
|
|
@@ -110,7 +110,7 @@ export function EnginesPanel() {
|
|
|
110
110
|
className="flex min-h-[120px] flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border text-muted-fg transition-colors hover:border-muted-fg/60 hover:text-foreground"
|
|
111
111
|
>
|
|
112
112
|
<Plus size={20} />
|
|
113
|
-
<span className="text-sm font-medium">
|
|
113
|
+
<span className="text-sm font-medium">{t("engines_panel.add_card")}</span>
|
|
114
114
|
</button>
|
|
115
115
|
</div>
|
|
116
116
|
)}
|
|
@@ -48,12 +48,12 @@ export function IdentityPanel() {
|
|
|
48
48
|
options={LANGS.map((l) => ({ value: l, label: l }))}
|
|
49
49
|
/>
|
|
50
50
|
</Field>
|
|
51
|
-
<Field label={t("settings.identity.timezone")} hint="
|
|
51
|
+
<Field label={t("settings.identity.timezone")} hint={t("settings.identity.timezone_hint")}>
|
|
52
52
|
<Input value={draft.timezone || ""} onChange={(e) => setDraft({ ...draft, timezone: e.target.value })} />
|
|
53
53
|
</Field>
|
|
54
54
|
</div>
|
|
55
55
|
<div className="mt-3">
|
|
56
|
-
<Field label={t("settings.identity.owner_context")} hint="
|
|
56
|
+
<Field label={t("settings.identity.owner_context")} hint={t("settings.identity.owner_context_hint")}>
|
|
57
57
|
<Textarea
|
|
58
58
|
rows={3}
|
|
59
59
|
value={draft.owner_context || ""}
|
|
@@ -15,17 +15,17 @@ import { t } from "../../i18n";
|
|
|
15
15
|
// provider/model changes the embedder space, so a "Reindexar" action rebuilds
|
|
16
16
|
// the vector store under the new embedder.
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
{ value: "auto", label: "
|
|
20
|
-
{ value: "ollama", label: "
|
|
21
|
-
{ value: "gemini", label: "
|
|
22
|
-
{ value: "openai", label: "
|
|
23
|
-
{ value: "tf", label: "
|
|
18
|
+
const providerOptions = () => [
|
|
19
|
+
{ value: "auto", label: t("memory_panel.provider_auto") },
|
|
20
|
+
{ value: "ollama", label: t("memory_panel.provider_ollama") },
|
|
21
|
+
{ value: "gemini", label: t("memory_panel.provider_gemini") },
|
|
22
|
+
{ value: "openai", label: t("memory_panel.provider_openai") },
|
|
23
|
+
{ value: "tf", label: t("memory_panel.provider_tf") },
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
{ value: "chain", label: "
|
|
28
|
-
{ value: "single", label: "
|
|
26
|
+
const modeOptions = () => [
|
|
27
|
+
{ value: "chain", label: t("memory_panel.mode_chain") },
|
|
28
|
+
{ value: "single", label: t("memory_panel.mode_single") },
|
|
29
29
|
];
|
|
30
30
|
|
|
31
31
|
interface MemoryCfg {
|
|
@@ -68,7 +68,7 @@ export function MemoryPanel() {
|
|
|
68
68
|
await patch(set);
|
|
69
69
|
await mutateProviders();
|
|
70
70
|
} catch (e) {
|
|
71
|
-
toast.error(
|
|
71
|
+
toast.error(t("memory_panel.save_failed", { msg: (e as Error).message }));
|
|
72
72
|
} finally {
|
|
73
73
|
setBusy(false);
|
|
74
74
|
}
|
|
@@ -80,9 +80,9 @@ export function MemoryPanel() {
|
|
|
80
80
|
try {
|
|
81
81
|
const r = await Embeddings.test({});
|
|
82
82
|
setTestResult(`${r.embedder} · dim ${r.dim} · ${r.ms}ms`);
|
|
83
|
-
toast.success(
|
|
83
|
+
toast.success(t("memory_panel.test_ok", { embedder: r.embedder }));
|
|
84
84
|
} catch (e) {
|
|
85
|
-
toast.error(
|
|
85
|
+
toast.error(t("memory_panel.test_failed", { msg: (e as Error).message }));
|
|
86
86
|
} finally {
|
|
87
87
|
setBusy(false);
|
|
88
88
|
}
|
|
@@ -92,9 +92,9 @@ export function MemoryPanel() {
|
|
|
92
92
|
setBusy(true);
|
|
93
93
|
try {
|
|
94
94
|
const r = await Embeddings.reindex();
|
|
95
|
-
toast.success(
|
|
95
|
+
toast.success(t("memory_panel.reindexed", { indexed: r.indexed, cleared: r.cleared }));
|
|
96
96
|
} catch (e) {
|
|
97
|
-
toast.error(
|
|
97
|
+
toast.error(t("memory_panel.reindex_failed", { msg: (e as Error).message }));
|
|
98
98
|
} finally {
|
|
99
99
|
setBusy(false);
|
|
100
100
|
}
|
|
@@ -104,24 +104,24 @@ export function MemoryPanel() {
|
|
|
104
104
|
<div className="grid gap-6 xl:grid-cols-2 xl:items-start">
|
|
105
105
|
<Section
|
|
106
106
|
title={t("memory_panel.embeddings_title")}
|
|
107
|
-
description="
|
|
107
|
+
description={t("memory_panel.embeddings_desc")}
|
|
108
108
|
>
|
|
109
109
|
<div className="space-y-3">
|
|
110
|
-
<Field label="
|
|
110
|
+
<Field label={t("memory_panel.provider_label")} hint={t("memory_panel.provider_hint")}>
|
|
111
111
|
<UiSelect
|
|
112
112
|
value={provider}
|
|
113
113
|
onChange={(v) => apply({ "memory.embeddings.provider": v })}
|
|
114
|
-
options={
|
|
114
|
+
options={providerOptions()}
|
|
115
115
|
disabled={busy}
|
|
116
116
|
className="max-w-xl"
|
|
117
117
|
/>
|
|
118
118
|
</Field>
|
|
119
119
|
|
|
120
|
-
<Field label="
|
|
120
|
+
<Field label={t("memory_panel.mode_label")} hint={t("memory_panel.mode_hint")}>
|
|
121
121
|
<UiSelect
|
|
122
122
|
value={mode}
|
|
123
123
|
onChange={(v) => apply({ "memory.embeddings.mode": v })}
|
|
124
|
-
options={
|
|
124
|
+
options={modeOptions()}
|
|
125
125
|
disabled={busy}
|
|
126
126
|
className="max-w-md"
|
|
127
127
|
/>
|
|
@@ -130,25 +130,25 @@ export function MemoryPanel() {
|
|
|
130
130
|
<div className="flex flex-wrap items-center gap-2 pt-1">
|
|
131
131
|
{engines.map((e) => (
|
|
132
132
|
<Badge key={e.id} tone={e.available ? "success" : "muted"}>
|
|
133
|
-
{e.id}: {e.available ? "
|
|
133
|
+
{e.id}: {e.available ? t("memory_panel.available") : t("memory_panel.unavailable")}
|
|
134
134
|
</Badge>
|
|
135
135
|
))}
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
138
|
<div className="flex flex-wrap items-center gap-3 pt-1">
|
|
139
139
|
<Button variant="secondary" onClick={runTest} loading={busy}>
|
|
140
|
-
<Sparkles size={14} />
|
|
140
|
+
<Sparkles size={14} /> {t("memory_panel.test_btn")}
|
|
141
141
|
</Button>
|
|
142
142
|
<Button variant="secondary" onClick={runReindex} loading={busy}>
|
|
143
|
-
<Database size={14} />
|
|
143
|
+
<Database size={14} /> {t("memory_panel.reindex_btn")}
|
|
144
144
|
</Button>
|
|
145
145
|
{testResult && <span className="text-sm text-muted-foreground">{testResult}</span>}
|
|
146
146
|
</div>
|
|
147
147
|
</div>
|
|
148
148
|
</Section>
|
|
149
149
|
|
|
150
|
-
<Section title={t("memory_panel.ollama_title")} description="
|
|
151
|
-
<Field label="
|
|
150
|
+
<Section title={t("memory_panel.ollama_title")} description={t("memory_panel.ollama_desc")}>
|
|
151
|
+
<Field label={t("memory_panel.model_label")}>
|
|
152
152
|
<Input
|
|
153
153
|
defaultValue={emb.ollama?.model || "nomic-embed-text"}
|
|
154
154
|
placeholder="nomic-embed-text"
|
|
@@ -160,7 +160,7 @@ export function MemoryPanel() {
|
|
|
160
160
|
className="max-w-md"
|
|
161
161
|
/>
|
|
162
162
|
</Field>
|
|
163
|
-
<Field label="
|
|
163
|
+
<Field label={t("memory_panel.base_url_label")} hint={t("memory_panel.ollama_base_url_hint")}>
|
|
164
164
|
<Input
|
|
165
165
|
defaultValue={emb.ollama?.base_url || ""}
|
|
166
166
|
placeholder="http://localhost:11434"
|
|
@@ -171,8 +171,8 @@ export function MemoryPanel() {
|
|
|
171
171
|
</Field>
|
|
172
172
|
</Section>
|
|
173
173
|
|
|
174
|
-
<Section title={t("memory_panel.openai_title")} description="
|
|
175
|
-
<Field label="
|
|
174
|
+
<Section title={t("memory_panel.openai_title")} description={t("memory_panel.openai_desc")}>
|
|
175
|
+
<Field label={t("memory_panel.model_label")}>
|
|
176
176
|
<Input
|
|
177
177
|
defaultValue={emb.openai?.model || "text-embedding-3-small"}
|
|
178
178
|
placeholder="text-embedding-3-small"
|
|
@@ -184,7 +184,7 @@ export function MemoryPanel() {
|
|
|
184
184
|
className="max-w-md"
|
|
185
185
|
/>
|
|
186
186
|
</Field>
|
|
187
|
-
<Field label="
|
|
187
|
+
<Field label={t("memory_panel.api_key_label")} hint={t("memory_panel.openai_key_hint")}>
|
|
188
188
|
<Input
|
|
189
189
|
type="password"
|
|
190
190
|
defaultValue={emb.openai?.api_key || ""}
|
|
@@ -199,8 +199,8 @@ export function MemoryPanel() {
|
|
|
199
199
|
</Field>
|
|
200
200
|
</Section>
|
|
201
201
|
|
|
202
|
-
<Section title={t("memory_panel.gemini_title")} description="
|
|
203
|
-
<Field label="
|
|
202
|
+
<Section title={t("memory_panel.gemini_title")} description={t("memory_panel.gemini_desc")}>
|
|
203
|
+
<Field label={t("memory_panel.model_label")}>
|
|
204
204
|
<Input
|
|
205
205
|
defaultValue={emb.gemini?.model || "text-embedding-004"}
|
|
206
206
|
placeholder="text-embedding-004"
|
|
@@ -212,7 +212,7 @@ export function MemoryPanel() {
|
|
|
212
212
|
className="max-w-md"
|
|
213
213
|
/>
|
|
214
214
|
</Field>
|
|
215
|
-
<Field label="
|
|
215
|
+
<Field label={t("memory_panel.api_key_label")} hint={t("memory_panel.gemini_key_hint")}>
|
|
216
216
|
<Input
|
|
217
217
|
type="password"
|
|
218
218
|
defaultValue={emb.gemini?.api_key || ""}
|
|
@@ -229,10 +229,10 @@ export function MemoryPanel() {
|
|
|
229
229
|
|
|
230
230
|
<Section
|
|
231
231
|
title={t("memory_panel.compaction_title")}
|
|
232
|
-
description="
|
|
232
|
+
description={t("memory_panel.compaction_desc")}
|
|
233
233
|
>
|
|
234
234
|
<div className="grid gap-3 sm:grid-cols-2">
|
|
235
|
-
<Field label="
|
|
235
|
+
<Field label={t("memory_panel.threshold_label")} hint={t("memory_panel.threshold_hint")}>
|
|
236
236
|
<Input
|
|
237
237
|
type="number"
|
|
238
238
|
min={1}
|
|
@@ -248,7 +248,7 @@ export function MemoryPanel() {
|
|
|
248
248
|
className="max-w-[10rem]"
|
|
249
249
|
/>
|
|
250
250
|
</Field>
|
|
251
|
-
<Field label="
|
|
251
|
+
<Field label={t("memory_panel.keep_recent_label")} hint={t("memory_panel.keep_recent_hint")}>
|
|
252
252
|
<Input
|
|
253
253
|
type="number"
|
|
254
254
|
min={1}
|
|
@@ -265,7 +265,7 @@ export function MemoryPanel() {
|
|
|
265
265
|
/>
|
|
266
266
|
</Field>
|
|
267
267
|
</div>
|
|
268
|
-
<Field label="
|
|
268
|
+
<Field label={t("memory_panel.compact_model_label")} hint={t("memory_panel.compact_model_hint")}>
|
|
269
269
|
<Input
|
|
270
270
|
defaultValue={mem.compact_model || "ollama:gemma4:31b-cloud"}
|
|
271
271
|
placeholder="ollama:gemma4:31b-cloud"
|
|
@@ -277,10 +277,10 @@ export function MemoryPanel() {
|
|
|
277
277
|
className="max-w-md"
|
|
278
278
|
/>
|
|
279
279
|
</Field>
|
|
280
|
-
<Field label="
|
|
280
|
+
<Field label={t("memory_panel.compact_fallback_label")} hint={t("memory_panel.compact_fallback_hint")}>
|
|
281
281
|
<Input
|
|
282
282
|
defaultValue={mem.compact_fallback_model || ""}
|
|
283
|
-
placeholder="
|
|
283
|
+
placeholder={t("memory_panel.compact_fallback_ph")}
|
|
284
284
|
disabled={busy}
|
|
285
285
|
onBlur={(ev) => {
|
|
286
286
|
const v = ev.target.value.trim();
|