@agentprojectcontext/apx 1.37.0 → 1.38.1

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.
Files changed (68) hide show
  1. package/README.md +11 -0
  2. package/package.json +1 -1
  3. package/src/core/mascot.js +80 -80
  4. package/src/interfaces/web/dist/assets/index-CQc_5t8F.js +629 -0
  5. package/src/interfaces/web/dist/assets/index-CQc_5t8F.js.map +1 -0
  6. package/src/interfaces/web/dist/assets/{index-B6sYFQFa.css → index-hwxuTPcK.css} +1 -1
  7. package/src/interfaces/web/dist/index.html +2 -2
  8. package/src/interfaces/web/src/App.tsx +15 -24
  9. package/src/interfaces/web/src/components/ModelCombobox.tsx +1 -1
  10. package/src/interfaces/web/src/components/Roby.tsx +96 -0
  11. package/src/interfaces/web/src/components/TelegramChannelDialog.tsx +11 -11
  12. package/src/interfaces/web/src/components/TelegramSendDialog.tsx +5 -5
  13. package/src/interfaces/web/src/components/chat/MessageBubble.tsx +2 -2
  14. package/src/interfaces/web/src/components/chat/ModelPicker.tsx +5 -5
  15. package/src/interfaces/web/src/components/chat/ToolCall.tsx +23 -19
  16. package/src/interfaces/web/src/components/code/CodeArtifactsTab.tsx +10 -10
  17. package/src/interfaces/web/src/components/code/CodeContextTab.tsx +7 -7
  18. package/src/interfaces/web/src/components/code/CodeProjectPicker.tsx +3 -2
  19. package/src/interfaces/web/src/components/common/TabNav.tsx +3 -2
  20. package/src/interfaces/web/src/components/config/ConfigTabsEditor.tsx +3 -2
  21. package/src/interfaces/web/src/components/config/GlobalConfigEditor.tsx +2 -2
  22. package/src/interfaces/web/src/components/config/global-config-sections.ts +9 -9
  23. package/src/interfaces/web/src/components/config/project-config-sections.ts +61 -54
  24. package/src/interfaces/web/src/components/deck/DaemonCard.tsx +6 -5
  25. package/src/interfaces/web/src/components/inputs/KeyValueList.tsx +5 -4
  26. package/src/interfaces/web/src/components/inputs/VarTokenInput.tsx +3 -3
  27. package/src/interfaces/web/src/components/layout/ProjectSidebar.tsx +22 -9
  28. package/src/interfaces/web/src/components/settings/AdvancedPanel.tsx +1 -1
  29. package/src/interfaces/web/src/components/settings/AppearancePanel.tsx +1 -1
  30. package/src/interfaces/web/src/components/settings/DefaultRouterCard.tsx +14 -14
  31. package/src/interfaces/web/src/components/settings/DevicesPanel.tsx +3 -3
  32. package/src/interfaces/web/src/components/settings/EnginesPanel.tsx +7 -7
  33. package/src/interfaces/web/src/components/settings/IdentityPanel.tsx +2 -2
  34. package/src/interfaces/web/src/components/settings/MemoryPanel.tsx +37 -37
  35. package/src/interfaces/web/src/components/settings/SkillsInspectorPanel.tsx +44 -35
  36. package/src/interfaces/web/src/components/settings/SuperAgentPanel.tsx +5 -5
  37. package/src/interfaces/web/src/components/settings/TelegramChannelsPanel.tsx +3 -3
  38. package/src/interfaces/web/src/components/settings/TelegramContactsPanel.tsx +1 -1
  39. package/src/interfaces/web/src/components/settings/TelegramGlobalPanel.tsx +3 -3
  40. package/src/interfaces/web/src/components/settings/TelegramRolesPanel.tsx +1 -1
  41. package/src/interfaces/web/src/components/settings/providers/ProviderCard.tsx +6 -6
  42. package/src/interfaces/web/src/components/settings/providers/ProviderModal.tsx +36 -36
  43. package/src/interfaces/web/src/components/voice/VoiceProviderList.tsx +15 -14
  44. package/src/interfaces/web/src/components/voice/VoiceProviderModal.tsx +22 -22
  45. package/src/interfaces/web/src/components/voice/VoiceSttCard.tsx +18 -17
  46. package/src/interfaces/web/src/components/voice/VoiceTestCard.tsx +19 -18
  47. package/src/interfaces/web/src/hooks/useChat.ts +6 -5
  48. package/src/interfaces/web/src/i18n/en.ts +517 -1
  49. package/src/interfaces/web/src/i18n/es.ts +517 -1
  50. package/src/interfaces/web/src/i18n/index.ts +1 -1
  51. package/src/interfaces/web/src/lib/api/voice.ts +5 -5
  52. package/src/interfaces/web/src/screens/ProjectScreen.tsx +14 -1
  53. package/src/interfaces/web/src/screens/SettingsScreen.tsx +1 -1
  54. package/src/interfaces/web/src/screens/base/AgentDefaultsTab.tsx +8 -8
  55. package/src/interfaces/web/src/screens/base/ComingSoon.tsx +3 -2
  56. package/src/interfaces/web/src/screens/modules/CodeScreen.tsx +12 -12
  57. package/src/interfaces/web/src/screens/modules/DeckScreen.tsx +15 -15
  58. package/src/interfaces/web/src/screens/modules/DesktopScreen.tsx +37 -37
  59. package/src/interfaces/web/src/screens/modules/VoiceScreen.tsx +8 -8
  60. package/src/interfaces/web/src/screens/project/AgentBrainGraph.tsx +16 -10
  61. package/src/interfaces/web/src/screens/project/AgentDetailScreen.tsx +25 -24
  62. package/src/interfaces/web/src/screens/project/ChatTab.tsx +2 -2
  63. package/src/interfaces/web/src/screens/project/ConfigTab.tsx +3 -3
  64. package/src/interfaces/web/src/screens/project/McpsTab.tsx +6 -9
  65. package/src/interfaces/web/src/screens/project/RoutinesTab.tsx +66 -52
  66. package/src/interfaces/web/src/screens/project/TelegramTab.tsx +1 -1
  67. package/src/interfaces/web/dist/assets/index-DsADpObh.js +0 -633
  68. package/src/interfaces/web/dist/assets/index-DsADpObh.js.map +0 -1
@@ -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 PROVIDER_OPTIONS = [
19
- { value: "auto", label: "Automático (cadena: Ollama → Gemini → OpenAI → offline)" },
20
- { value: "ollama", label: "Ollama — local, sin API key (nomic-embed-text)" },
21
- { value: "gemini", label: "Gemini — free tier con key (text-embedding-004)" },
22
- { value: "openai", label: "OpenAI — text-embedding-3-small (cloud)" },
23
- { value: "tf", label: "Offline (term-frequency, sin modelo — degradado)" },
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 MODE_OPTIONS = [
27
- { value: "chain", label: "Cadena (fallback automático)" },
28
- { value: "single", label: "Único (usa solo el elegido)" },
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(`No se pudo guardar: ${(e as Error).message}`);
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(`Embedding OK con ${r.embedder}`);
83
+ toast.success(t("memory_panel.test_ok", { embedder: r.embedder }));
84
84
  } catch (e) {
85
- toast.error(`Falló el test: ${(e as Error).message}`);
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(`Reindexado: ${r.indexed} chunks (limpiados ${r.cleared}).`);
95
+ toast.success(t("memory_panel.reindexed", { indexed: r.indexed, cleared: r.cleared }));
96
96
  } catch (e) {
97
- toast.error(`Falló el reindex: ${(e as Error).message}`);
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="Modelo que vectoriza el historial de todos los canales para la memoria relevante. Igual que TTS/STT: elegí proveedor y modelo. 'Automático' prueba local primero y cae al offline si no hay nada."
107
+ description={t("memory_panel.embeddings_desc")}
108
108
  >
109
109
  <div className="space-y-3">
110
- <Field label="Proveedor" hint="Ollama es local y gratis. Gemini/OpenAI usan la API key de su sección en Modelos (o la de acá abajo).">
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={PROVIDER_OPTIONS}
114
+ options={providerOptions()}
115
115
  disabled={busy}
116
116
  className="max-w-xl"
117
117
  />
118
118
  </Field>
119
119
 
120
- <Field label="Modo de selección" hint="Cadena cae al siguiente si uno falla; Único usa exactamente el proveedor elegido.">
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={MODE_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 ? "disponible" : "no disp."}
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} /> Probar embedding
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} /> Reindexar memoria
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="Sin API key. Corre nomic-embed-text en tu Ollama local o cloud.">
151
- <Field label="Modelo">
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="Base URL" hint='Vacío usa engines.ollama.base_url (por defecto http://localhost:11434).'>
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="text-embedding-3-small (1536 dims) u otro modelo compatible.">
175
- <Field label="Modelo">
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="API key" hint="Vacío reusa engines.openai.api_key. Dejalo en blanco para no tocar la guardada.">
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="text-embedding-004 (768 dims). Free tier con API key de Google.">
203
- <Field label="Modelo">
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="API key" hint="Vacío reusa engines.gemini.api_key.">
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="Cuando un chat supera el umbral de turnos, los más viejos se resumen con un LLM liviano (local) y se guardan como [RESUMEN COMPACTADO], manteniendo el contexto acotado. Corre fuera del hot-path: el turno actual usa el resumen que ya exista."
232
+ description={t("memory_panel.compaction_desc")}
233
233
  >
234
234
  <div className="grid gap-3 sm:grid-cols-2">
235
- <Field label="Umbral de compactación" hint="Compactar una vez que el chat supera estos turnos (por defecto 60).">
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="Turnos recientes a preservar" hint="Turnos verbatim que NUNCA se compactan (por defecto 40). Debe ser menor al umbral.">
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="Modelo de compactación" hint="LLM liviano para resumir. Ideal uno local (Ollama) para no gastar. Formato proveedor:modelo.">
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="Modelo de fallback" hint="Se usa si el de compactación falla. Vacío cae al modelo del super-agente.">
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="(vacío → modelo del super-agente)"
283
+ placeholder={t("memory_panel.compact_fallback_ph")}
284
284
  disabled={busy}
285
285
  onBlur={(ev) => {
286
286
  const v = ev.target.value.trim();
@@ -5,6 +5,7 @@ import { Section } from "../Section";
5
5
  import { Button, Field, Input, Loading, Badge, Switch } from "../ui";
6
6
  import { useToast } from "../Toast";
7
7
  import { Skills, type InspectTrace } from "../../lib/api/skills";
8
+ import { t } from "../../i18n";
8
9
 
9
10
  // Skill Inspector — per-turn skill RAG middleware. When ON, the static
10
11
  // "available skills" slug-dump is removed from the agent's system prompt and a
@@ -19,15 +20,17 @@ import { Skills, type InspectTrace } from "../../lib/api/skills";
19
20
  // Numeric knobs with human labels + sane ranges. We keep them as plain number
20
21
  // inputs (same idiom as the embeddings model fields) rather than sliders so the
21
22
  // values are explicit and copy-pasteable.
22
- const KNOBS: { key: keyof NumericKnobs; label: string; hint: string; step: number; min: number; max: number }[] = [
23
- { key: "load_threshold", label: "Umbral de carga", hint: "Similitud mínima para inyectar el CUERPO de la skill (alto = más estricto).", step: 0.01, min: 0, max: 1 },
24
- { key: "hint_threshold", label: "Umbral de sugerencia", hint: "Similitud mínima para solo SUGERIR la skill (que el agente la cargue si quiere).", step: 0.01, min: 0, max: 1 },
25
- { key: "margin", label: "Margen sobre el 2º", hint: "El top debe superar al segundo por este margen para cargar su cuerpo (evita empates flojos).", step: 0.01, min: 0, max: 1 },
26
- { key: "max_loaded", label: "Máx. cuerpos cargados", hint: "Cuántas skills se inyectan completas por turno.", step: 1, min: 0, max: 5 },
27
- { key: "max_hints", label: "Máx. sugerencias", hint: "Cuántas skills extra se nombran como sugerencia.", step: 1, min: 0, max: 8 },
28
- { key: "prompt_floor", label: "Largo mínimo del prompt", hint: "Mensajes más cortos que esto se ignoran (evita 'ok', 'hola').", step: 1, min: 0, max: 40 },
29
- { key: "body_char_cap", label: "Tope de chars del cuerpo", hint: "Recorta cuerpos de skill largos para no inflar el contexto.", step: 500, min: 500, max: 20000 },
30
- ];
23
+ function knobs(): { key: keyof NumericKnobs; label: string; hint: string; step: number; min: number; max: number }[] {
24
+ return [
25
+ { key: "load_threshold", label: t("settings_ui.knob_load_threshold"), hint: t("settings_ui.knob_load_threshold_hint"), step: 0.01, min: 0, max: 1 },
26
+ { key: "hint_threshold", label: t("settings_ui.knob_hint_threshold"), hint: t("settings_ui.knob_hint_threshold_hint"), step: 0.01, min: 0, max: 1 },
27
+ { key: "margin", label: t("settings_ui.knob_margin"), hint: t("settings_ui.knob_margin_hint"), step: 0.01, min: 0, max: 1 },
28
+ { key: "max_loaded", label: t("settings_ui.knob_max_loaded"), hint: t("settings_ui.knob_max_loaded_hint"), step: 1, min: 0, max: 5 },
29
+ { key: "max_hints", label: t("settings_ui.knob_max_hints"), hint: t("settings_ui.knob_max_hints_hint"), step: 1, min: 0, max: 8 },
30
+ { key: "prompt_floor", label: t("settings_ui.knob_prompt_floor"), hint: t("settings_ui.knob_prompt_floor_hint"), step: 1, min: 0, max: 40 },
31
+ { key: "body_char_cap", label: t("settings_ui.knob_body_char_cap"), hint: t("settings_ui.knob_body_char_cap_hint"), step: 500, min: 500, max: 20000 },
32
+ ];
33
+ }
31
34
 
32
35
  type NumericKnobs = {
33
36
  load_threshold: number; hint_threshold: number; margin: number;
@@ -52,7 +55,7 @@ export function SkillsInspectorPanel() {
52
55
  await Skills.updateInspector(patch);
53
56
  await mutate();
54
57
  } catch (e) {
55
- toast.error(`No se pudo guardar: ${(e as Error).message}`);
58
+ toast.error(t("settings_ui.could_not_save", { msg: (e as Error).message }));
56
59
  } finally {
57
60
  setBusy(false);
58
61
  }
@@ -63,11 +66,17 @@ export function SkillsInspectorPanel() {
63
66
  try {
64
67
  const r = await Skills.index({ force });
65
68
  toast.success(
66
- `Indexado con ${r.embedder} (dim ${r.dim}): +${r.changed.added} ~${r.changed.refreshed} -${r.changed.removed}.`,
69
+ t("settings_ui.indexed_with", {
70
+ embedder: r.embedder,
71
+ dim: r.dim,
72
+ added: r.changed.added,
73
+ refreshed: r.changed.refreshed,
74
+ removed: r.changed.removed,
75
+ }),
67
76
  );
68
77
  await mutate();
69
78
  } catch (e) {
70
- toast.error(`Falló el index: ${(e as Error).message}`);
79
+ toast.error(t("settings_ui.index_failed", { msg: (e as Error).message }));
71
80
  } finally {
72
81
  setBusy(false);
73
82
  }
@@ -81,7 +90,7 @@ export function SkillsInspectorPanel() {
81
90
  const r = await Skills.inspect(probe.trim());
82
91
  setProbeResult(r.trace);
83
92
  } catch (e) {
84
- toast.error(`Falló el dry-run: ${(e as Error).message}`);
93
+ toast.error(t("settings_ui.dry_run_failed", { msg: (e as Error).message }));
85
94
  } finally {
86
95
  setBusy(false);
87
96
  }
@@ -90,55 +99,55 @@ export function SkillsInspectorPanel() {
90
99
  return (
91
100
  <div className="grid gap-6 xl:grid-cols-2 xl:items-start">
92
101
  <Section
93
- title="Skill Inspector (RAG por turno)"
94
- description="Función experimental. Cuando está activa, el agente NO recibe la lista completa de skills en su prompt; en cada mensaje un RAG local decide qué skill(s) cargar — el cuerpo completo si hay match fuerte, una sugerencia si hay match medio, nada si no aplica. Se reevalúa cada turno: una skill que dejó de ser relevante desaparece del contexto."
102
+ title={t("settings_ui.inspector_title")}
103
+ description={t("settings_ui.inspector_desc")}
95
104
  >
96
105
  <div className="space-y-4">
97
106
  <Field
98
- label="Activar inspector"
99
- hint="Apagado = comportamiento clásico (lista de slugs + sugerencia pasiva). Encendido = el RAG decide por turno."
107
+ label={t("settings_ui.enable_inspector")}
108
+ hint={t("settings_ui.enable_inspector_hint")}
100
109
  >
101
110
  <Switch
102
111
  checked={cfg.enabled}
103
112
  disabled={busy}
104
113
  onChange={(v) => apply({ enabled: v })}
105
- label={cfg.enabled ? "Encendido" : "Apagado"}
114
+ label={cfg.enabled ? t("settings_ui.on") : t("settings_ui.off")}
106
115
  />
107
116
  </Field>
108
117
 
109
118
  <div className="flex flex-wrap items-center gap-2 pt-1">
110
119
  <Badge tone={idx.count > 0 ? "success" : "warning"}>
111
- Índice: {idx.count} skills
120
+ {t("settings_ui.index_count", { n: idx.count })}
112
121
  </Badge>
113
- <Badge tone="muted">{idx.embedder || "sin indexar"}</Badge>
114
- {idx.dim ? <Badge tone="muted">dim {idx.dim}</Badge> : null}
122
+ <Badge tone="muted">{idx.embedder || t("settings_ui.not_indexed")}</Badge>
123
+ {idx.dim ? <Badge tone="muted">{t("settings_ui.dim", { dim: idx.dim })}</Badge> : null}
115
124
  {idx.updated_at ? (
116
125
  <span className="text-xs text-muted-foreground">
117
- actualizado {new Date(idx.updated_at).toLocaleString()}
126
+ {t("settings_ui.updated_at", { date: new Date(idx.updated_at).toLocaleString() })}
118
127
  </span>
119
128
  ) : null}
120
129
  </div>
121
130
 
122
131
  <div className="flex flex-wrap items-center gap-3 pt-1">
123
132
  <Button variant="secondary" onClick={() => runIndex(false)} loading={busy}>
124
- <RefreshCw size={14} /> Reindexar
133
+ <RefreshCw size={14} /> {t("settings_ui.reindex")}
125
134
  </Button>
126
135
  <Button variant="secondary" onClick={() => runIndex(true)} loading={busy}>
127
- <RefreshCw size={14} /> Reindexar (forzado)
136
+ <RefreshCw size={14} /> {t("settings_ui.reindex_forced")}
128
137
  </Button>
129
138
  <span className="text-xs text-muted-foreground">
130
- El embedder sale de Memoria (RAG). Local con Ollama, u offline si no hay proveedor.
139
+ {t("settings_ui.embedder_source")}
131
140
  </span>
132
141
  </div>
133
142
  </div>
134
143
  </Section>
135
144
 
136
145
  <Section
137
- title="Umbrales y límites"
138
- description="Ajustá qué tan agresivo es el inspector. Subir los umbrales = menos falsos positivos pero más riesgo de perderse una skill; bajarlos = lo contrario."
146
+ title={t("settings_ui.thresholds_title")}
147
+ description={t("settings_ui.thresholds_desc")}
139
148
  >
140
149
  <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
141
- {KNOBS.map((k) => (
150
+ {knobs().map((k) => (
142
151
  <Field key={k.key} label={k.label} hint={k.hint}>
143
152
  <Input
144
153
  type="number"
@@ -159,21 +168,21 @@ export function SkillsInspectorPanel() {
159
168
  </Section>
160
169
 
161
170
  <Section
162
- title="Probar (dry-run)"
163
- description="Escribí un mensaje como lo haría un usuario y mirá qué skills cargaría/sugeriría el inspector — sin llamar al modelo. Fuerza el inspector activo aunque esté apagado arriba."
171
+ title={t("settings_ui.test_title")}
172
+ description={t("settings_ui.test_desc")}
164
173
  >
165
174
  <div className="space-y-3">
166
175
  <div className="flex flex-wrap items-center gap-2">
167
176
  <Input
168
177
  value={probe}
169
- placeholder="ej: necesito crear un video promocional con voz en off"
178
+ placeholder={t("settings_ui.test_placeholder")}
170
179
  disabled={busy}
171
180
  onChange={(ev) => setProbe(ev.target.value)}
172
181
  onKeyDown={(ev) => { if (ev.key === "Enter") runProbe(); }}
173
182
  className="max-w-xl flex-1"
174
183
  />
175
184
  <Button variant="primary" onClick={runProbe} loading={busy}>
176
- <Wand2 size={14} /> Probar
185
+ <Wand2 size={14} /> {t("settings_ui.test_btn")}
177
186
  </Button>
178
187
  </div>
179
188
 
@@ -182,7 +191,7 @@ export function SkillsInspectorPanel() {
182
191
  <div className="mb-2 flex flex-wrap items-center gap-2">
183
192
  <Sparkles size={14} className="text-muted-foreground" />
184
193
  <span className="text-muted-foreground">{probeResult.embedder || "—"}</span>
185
- {probeResult.jit ? <Badge tone="warning">JIT (índice vacío)</Badge> : null}
194
+ {probeResult.jit ? <Badge tone="warning">{t("settings_ui.jit_empty_index")}</Badge> : null}
186
195
  {probeResult.reason && !probeResult.loaded?.length && !probeResult.hinted?.length ? (
187
196
  <Badge tone="muted">{probeResult.reason}</Badge>
188
197
  ) : null}
@@ -190,7 +199,7 @@ export function SkillsInspectorPanel() {
190
199
 
191
200
  {probeResult.loaded?.length ? (
192
201
  <div className="mb-1">
193
- <span className="text-muted-foreground">Cargadas: </span>
202
+ <span className="text-muted-foreground">{t("settings_ui.loaded_label")} </span>
194
203
  {probeResult.loaded.map((s) => (
195
204
  <Badge key={s} tone="success" className="mr-1">{s}</Badge>
196
205
  ))}
@@ -199,7 +208,7 @@ export function SkillsInspectorPanel() {
199
208
 
200
209
  {probeResult.hinted?.length ? (
201
210
  <div className="mb-1">
202
- <span className="text-muted-foreground">Sugeridas: </span>
211
+ <span className="text-muted-foreground">{t("settings_ui.suggested_label")} </span>
203
212
  {probeResult.hinted.map((s) => (
204
213
  <Badge key={s} tone="info" className="mr-1">{s}</Badge>
205
214
  ))}
@@ -53,20 +53,20 @@ export function SuperAgentPanel() {
53
53
  };
54
54
 
55
55
  return (
56
- <Section title={t("settings.super_agent.title")} description="Comportamiento del super-agente. El modelo y la cadena de fallback se configuran en el Router de modelos.">
56
+ <Section title={t("settings.super_agent.title")} description={t("settings.super_agent.behavior_subtitle")}>
57
57
  <div className="space-y-4">
58
58
  <div className="flex items-center gap-3">
59
- <Switch checked={enabled} onChange={setEnabled} label="Super-agente habilitado" />
59
+ <Switch checked={enabled} onChange={setEnabled} label={t("settings.super_agent.enabled_label")} />
60
60
  </div>
61
61
 
62
62
  {/* Model lives in the Router now — single source of truth. */}
63
63
  <div className="flex items-center justify-between rounded-lg border border-border bg-muted/20 p-3">
64
64
  <div className="min-w-0">
65
- <div className="text-sm font-medium">Modelo activo (router)</div>
65
+ <div className="text-sm font-medium">{t("settings.super_agent.model_active")}</div>
66
66
  <div className="truncate font-mono text-xs text-muted-fg">{superAgent.model || "—"}</div>
67
67
  </div>
68
68
  <Button size="sm" variant="secondary" onClick={() => navigate("/p/0/models")}>
69
- <Cpu size={13} /> Configurar en Modelos
69
+ <Cpu size={13} /> {t("settings.super_agent.model_configure")}
70
70
  </Button>
71
71
  </div>
72
72
 
@@ -82,7 +82,7 @@ export function SuperAgentPanel() {
82
82
  className="font-mono text-xs"
83
83
  value={system}
84
84
  onChange={(e) => setSystem(e.target.value)}
85
- placeholder="(Vacío = se usa el prompt base de core/agent/prompts/super-agent-base.md)"
85
+ placeholder={t("settings.super_agent.system_ph")}
86
86
  />
87
87
  </Field>
88
88
 
@@ -49,7 +49,7 @@ export function TelegramChannelsPanel() {
49
49
  <ul className="space-y-2 text-sm">
50
50
  {channels.map((c) => {
51
51
  const ownerLabel = c.owner_user_id != null
52
- ? (nameByUserId.get(String(c.owner_user_id)) || `user_id ${c.owner_user_id}`)
52
+ ? (nameByUserId.get(String(c.owner_user_id)) || t("telegram_ui.user_id_fallback", { id: c.owner_user_id }))
53
53
  : t("telegram_channels.no_owner");
54
54
  return (
55
55
  <li key={c.name} className="rounded-md border border-border bg-muted/30 px-3 py-2">
@@ -67,8 +67,8 @@ export function TelegramChannelsPanel() {
67
67
  <div className="mt-1 grid grid-cols-2 gap-2 text-xs text-muted-fg">
68
68
  <span>chat_id: {c.chat_id || "—"}</span>
69
69
  <span>bot_token: {c.bot_token ? `…${secretSuffix(c.bot_token) ?? ""}` : "—"}</span>
70
- <span>route_to_agent: {c.route_to_agent || "default APX"}</span>
71
- <span>engine: {c.respond_with_engine ? "" : "no"}</span>
70
+ <span>route_to_agent: {c.route_to_agent || t("telegram_ui.default_apx")}</span>
71
+ <span>engine: {c.respond_with_engine ? t("telegram_ui.yes") : t("telegram_ui.no")}</span>
72
72
  <span className="col-span-2">{t("telegram_channels.owner_label")} {ownerLabel}</span>
73
73
  </div>
74
74
  </li>
@@ -28,7 +28,7 @@ export function TelegramContactsPanel({ bare = false }: Props) {
28
28
  const setRole = async (c: TelegramContact, role: string) => {
29
29
  try {
30
30
  await Telegram.contacts.patch(c.user_id, { role });
31
- toast.success(`${c.name || c.user_id} ${role}`);
31
+ toast.success(t("telegram_ui.role_assigned", { name: c.name || c.user_id, role }));
32
32
  mutate();
33
33
  } catch (e) { toast.error((e as Error).message); }
34
34
  };
@@ -76,14 +76,14 @@ export function TelegramGlobalPanel() {
76
76
  <Field
77
77
  label={t("settings.telegram_global.bot_token")}
78
78
  hint={channel?.bot_token
79
- ? `…${secretSuffix(channel.bot_token) ?? ""} (seteado — escribí para reemplazar)`
80
- : "Token del BotFather."}
79
+ ? `…${secretSuffix(channel.bot_token) ?? ""} ${t("telegram_ui.secret_set_replace")}`
80
+ : t("telegram_ui.bot_token_hint_short")}
81
81
  >
82
82
  <Input
83
83
  type="password"
84
84
  value={botToken}
85
85
  onChange={(e) => setBotToken(e.target.value)}
86
- placeholder={channel?.bot_token ? `…${secretSuffix(channel.bot_token) ?? ""} (ya seteado)` : ""}
86
+ placeholder={channel?.bot_token ? `…${secretSuffix(channel.bot_token) ?? ""} ${t("telegram_ui.secret_already_set")}` : ""}
87
87
  />
88
88
  </Field>
89
89
  <Field label={t("settings.telegram_global.chat_id")}>
@@ -71,7 +71,7 @@ export function TelegramRolesPanel() {
71
71
  <Button size="sm" variant="destructive" onClick={() => remove(n)}>{t("telegram_roles.delete_btn")}</Button>
72
72
  )}
73
73
  </div>
74
- <div className="mt-1 text-xs text-muted-fg">tools: {toolsLabel}</div>
74
+ <div className="mt-1 text-xs text-muted-fg">{t("telegram_contacts.tools_label")} {toolsLabel}</div>
75
75
  </li>
76
76
  );
77
77
  })}
@@ -55,7 +55,7 @@ export function ProviderCard({
55
55
  )}
56
56
  >
57
57
  <span className={cn("size-1.5 rounded-full", active ? "bg-emerald-400" : "bg-muted-fg/40")} />
58
- {active ? "Active" : "Off"}
58
+ {active ? t("providers_card.active") : t("providers_card.off")}
59
59
  </button>
60
60
  </Tip>
61
61
  <Tip content={t("providers_modal.delete")}>
@@ -72,14 +72,14 @@ export function ProviderCard({
72
72
 
73
73
  {/* Body */}
74
74
  <div className="mt-auto space-y-1 text-xs">
75
- <Row label="Modelo" value={provider.default_model || "—"} mono />
76
- {provider.base_url && <Row label="Base URL" value={provider.base_url} mono truncate />}
77
- <Row label="API key" value={hasKey ? (keySuffix ? `…${keySuffix}` : "✓ seteada") : "—"} mono={!!keySuffix} />
75
+ <Row label={t("providers_card.model")} value={provider.default_model || "—"} mono />
76
+ {provider.base_url && <Row label={t("providers_card.base_url")} value={provider.base_url} mono truncate />}
77
+ <Row label={t("providers_card.api_key")} value={hasKey ? (keySuffix ? `…${keySuffix}` : t("providers_card.key_set")) : "—"} mono={!!keySuffix} />
78
78
  {provider.default_temperature !== undefined && (
79
- <Row label="Temp" value={provider.default_temperature.toFixed(1)} />
79
+ <Row label={t("providers_card.temp")} value={provider.default_temperature.toFixed(1)} />
80
80
  )}
81
81
  {provider.pricing?.input_per_million !== undefined && (
82
- <Row label="$ in/out (1M)" value={`${provider.pricing.input_per_million ?? 0} / ${provider.pricing.output_per_million ?? 0}`} />
82
+ <Row label={t("providers_card.price_io")} value={`${provider.pricing.input_per_million ?? 0} / ${provider.pricing.output_per_million ?? 0}`} />
83
83
  )}
84
84
  </div>
85
85
  </div>