Skip to content

AI-native design editor. Open-source Figma alternative.

feat(settings): redesign Tool access, Skills, and MCP, and pick a provider in Add model (#1531)

Danila Poyarkovdb794df33c27
diff --git a/changes/1531/added.md b/changes/1531/added.md
new file mode 100644
index 000000000..55e756f73
--- /dev/null
+++ b/changes/1531/added.md
@@ -0,0 +1 @@
+- **Vectorize** can use QuiverAI's Arrow 2 model, beside Recraft and fal.ai, with your own QuiverAI API key.
diff --git a/changes/1531/changed.md b/changes/1531/changed.md
new file mode 100644
index 000000000..8a7142bff
--- /dev/null
+++ b/changes/1531/changed.md
@@ -0,0 +1,3 @@
+- Tool access and Skills in Settings list their items in a compact table you can search and filter to what is on or off, and the MCP page shows the server's status and address apart from its access settings.
+- Tool access sets the built-in AI's tools, and the local MCP server's tools are set from the MCP page.
+- **Add model** starts by choosing what the model runs on: a coding agent, a subscription, an API account, a local or company server, or OpenPencil Cloud; the ones a saved model already uses are marked **Set up**.
diff --git a/changes/1531/fixed.md b/changes/1531/fixed.md
new file mode 100644
index 000000000..c93c0070f
--- /dev/null
+++ b/changes/1531/fixed.md
@@ -0,0 +1 @@
+- Home in a narrow desktop window keeps mouse-sized controls and focuses its search; only touch screens get the larger touch controls.
diff --git a/packages/docs/programmable/ai-chat.md b/packages/docs/programmable/ai-chat.md
index f4a5dd173..cfff310e8 100644
--- a/packages/docs/programmable/ai-chat.md
+++ b/packages/docs/programmable/ai-chat.md
@@ -46,7 +46,7 @@ Open **Settings → Skills** to see where skills come from:
- **Next to this document** (desktop): `.agents/skills` and `.claude/skills` folders from the open document's folder up to its repository. They stay off until you choose **Trust folder**, because a skill gives the AI instructions it follows.
- **Shared agent skills** and **Claude Code skills** (desktop): `~/.agents/skills` and `~/.claude/skills`, where other coding agents install skills. Most of those are coding workflows, so these folders start off; the review step of the AI setup lists their skills for you to pick the ones that help with design.
-Uploads are on as soon as you add them, and any folder or skill can be switched on or off. Open a skill to switch it, read its instructions, see its files, or check warnings about how it departs from the specification. When two skills share a name, the first in that order is used.
+Uploads are on as soon as you add them, and any folder or skill can be switched on or off. The page lists them as Tool access lists tools: each source is a group with its own switch, and each skill has a switch beside it. Open a skill to read its instructions, see its files, or check warnings about how it departs from the specification. When two skills share a name, the first in that order is used.
To run a skill yourself, type `/` at the start of a message and pick it, which starts the message with `/skill:name`. Pi gets the enabled skills as its own. ACP agents such as Claude Code and Codex load their own skills.
diff --git a/packages/vue/src/editor/viewport-kind/use.ts b/packages/vue/src/editor/viewport-kind/use.ts
index 96d31b541..1b0d8dffe 100644
--- a/packages/vue/src/editor/viewport-kind/use.ts
+++ b/packages/vue/src/editor/viewport-kind/use.ts
@@ -1,17 +1,21 @@
-import { useBreakpoints } from '@vueuse/core'
+import { useBreakpoints, useMediaQuery } from '@vueuse/core'
import { computed } from 'vue'
const breakpoints = useBreakpoints({ mobile: 768 })
/**
- * Returns coarse viewport kind flags used by responsive editor UI.
+ * Returns coarse viewport kind flags used by responsive editor UI. `isMobile` is a narrow
+ * viewport, which changes the layout; `isTouch` is a finger for a pointer, which alone calls for
+ * touch-sized controls, so a narrow desktop window keeps mouse-sized ones.
*/
export function useViewportKind() {
const isMobile = breakpoints.smaller('mobile')
const isDesktop = computed(() => !isMobile.value)
+ const isTouch = useMediaQuery('(pointer: coarse)')
return {
isMobile,
- isDesktop
+ isDesktop,
+ isTouch
}
}
diff --git a/packages/vue/src/i18n/locales/de/ai.json b/packages/vue/src/i18n/locales/de/ai.json
index 72111bffd..57c646b07 100644
--- a/packages/vue/src/i18n/locales/de/ai.json
+++ b/packages/vue/src/i18n/locales/de/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Coding-Agenten auf diesem Computer",
"aiSetupAccessAgentsDescription": "Nutze dein bestehendes Abo. Der Agent wählt sein Modell selbst.",
"aiSetupAccessAgentsDesktop": "Coding-Agenten sind in der Desktop-App von OpenPencil verfügbar.",
+ "modelProviderSetUp": "Eingerichtet",
"aiSetupAccessAPI": "API-Konten",
"aiSetupAccessServer": "Lokales Modell oder Firmenserver",
"aiSetupAccessServerDescription": "Jeder Server, der die OpenAI-API spricht, etwa Ollama oder LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Skills",
"chatReferenceCommands": "Befehle",
"openSkillSettings": "Skill „{name}“ öffnen",
+ "skillsDescription": "Anweisungen, die der KI-Chat lädt, wenn eine Anfrage zu ihrer Beschreibung passt. Lade ein ZIP eines Skill-Ordners oder eine SKILL.md hoch oder nutze die Skills deiner Coding-Agenten.",
+ "skillsEnabledCount": "{enabled} von {total} aktiv",
+ "searchSkills": "Skills durchsuchen",
+ "noMatchingSkills": "Keine Skills entsprechen deiner Suche.",
"skillsUpload": "Skill hochladen",
"skillsUploadedSource": "Hochgeladen",
- "skillsUploadedSourceDescription": "Skills, die der KI-Chat lädt, wenn eine Anfrage zu ihrer Beschreibung passt. Lade ein ZIP des Skill-Ordners oder eine SKILL.md hoch.",
"skillsProjectSource": "Neben diesem Dokument",
- "skillsProjectSourceDescription": "Gelesen aus {folder}. Skills hier sind aus, bis du dem Ordner vertraust.",
- "skillsProjectSourceTrusted": "Gelesen aus {folder}, dem du vertraust.",
"skillsTrustFolder": "Ordner vertrauen",
"skillsStopTrusting": "Nicht mehr vertrauen",
"skillsTrustTitle": "Diesem Ordner vertrauen?",
"skillsTrustDescription": "Skills in {folder} geben dem KI-Chat Anweisungen, die er befolgt. Vertraue einem Ordner nur, wenn du weißt, woher seine Skills stammen.",
"skillsFolderUntrusted": "Vertraue seinem Ordner, um diesen Skill zu verwenden.",
"skillsAgentsSource": "Gemeinsame Agenten-Skills",
- "skillsAgentsSourceDescription": "Gelesen aus {folder}, wo pi, Codex, Gemini CLI, Cursor und andere Agenten Skills installieren.",
"skillsClaudeSource": "Claude-Code-Skills",
- "skillsClaudeSourceDescription": "Gelesen aus {folder}.",
"skillsNoUploads": "Noch keine hochgeladenen Skills.",
"skillsNoneInFolder": "Keine Skills in diesem Ordner.",
"skillsProblems": "Einige Ordner konnten nicht als Skills gelesen werden",
@@ -388,7 +388,6 @@
"skillsFiles": "Dateien",
"skillsInstructions": "Anweisungen",
"skillsWarnings": "Dieser Skill weicht von der Agent-Skills-Spezifikation ab",
- "skillsUseSource": "Skills aus diesem Ordner verwenden",
"skillsUse": "Diesen Skill verwenden",
"skillsUseDescription": "Der KI-Chat führt ihn auf und lädt seine Anweisungen, wenn eine Anfrage passt.",
"skillsSourceOff": "Skills aus diesem Ordner sind ausgeschaltet.",
diff --git a/packages/vue/src/i18n/locales/de/automation.json b/packages/vue/src/i18n/locales/de/automation.json
index db1835d00..af74b6dfc 100644
--- a/packages/vue/src/i18n/locales/de/automation.json
+++ b/packages/vue/src/i18n/locales/de/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Designwerkzeuge für die integrierte KI und den lokalen MCP-Server getrennt konfigurieren.",
- "toolAccessTarget": "Werkzeugzugriff konfigurieren für",
- "builtInAI": "Integrierte KI",
- "localMCP": "Lokales MCP",
"restoreToolDefaults": "Standard wiederherstellen",
"aiToolAccessDescription": "Werkzeuge für direkte KI-Modellverbindungen auswählen. ACP- und Pi-Agenten verwenden stattdessen den MCP-Zugriff.",
"mcpToolAccessDescription": "Werkzeuge auswählen, die der lokale Server verbundenen Agenten und Clients anbietet.",
diff --git a/packages/vue/src/i18n/locales/de/media.json b/packages/vue/src/i18n/locales/de/media.json
index d7825071b..feb3449aa 100644
--- a/packages/vue/src/i18n/locales/de/media.json
+++ b/packages/vue/src/i18n/locales/de/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Bildvektorisierung",
- "vectorizationDescription": "Sendet Bildebenen an Recraft oder fal.ai und gibt bearbeitbare Vektoren zurück. Es können Anbietergebühren anfallen.",
+ "vectorizationDescription": "Sendet Bildebenen an Recraft, fal.ai oder QuiverAI und gibt bearbeitbare Vektoren zurück. Es können Anbietergebühren anfallen.",
"vectorizeProvider": "Vektorisierungsdienst",
"pexelsAPIKey": "Pexels-API-Schlüssel",
"unsplashAccessKey": "Unsplash-Zugriffsschlüssel",
diff --git a/packages/vue/src/i18n/locales/de/settings.json b/packages/vue/src/i18n/locales/de/settings.json
index 3c5da7622..ce14feaa1 100644
--- a/packages/vue/src/i18n/locales/de/settings.json
+++ b/packages/vue/src/i18n/locales/de/settings.json
@@ -37,6 +37,8 @@
"media": "Medien",
"mcp": "MCP",
"toolAccess": "Werkzeugzugriff",
+ "capabilityShow": "Anzeigen",
+ "capabilityShowAll": "Alle",
"skills": "Skills",
"storage": "Speicher",
"cloud": "Cloud",
diff --git a/packages/vue/src/i18n/locales/es/ai.json b/packages/vue/src/i18n/locales/es/ai.json
index dabfac462..39b3990a0 100644
--- a/packages/vue/src/i18n/locales/es/ai.json
+++ b/packages/vue/src/i18n/locales/es/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Agentes de programación en este equipo",
"aiSetupAccessAgentsDescription": "Usa tu suscripción actual. El agente elige su propio modelo.",
"aiSetupAccessAgentsDesktop": "Los agentes de programación están disponibles en la aplicación de escritorio de OpenPencil.",
+ "modelProviderSetUp": "Configurado",
"aiSetupAccessAPI": "Cuentas de API",
"aiSetupAccessServer": "Modelo local o servidor de la empresa",
"aiSetupAccessServerDescription": "Cualquier servidor compatible con la API de OpenAI, como Ollama o LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Habilidades",
"chatReferenceCommands": "Comandos",
"openSkillSettings": "Abrir la habilidad «{name}»",
+ "skillsDescription": "Instrucciones que el chat de IA carga cuando una solicitud coincide con su descripción. Sube un ZIP de la carpeta de una habilidad o un SKILL.md, o usa las habilidades que instalaron tus agentes de programación.",
+ "skillsEnabledCount": "{enabled} de {total} activadas",
+ "searchSkills": "Buscar habilidades",
+ "noMatchingSkills": "Ninguna habilidad coincide con tu búsqueda.",
"skillsUpload": "Subir habilidad",
"skillsUploadedSource": "Subidas",
- "skillsUploadedSourceDescription": "Habilidades que el chat de IA carga cuando una solicitud coincide con su descripción. Sube un ZIP de la carpeta de la habilidad o un SKILL.md.",
"skillsProjectSource": "Junto a este documento",
- "skillsProjectSourceDescription": "Se leen de {folder}. Las habilidades de aquí están desactivadas hasta que confíes en la carpeta.",
- "skillsProjectSourceTrusted": "Se leen de {folder}, en la que confías.",
"skillsTrustFolder": "Confiar en la carpeta",
"skillsStopTrusting": "Dejar de confiar",
"skillsTrustTitle": "¿Confiar en esta carpeta?",
"skillsTrustDescription": "Las habilidades de {folder} dan al chat de IA instrucciones que sigue. Confía en una carpeta solo si sabes de dónde vienen sus habilidades.",
"skillsFolderUntrusted": "Confía en su carpeta para usar esta habilidad.",
"skillsAgentsSource": "Habilidades compartidas de agentes",
- "skillsAgentsSourceDescription": "Se leen de {folder}, donde pi, Codex, Gemini CLI, Cursor y otros agentes instalan habilidades.",
"skillsClaudeSource": "Habilidades de Claude Code",
- "skillsClaudeSourceDescription": "Se leen de {folder}.",
"skillsNoUploads": "Aún no hay habilidades subidas.",
"skillsNoneInFolder": "No hay habilidades en esta carpeta.",
"skillsProblems": "Algunas carpetas no se pudieron leer como habilidades",
@@ -388,7 +388,6 @@
"skillsFiles": "Archivos",
"skillsInstructions": "Instrucciones",
"skillsWarnings": "Esta habilidad se aparta de la especificación Agent Skills",
- "skillsUseSource": "Usar las habilidades de esta carpeta",
"skillsUse": "Usar esta habilidad",
"skillsUseDescription": "El chat de IA la incluye en su lista y carga sus instrucciones cuando una solicitud coincide.",
"skillsSourceOff": "Las habilidades de esta carpeta están desactivadas.",
diff --git a/packages/vue/src/i18n/locales/es/automation.json b/packages/vue/src/i18n/locales/es/automation.json
index d7d810ace..3986cc064 100644
--- a/packages/vue/src/i18n/locales/es/automation.json
+++ b/packages/vue/src/i18n/locales/es/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Configura las herramientas de diseño por separado para la IA integrada y el servidor MCP local.",
- "toolAccessTarget": "Configurar el acceso a herramientas para",
- "builtInAI": "IA integrada",
- "localMCP": "MCP local",
"restoreToolDefaults": "Restaurar valores predeterminados",
"aiToolAccessDescription": "Elige herramientas para conexiones directas a modelos de IA. Los agentes ACP y Pi utilizan el acceso MCP.",
"mcpToolAccessDescription": "Elige las herramientas que el servidor local ofrece a los agentes y clientes conectados.",
diff --git a/packages/vue/src/i18n/locales/es/media.json b/packages/vue/src/i18n/locales/es/media.json
index 1012fa4ce..64fd82b0b 100644
--- a/packages/vue/src/i18n/locales/es/media.json
+++ b/packages/vue/src/i18n/locales/es/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Vectorización de imágenes",
- "vectorizationDescription": "Envía capas de imagen a Recraft o fal.ai y devuelve vectores editables. Pueden aplicarse cargos del proveedor.",
+ "vectorizationDescription": "Envía capas de imagen a Recraft, fal.ai o QuiverAI y devuelve vectores editables. Pueden aplicarse cargos del proveedor.",
"vectorizeProvider": "Servicio de vectorización",
"pexelsAPIKey": "Clave API de Pexels (fotos stock)",
"unsplashAccessKey": "Clave de acceso de Unsplash",
diff --git a/packages/vue/src/i18n/locales/es/settings.json b/packages/vue/src/i18n/locales/es/settings.json
index 6f95bd2f0..60db90a03 100644
--- a/packages/vue/src/i18n/locales/es/settings.json
+++ b/packages/vue/src/i18n/locales/es/settings.json
@@ -37,6 +37,8 @@
"media": "Multimedia",
"mcp": "MCP",
"toolAccess": "Acceso a herramientas",
+ "capabilityShow": "Mostrar",
+ "capabilityShowAll": "Todos",
"skills": "Habilidades",
"storage": "Almacenamiento",
"cloud": "Nube",
diff --git a/packages/vue/src/i18n/locales/fr/ai.json b/packages/vue/src/i18n/locales/fr/ai.json
index 5d1401cd7..ff07fe7c7 100644
--- a/packages/vue/src/i18n/locales/fr/ai.json
+++ b/packages/vue/src/i18n/locales/fr/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Agents de code sur cet ordinateur",
"aiSetupAccessAgentsDescription": "Utilisez votre abonnement existant. L’agent choisit son propre modèle.",
"aiSetupAccessAgentsDesktop": "Les agents de code sont disponibles dans l’application de bureau OpenPencil.",
+ "modelProviderSetUp": "Configuré",
"aiSetupAccessAPI": "Comptes API",
"aiSetupAccessServer": "Modèle local ou serveur d’entreprise",
"aiSetupAccessServerDescription": "Tout serveur compatible avec l’API OpenAI, comme Ollama ou LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Compétences",
"chatReferenceCommands": "Commandes",
"openSkillSettings": "Ouvrir la compétence « {name} »",
+ "skillsDescription": "Des instructions que le chat IA charge quand une demande correspond à leur description. Importez un ZIP du dossier d’une compétence ou un SKILL.md, ou utilisez les compétences installées par vos agents de code.",
+ "skillsEnabledCount": "{enabled} sur {total} activées",
+ "searchSkills": "Rechercher des compétences",
+ "noMatchingSkills": "Aucune compétence ne correspond à votre recherche.",
"skillsUpload": "Importer une compétence",
"skillsUploadedSource": "Importées",
- "skillsUploadedSourceDescription": "Compétences que le chat IA charge quand une demande correspond à leur description. Importez un ZIP du dossier de la compétence ou un SKILL.md.",
"skillsProjectSource": "À côté de ce document",
- "skillsProjectSourceDescription": "Lues depuis {folder}. Les compétences ici sont désactivées tant que vous ne faites pas confiance au dossier.",
- "skillsProjectSourceTrusted": "Lues depuis {folder}, auquel vous faites confiance.",
"skillsTrustFolder": "Faire confiance au dossier",
"skillsStopTrusting": "Ne plus faire confiance",
"skillsTrustTitle": "Faire confiance à ce dossier ?",
"skillsTrustDescription": "Les compétences de {folder} donnent au chat IA des instructions qu’il suit. Ne faites confiance à un dossier que si vous savez d’où viennent ses compétences.",
"skillsFolderUntrusted": "Faites confiance à son dossier pour utiliser cette compétence.",
"skillsAgentsSource": "Compétences partagées des agents",
- "skillsAgentsSourceDescription": "Lues depuis {folder}, où pi, Codex, Gemini CLI, Cursor et d’autres agents installent leurs compétences.",
"skillsClaudeSource": "Compétences de Claude Code",
- "skillsClaudeSourceDescription": "Lues depuis {folder}.",
"skillsNoUploads": "Aucune compétence importée pour l’instant.",
"skillsNoneInFolder": "Aucune compétence dans ce dossier.",
"skillsProblems": "Certains dossiers n’ont pas pu être lus comme des compétences",
@@ -388,7 +388,6 @@
"skillsFiles": "Fichiers",
"skillsInstructions": "Instructions générales",
"skillsWarnings": "Cette compétence s’écarte de la spécification Agent Skills",
- "skillsUseSource": "Utiliser les compétences de ce dossier",
"skillsUse": "Utiliser cette compétence",
"skillsUseDescription": "Le chat IA la liste et charge ses instructions quand une demande correspond.",
"skillsSourceOff": "Les compétences de ce dossier sont désactivées.",
diff --git a/packages/vue/src/i18n/locales/fr/automation.json b/packages/vue/src/i18n/locales/fr/automation.json
index 9610fabea..bf0f6186c 100644
--- a/packages/vue/src/i18n/locales/fr/automation.json
+++ b/packages/vue/src/i18n/locales/fr/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Configurez séparément les outils de conception pour l’IA intégrée et le serveur MCP local.",
- "toolAccessTarget": "Configurer l’accès aux outils pour",
- "builtInAI": "IA intégrée",
- "localMCP": "MCP local",
"restoreToolDefaults": "Rétablir les valeurs par défaut",
"aiToolAccessDescription": "Choisissez les outils pour les connexions directes aux modèles d’IA. Les agents ACP et Pi utilisent l’accès MCP.",
"mcpToolAccessDescription": "Choisissez les outils que le serveur local propose aux agents et clients connectés.",
diff --git a/packages/vue/src/i18n/locales/fr/media.json b/packages/vue/src/i18n/locales/fr/media.json
index 97f9a3d8a..a4187779a 100644
--- a/packages/vue/src/i18n/locales/fr/media.json
+++ b/packages/vue/src/i18n/locales/fr/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Vectorisation d’image",
- "vectorizationDescription": "Envoie les calques d’image à Recraft ou fal.ai et renvoie des vecteurs modifiables. Des frais peuvent s’appliquer.",
+ "vectorizationDescription": "Envoie les calques d’image à Recraft, fal.ai ou QuiverAI et renvoie des vecteurs modifiables. Des frais peuvent s’appliquer.",
"vectorizeProvider": "Service de vectorisation",
"pexelsAPIKey": "Clé API Pexels",
"unsplashAccessKey": "Clé d’accès Unsplash",
diff --git a/packages/vue/src/i18n/locales/fr/settings.json b/packages/vue/src/i18n/locales/fr/settings.json
index b857286a1..d3e875829 100644
--- a/packages/vue/src/i18n/locales/fr/settings.json
+++ b/packages/vue/src/i18n/locales/fr/settings.json
@@ -37,6 +37,8 @@
"media": "Médias",
"mcp": "MCP",
"toolAccess": "Accès aux outils",
+ "capabilityShow": "Afficher",
+ "capabilityShowAll": "Tous",
"skills": "Compétences",
"storage": "Stockage",
"cloud": "Cloud",
diff --git a/packages/vue/src/i18n/locales/it/ai.json b/packages/vue/src/i18n/locales/it/ai.json
index f37e53ebc..467bbbf7f 100644
--- a/packages/vue/src/i18n/locales/it/ai.json
+++ b/packages/vue/src/i18n/locales/it/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Agenti di programmazione su questo computer",
"aiSetupAccessAgentsDescription": "Usa il tuo abbonamento attuale. L’agente sceglie il proprio modello.",
"aiSetupAccessAgentsDesktop": "Gli agenti di programmazione sono disponibili nell’app desktop di OpenPencil.",
+ "modelProviderSetUp": "Configurato",
"aiSetupAccessAPI": "Account API",
"aiSetupAccessServer": "Modello locale o server aziendale",
"aiSetupAccessServerDescription": "Qualsiasi server compatibile con l’API di OpenAI, come Ollama o LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Skill",
"chatReferenceCommands": "Comandi",
"openSkillSettings": "Apri la skill «{name}»",
+ "skillsDescription": "Istruzioni che la chat IA carica quando una richiesta corrisponde alla loro descrizione. Carica uno ZIP della cartella di una skill o un SKILL.md, oppure usa le skill installate dai tuoi agenti di programmazione.",
+ "skillsEnabledCount": "{enabled} di {total} attive",
+ "searchSkills": "Cerca skill",
+ "noMatchingSkills": "Nessuna skill corrisponde alla ricerca.",
"skillsUpload": "Carica competenza",
"skillsUploadedSource": "Caricate",
- "skillsUploadedSourceDescription": "Skill che la chat IA carica quando una richiesta corrisponde alla loro descrizione. Carica uno ZIP della cartella della skill o un SKILL.md.",
"skillsProjectSource": "Accanto a questo documento",
- "skillsProjectSourceDescription": "Lette da {folder}. Le skill qui sono disattivate finché non ti fidi della cartella.",
- "skillsProjectSourceTrusted": "Lette da {folder}, di cui ti fidi.",
"skillsTrustFolder": "Fidati della cartella",
"skillsStopTrusting": "Non fidarti più",
"skillsTrustTitle": "Fidarti di questa cartella?",
"skillsTrustDescription": "Le skill in {folder} danno alla chat IA istruzioni che segue. Fidati di una cartella solo se sai da dove vengono le sue skill.",
"skillsFolderUntrusted": "Fidati della sua cartella per usare questa skill.",
"skillsAgentsSource": "Competenze condivise degli agenti",
- "skillsAgentsSourceDescription": "Lette da {folder}, dove pi, Codex, Gemini CLI, Cursor e altri agenti installano le competenze.",
"skillsClaudeSource": "Competenze di Claude Code",
- "skillsClaudeSourceDescription": "Lette da {folder}.",
"skillsNoUploads": "Nessuna competenza caricata.",
"skillsNoneInFolder": "Nessuna competenza in questa cartella.",
"skillsProblems": "Alcune cartelle non sono state lette come competenze",
@@ -388,7 +388,6 @@
"skillsFiles": "File",
"skillsInstructions": "Istruzioni",
"skillsWarnings": "Questa competenza si discosta dalla specifica Agent Skills",
- "skillsUseSource": "Usa le skill di questa cartella",
"skillsUse": "Usa questa skill",
"skillsUseDescription": "La chat IA la elenca e ne carica le istruzioni quando una richiesta corrisponde.",
"skillsSourceOff": "Le skill di questa cartella sono disattivate.",
diff --git a/packages/vue/src/i18n/locales/it/automation.json b/packages/vue/src/i18n/locales/it/automation.json
index 7e1ba07d8..2e2873bf3 100644
--- a/packages/vue/src/i18n/locales/it/automation.json
+++ b/packages/vue/src/i18n/locales/it/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Configura separatamente gli strumenti di progettazione per l’IA integrata e il server MCP locale.",
- "toolAccessTarget": "Configura l’accesso agli strumenti per",
- "builtInAI": "IA integrata",
- "localMCP": "MCP locale",
"restoreToolDefaults": "Ripristina valori predefiniti",
"aiToolAccessDescription": "Scegli gli strumenti per le connessioni dirette ai modelli IA. Gli agenti ACP e Pi utilizzano invece l’accesso MCP.",
"mcpToolAccessDescription": "Scegli gli strumenti che il server locale offre agli agenti e ai client connessi.",
diff --git a/packages/vue/src/i18n/locales/it/media.json b/packages/vue/src/i18n/locales/it/media.json
index 569c7de5d..401972c70 100644
--- a/packages/vue/src/i18n/locales/it/media.json
+++ b/packages/vue/src/i18n/locales/it/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Vettorializzazione immagini",
- "vectorizationDescription": "Invia i livelli immagine a Recraft o fal.ai e restituisce vettori modificabili. Potrebbero essere applicati costi.",
+ "vectorizationDescription": "Invia i livelli immagine a Recraft, fal.ai o QuiverAI e restituisce vettori modificabili. Potrebbero essere applicati costi.",
"vectorizeProvider": "Servizio di vettorializzazione",
"pexelsAPIKey": "Chiave API Pexels",
"unsplashAccessKey": "Chiave di accesso Unsplash",
diff --git a/packages/vue/src/i18n/locales/it/settings.json b/packages/vue/src/i18n/locales/it/settings.json
index 006e4ecee..7ab227615 100644
--- a/packages/vue/src/i18n/locales/it/settings.json
+++ b/packages/vue/src/i18n/locales/it/settings.json
@@ -37,6 +37,8 @@
"media": "Media",
"mcp": "MCP",
"toolAccess": "Accesso agli strumenti",
+ "capabilityShow": "Mostra",
+ "capabilityShowAll": "Tutti",
"skills": "Skill",
"storage": "Archiviazione",
"cloud": "Cloud",
diff --git a/packages/vue/src/i18n/locales/ja/ai.json b/packages/vue/src/i18n/locales/ja/ai.json
index e0e762c88..e49df77c5 100644
--- a/packages/vue/src/i18n/locales/ja/ai.json
+++ b/packages/vue/src/i18n/locales/ja/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "このコンピューターのコーディングエージェント",
"aiSetupAccessAgentsDescription": "既存のサブスクリプションを使います。モデルはエージェントが選びます。",
"aiSetupAccessAgentsDesktop": "コーディングエージェントは OpenPencil デスクトップアプリで利用できます。",
+ "modelProviderSetUp": "設定済み",
"aiSetupAccessAPI": "API アカウント",
"aiSetupAccessServer": "ローカルモデルまたは社内サーバー",
"aiSetupAccessServerDescription": "Ollama や LM Studio など、OpenAI API 互換のサーバー。",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "スキル",
"chatReferenceCommands": "コマンド",
"openSkillSettings": "スキル「{name}」を開く",
+ "skillsDescription": "リクエストが説明に合うときに AI チャットが読み込む指示です。スキルのフォルダーの ZIP か SKILL.md をアップロードするか、コーディングエージェントがインストールしたスキルを使えます。",
+ "skillsEnabledCount": "{total} 件中 {enabled} 件が有効",
+ "searchSkills": "スキルを検索",
+ "noMatchingSkills": "検索に一致するスキルはありません。",
"skillsUpload": "スキルをアップロード",
"skillsUploadedSource": "アップロード済み",
- "skillsUploadedSourceDescription": "リクエストが説明に合うときに AI チャットが読み込むスキルです。スキルのフォルダーの ZIP か SKILL.md をアップロードしてください。",
"skillsProjectSource": "このドキュメントの近く",
- "skillsProjectSourceDescription": "{folder} から読み込みます。フォルダーを信頼するまで、ここのスキルはオフです。",
- "skillsProjectSourceTrusted": "信頼済みの {folder} から読み込みます。",
"skillsTrustFolder": "フォルダーを信頼",
"skillsStopTrusting": "信頼をやめる",
"skillsTrustTitle": "このフォルダーを信頼しますか?",
"skillsTrustDescription": "{folder} のスキルは AI チャットが従う指示を与えます。スキルの出どころがわかるフォルダーだけを信頼してください。",
"skillsFolderUntrusted": "このスキルを使うには、そのフォルダーを信頼してください。",
"skillsAgentsSource": "共有エージェントスキル",
- "skillsAgentsSourceDescription": "pi、Codex、Gemini CLI、Cursor などのエージェントがスキルをインストールする {folder} から読み込みます。",
"skillsClaudeSource": "Claude Code のスキル",
- "skillsClaudeSourceDescription": "{folder} から読み込みます。",
"skillsNoUploads": "アップロードしたスキルはまだありません。",
"skillsNoneInFolder": "このフォルダーにスキルはありません。",
"skillsProblems": "スキルとして読み込めなかったフォルダーがあります",
@@ -388,7 +388,6 @@
"skillsFiles": "ファイル",
"skillsInstructions": "指示",
"skillsWarnings": "このスキルは Agent Skills の仕様に沿っていない部分があります",
- "skillsUseSource": "このフォルダーのスキルを使う",
"skillsUse": "このスキルを使う",
"skillsUseDescription": "AI チャットはこのスキルを一覧に載せ、リクエストが合うときに指示を読み込みます。",
"skillsSourceOff": "このフォルダーのスキルはオフになっています。",
diff --git a/packages/vue/src/i18n/locales/ja/automation.json b/packages/vue/src/i18n/locales/ja/automation.json
index 310d15459..8f7d922f3 100644
--- a/packages/vue/src/i18n/locales/ja/automation.json
+++ b/packages/vue/src/i18n/locales/ja/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "内蔵 AI とローカル MCP サーバーのデザインツールを個別に設定します。",
- "toolAccessTarget": "ツールアクセスの設定対象",
- "builtInAI": "内蔵 AI",
- "localMCP": "ローカル MCP",
"restoreToolDefaults": "既定値に戻す",
"aiToolAccessDescription": "AI モデルへの直接接続で使うツールを選択します。ACP と Pi エージェントは MCP アクセスを使用します。",
"mcpToolAccessDescription": "ローカルサーバーが接続中のエージェントやクライアントに公開するツールを選択します。",
diff --git a/packages/vue/src/i18n/locales/ja/media.json b/packages/vue/src/i18n/locales/ja/media.json
index 8b27892db..e67f7ad01 100644
--- a/packages/vue/src/i18n/locales/ja/media.json
+++ b/packages/vue/src/i18n/locales/ja/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "画像のベクター化",
- "vectorizationDescription": "画像レイヤーを Recraft または fal.ai に送信し、編集可能なベクターを返します。プロバイダー料金が発生する場合があります。",
+ "vectorizationDescription": "画像レイヤーを Recraft、fal.ai、または QuiverAI に送信し、編集可能なベクターを返します。プロバイダー料金が発生する場合があります。",
"vectorizeProvider": "ベクター化サービス",
"pexelsAPIKey": "PexelsのAPIキー (ストックフォト)",
"unsplashAccessKey": "Unsplashのアクセスキー",
diff --git a/packages/vue/src/i18n/locales/ja/settings.json b/packages/vue/src/i18n/locales/ja/settings.json
index 46d71f588..58d27e923 100644
--- a/packages/vue/src/i18n/locales/ja/settings.json
+++ b/packages/vue/src/i18n/locales/ja/settings.json
@@ -37,6 +37,8 @@
"media": "メディア",
"mcp": "MCP",
"toolAccess": "ツールへのアクセス",
+ "capabilityShow": "表示",
+ "capabilityShowAll": "すべて",
"skills": "スキル",
"storage": "ストレージ",
"cloud": "クラウド",
diff --git a/packages/vue/src/i18n/locales/pl/ai.json b/packages/vue/src/i18n/locales/pl/ai.json
index f0d66f751..08e06f18f 100644
--- a/packages/vue/src/i18n/locales/pl/ai.json
+++ b/packages/vue/src/i18n/locales/pl/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Agenci programistyczni na tym komputerze",
"aiSetupAccessAgentsDescription": "Korzystaj z obecnej subskrypcji. Agent sam wybiera model.",
"aiSetupAccessAgentsDesktop": "Agenci programistyczni są dostępni w aplikacji OpenPencil na komputer.",
+ "modelProviderSetUp": "Skonfigurowano",
"aiSetupAccessAPI": "Konta API",
"aiSetupAccessServer": "Model lokalny lub serwer firmowy",
"aiSetupAccessServerDescription": "Dowolny serwer zgodny z API OpenAI, np. Ollama lub LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Umiejętności",
"chatReferenceCommands": "Polecenia",
"openSkillSettings": "Otwórz umiejętność „{name}”",
+ "skillsDescription": "Instrukcje, które czat AI wczytuje, gdy prośba pasuje do ich opisu. Prześlij ZIP folderu umiejętności lub plik SKILL.md albo użyj umiejętności zainstalowanych przez twoich agentów programistycznych.",
+ "skillsEnabledCount": "Włączone: {enabled} z {total}",
+ "searchSkills": "Szukaj umiejętności",
+ "noMatchingSkills": "Brak umiejętności pasujących do wyszukiwania.",
"skillsUpload": "Prześlij umiejętność",
"skillsUploadedSource": "Przesłane",
- "skillsUploadedSourceDescription": "Umiejętności, które czat AI wczytuje, gdy prośba pasuje do ich opisu. Prześlij ZIP folderu umiejętności lub plik SKILL.md.",
"skillsProjectSource": "Obok tego dokumentu",
- "skillsProjectSourceDescription": "Odczytywane z {folder}. Umiejętności stąd są wyłączone, dopóki nie zaufasz folderowi.",
- "skillsProjectSourceTrusted": "Odczytywane z {folder}, któremu ufasz.",
"skillsTrustFolder": "Zaufaj folderowi",
"skillsStopTrusting": "Przestań ufać",
"skillsTrustTitle": "Zaufać temu folderowi?",
"skillsTrustDescription": "Umiejętności z {folder} dają czatowi AI instrukcje, których przestrzega. Ufaj folderowi tylko wtedy, gdy wiesz, skąd pochodzą jego umiejętności.",
"skillsFolderUntrusted": "Zaufaj jej folderowi, aby używać tej umiejętności.",
"skillsAgentsSource": "Wspólne umiejętności agentów",
- "skillsAgentsSourceDescription": "Odczytywane z {folder}, gdzie pi, Codex, Gemini CLI, Cursor i inni agenci instalują umiejętności.",
"skillsClaudeSource": "Umiejętności Claude Code",
- "skillsClaudeSourceDescription": "Odczytywane z {folder}.",
"skillsNoUploads": "Brak przesłanych umiejętności.",
"skillsNoneInFolder": "Brak umiejętności w tym folderze.",
"skillsProblems": "Niektórych folderów nie udało się odczytać jako umiejętności",
@@ -388,7 +388,6 @@
"skillsFiles": "Pliki",
"skillsInstructions": "Instrukcje",
"skillsWarnings": "Ta umiejętność odbiega od specyfikacji Agent Skills",
- "skillsUseSource": "Używaj umiejętności z tego folderu",
"skillsUse": "Używaj tej umiejętności",
"skillsUseDescription": "Czat AI pokazuje ją na liście i wczytuje jej instrukcje, gdy prośba pasuje.",
"skillsSourceOff": "Umiejętności z tego folderu są wyłączone.",
diff --git a/packages/vue/src/i18n/locales/pl/automation.json b/packages/vue/src/i18n/locales/pl/automation.json
index e7d5f1fb4..59319943f 100644
--- a/packages/vue/src/i18n/locales/pl/automation.json
+++ b/packages/vue/src/i18n/locales/pl/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Skonfiguruj narzędzia projektowe osobno dla wbudowanej AI i lokalnego serwera MCP.",
- "toolAccessTarget": "Skonfiguruj dostęp do narzędzi dla",
- "builtInAI": "Wbudowana AI",
- "localMCP": "Lokalny MCP",
"restoreToolDefaults": "Przywróć domyślne",
"aiToolAccessDescription": "Wybierz narzędzia dla bezpośrednich połączeń z modelami AI. Agenci ACP i Pi korzystają z dostępu MCP.",
"mcpToolAccessDescription": "Wybierz narzędzia udostępniane przez lokalny serwer połączonym agentom i klientom.",
diff --git a/packages/vue/src/i18n/locales/pl/media.json b/packages/vue/src/i18n/locales/pl/media.json
index 3960a72f5..c23078dd1 100644
--- a/packages/vue/src/i18n/locales/pl/media.json
+++ b/packages/vue/src/i18n/locales/pl/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Wektoryzacja obrazów",
- "vectorizationDescription": "Wysyła warstwy obrazów do Recraft lub fal.ai i zwraca edytowalne wektory. Mogą obowiązywać opłaty dostawcy.",
+ "vectorizationDescription": "Wysyła warstwy obrazów do Recraft, fal.ai lub QuiverAI i zwraca edytowalne wektory. Mogą obowiązywać opłaty dostawcy.",
"vectorizeProvider": "Usługa wektoryzacji",
"pexelsAPIKey": "Klucz API Pexels",
"unsplashAccessKey": "Klucz dostępu Unsplash",
diff --git a/packages/vue/src/i18n/locales/pl/settings.json b/packages/vue/src/i18n/locales/pl/settings.json
index 9a902f531..f2aa51b32 100644
--- a/packages/vue/src/i18n/locales/pl/settings.json
+++ b/packages/vue/src/i18n/locales/pl/settings.json
@@ -37,6 +37,8 @@
"media": "Media",
"mcp": "MCP",
"toolAccess": "Dostęp do narzędzi",
+ "capabilityShow": "Pokaż",
+ "capabilityShowAll": "Wszystkie",
"skills": "Umiejętności",
"storage": "Przechowywanie",
"cloud": "Chmura",
diff --git a/packages/vue/src/i18n/locales/ru/ai.json b/packages/vue/src/i18n/locales/ru/ai.json
index 2ea110097..10c528bda 100644
--- a/packages/vue/src/i18n/locales/ru/ai.json
+++ b/packages/vue/src/i18n/locales/ru/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "Агенты для программирования на этом компьютере",
"aiSetupAccessAgentsDescription": "Используется ваша подписка. Модель выбирает сам агент.",
"aiSetupAccessAgentsDesktop": "Агенты для программирования доступны в настольном приложении OpenPencil.",
+ "modelProviderSetUp": "Настроено",
"aiSetupAccessAPI": "Аккаунты API",
"aiSetupAccessServer": "Локальная модель или сервер компании",
"aiSetupAccessServerDescription": "Любой сервер с API, совместимым с OpenAI, например Ollama или LM Studio.",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "Навыки",
"chatReferenceCommands": "Команды",
"openSkillSettings": "Открыть навык «{name}»",
+ "skillsDescription": "Инструкции, которые ИИ-чат загружает, когда запрос подходит под их описание. Загрузите ZIP папки навыка или SKILL.md либо используйте навыки, установленные вашими агентами для кода.",
+ "skillsEnabledCount": "Включено {enabled} из {total}",
+ "searchSkills": "Поиск навыков",
+ "noMatchingSkills": "По вашему запросу навыки не найдены.",
"skillsUpload": "Загрузить навык",
"skillsUploadedSource": "Загруженные",
- "skillsUploadedSourceDescription": "Навыки, которые ИИ-чат загружает, когда запрос подходит под их описание. Загрузите ZIP папки навыка или файл SKILL.md.",
"skillsProjectSource": "Рядом с этим документом",
- "skillsProjectSourceDescription": "Читаются из {folder}. Навыки отсюда выключены, пока вы не доверите папку.",
- "skillsProjectSourceTrusted": "Читаются из {folder}, которой вы доверяете.",
"skillsTrustFolder": "Доверять папке",
"skillsStopTrusting": "Перестать доверять",
"skillsTrustTitle": "Доверять этой папке?",
"skillsTrustDescription": "Навыки из {folder} дают ИИ-чату инструкции, которым он следует. Доверяйте папке, только если знаете, откуда в ней навыки.",
"skillsFolderUntrusted": "Доверьте его папку, чтобы использовать этот навык.",
"skillsAgentsSource": "Общие навыки агентов",
- "skillsAgentsSourceDescription": "Читаются из {folder}, куда pi, Codex, Gemini CLI, Cursor и другие агенты устанавливают навыки.",
"skillsClaudeSource": "Навыки Claude Code",
- "skillsClaudeSourceDescription": "Читаются из {folder}.",
"skillsNoUploads": "Загруженных навыков пока нет.",
"skillsNoneInFolder": "В этой папке нет навыков.",
"skillsProblems": "Некоторые папки не удалось прочитать как навыки",
@@ -388,7 +388,6 @@
"skillsFiles": "Файлы",
"skillsInstructions": "Инструкции",
"skillsWarnings": "Этот навык отступает от спецификации Agent Skills",
- "skillsUseSource": "Использовать навыки из этой папки",
"skillsUse": "Использовать этот навык",
"skillsUseDescription": "ИИ-чат показывает его в списке и загружает его инструкции, когда запрос подходит.",
"skillsSourceOff": "Навыки из этой папки выключены.",
diff --git a/packages/vue/src/i18n/locales/ru/automation.json b/packages/vue/src/i18n/locales/ru/automation.json
index e3de9727e..cadfcf021 100644
--- a/packages/vue/src/i18n/locales/ru/automation.json
+++ b/packages/vue/src/i18n/locales/ru/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "Настраивайте инструменты дизайна отдельно для встроенного ИИ и локального MCP-сервера.",
- "toolAccessTarget": "Настроить доступ к инструментам для",
- "builtInAI": "Встроенный ИИ",
- "localMCP": "Локальный MCP",
"restoreToolDefaults": "Восстановить настройки",
"aiToolAccessDescription": "Выберите инструменты для прямых подключений к моделям ИИ. Агенты ACP и Pi используют доступ через MCP.",
"mcpToolAccessDescription": "Выберите инструменты, которые локальный сервер предоставляет подключённым агентам и клиентам.",
diff --git a/packages/vue/src/i18n/locales/ru/media.json b/packages/vue/src/i18n/locales/ru/media.json
index 031b89379..834a894d1 100644
--- a/packages/vue/src/i18n/locales/ru/media.json
+++ b/packages/vue/src/i18n/locales/ru/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "Векторизация изображений",
- "vectorizationDescription": "Отправляет слои изображений в Recraft или fal.ai и возвращает редактируемые векторы. Может взиматься плата провайдера.",
+ "vectorizationDescription": "Отправляет слои изображений в Recraft, fal.ai или QuiverAI и возвращает редактируемые векторы. Может взиматься плата провайдера.",
"vectorizeProvider": "Сервис векторизации",
"pexelsAPIKey": "API-ключ Pexels",
"unsplashAccessKey": "Ключ доступа Unsplash",
diff --git a/packages/vue/src/i18n/locales/ru/settings.json b/packages/vue/src/i18n/locales/ru/settings.json
index 6a9108fff..9661a3bdb 100644
--- a/packages/vue/src/i18n/locales/ru/settings.json
+++ b/packages/vue/src/i18n/locales/ru/settings.json
@@ -37,6 +37,8 @@
"media": "Медиа",
"mcp": "MCP",
"toolAccess": "Доступ к инструментам",
+ "capabilityShow": "Показать",
+ "capabilityShowAll": "Все",
"skills": "Навыки",
"storage": "Хранилище",
"cloud": "Облако",
diff --git a/packages/vue/src/i18n/locales/zh-cn/ai.json b/packages/vue/src/i18n/locales/zh-cn/ai.json
index 3c75c499b..a6a9cae54 100644
--- a/packages/vue/src/i18n/locales/zh-cn/ai.json
+++ b/packages/vue/src/i18n/locales/zh-cn/ai.json
@@ -241,6 +241,7 @@
"aiSetupAccessAgents": "这台电脑上的编程智能体",
"aiSetupAccessAgentsDescription": "使用你现有的订阅,模型由智能体自行选择。",
"aiSetupAccessAgentsDesktop": "编程智能体可在 OpenPencil 桌面应用中使用。",
+ "modelProviderSetUp": "已设置",
"aiSetupAccessAPI": "API 账户",
"aiSetupAccessServer": "本地模型或公司服务器",
"aiSetupAccessServerDescription": "任何兼容 OpenAI API 的服务器,例如 Ollama 或 LM Studio。",
@@ -359,21 +360,20 @@
"chatReferenceSkills": "技能",
"chatReferenceCommands": "命令",
"openSkillSettings": "打开技能“{name}”",
+ "skillsDescription": "当请求与描述相符时,AI 聊天会加载这些说明。上传技能文件夹的 ZIP 或一个 SKILL.md,或使用编程智能体安装的技能。",
+ "skillsEnabledCount": "已启用 {enabled} / {total}",
+ "searchSkills": "搜索技能",
+ "noMatchingSkills": "没有与搜索匹配的技能。",
"skillsUpload": "上传技能",
"skillsUploadedSource": "已上传",
- "skillsUploadedSourceDescription": "当请求与描述相符时,AI 聊天会加载这些技能。上传技能文件夹的 ZIP 或一个 SKILL.md。",
"skillsProjectSource": "此文档旁边",
- "skillsProjectSourceDescription": "从 {folder} 读取。在你信任该文件夹之前,这里的技能处于关闭状态。",
- "skillsProjectSourceTrusted": "从你信任的 {folder} 读取。",
"skillsTrustFolder": "信任文件夹",
"skillsStopTrusting": "不再信任",
"skillsTrustTitle": "信任此文件夹?",
"skillsTrustDescription": "{folder} 中的技能会给 AI 聊天下达它会遵循的说明。只信任你清楚其技能来源的文件夹。",
"skillsFolderUntrusted": "信任它所在的文件夹后才能使用此技能。",
"skillsAgentsSource": "共享智能体技能",
- "skillsAgentsSourceDescription": "从 {folder} 读取,pi、Codex、Gemini CLI、Cursor 等智能体会把技能安装在这里。",
"skillsClaudeSource": "Claude Code 技能",
- "skillsClaudeSourceDescription": "从 {folder} 读取。",
"skillsNoUploads": "还没有上传的技能。",
"skillsNoneInFolder": "此文件夹中没有技能。",
"skillsProblems": "部分文件夹无法作为技能读取",
@@ -388,7 +388,6 @@
"skillsFiles": "文件",
"skillsInstructions": "指令",
"skillsWarnings": "此技能与 Agent Skills 规范存在出入",
- "skillsUseSource": "使用此文件夹中的技能",
"skillsUse": "使用此技能",
"skillsUseDescription": "AI 聊天会列出它,并在请求相符时加载它的说明。",
"skillsSourceOff": "此文件夹中的技能已关闭。",
diff --git a/packages/vue/src/i18n/locales/zh-cn/automation.json b/packages/vue/src/i18n/locales/zh-cn/automation.json
index c115fab58..6ada22945 100644
--- a/packages/vue/src/i18n/locales/zh-cn/automation.json
+++ b/packages/vue/src/i18n/locales/zh-cn/automation.json
@@ -1,8 +1,4 @@
{
- "toolAccessDescription": "分别配置内置 AI 和本地 MCP 服务器的设计工具。",
- "toolAccessTarget": "配置工具访问权限的对象",
- "builtInAI": "内置 AI",
- "localMCP": "本地 MCP",
"restoreToolDefaults": "恢复默认设置",
"aiToolAccessDescription": "选择直接连接 AI 模型时可用的工具。ACP 和 Pi 智能体使用 MCP 访问权限。",
"mcpToolAccessDescription": "选择本地服务器向已连接的智能体和客户端提供的工具。",
diff --git a/packages/vue/src/i18n/locales/zh-cn/media.json b/packages/vue/src/i18n/locales/zh-cn/media.json
index 199b74e66..bc339cbe1 100644
--- a/packages/vue/src/i18n/locales/zh-cn/media.json
+++ b/packages/vue/src/i18n/locales/zh-cn/media.json
@@ -1,6 +1,6 @@
{
"vectorization": "图像矢量化",
- "vectorizationDescription": "将图像图层发送到 Recraft 或 fal.ai,并返回可编辑的矢量。服务商可能收费。",
+ "vectorizationDescription": "将图像图层发送到 Recraft、fal.ai 或 QuiverAI,并返回可编辑的矢量。服务商可能收费。",
"vectorizeProvider": "矢量化服务",
"pexelsAPIKey": "Pexels API 密钥(图库照片)",
"unsplashAccessKey": "Unsplash 访问密钥",
diff --git a/packages/vue/src/i18n/locales/zh-cn/settings.json b/packages/vue/src/i18n/locales/zh-cn/settings.json
index a41be4a68..4283ff9be 100644
--- a/packages/vue/src/i18n/locales/zh-cn/settings.json
+++ b/packages/vue/src/i18n/locales/zh-cn/settings.json
@@ -37,6 +37,8 @@
"media": "媒体",
"mcp": "MCP",
"toolAccess": "工具访问权限",
+ "capabilityShow": "显示",
+ "capabilityShowAll": "全部",
"skills": "技能",
"storage": "存储",
"cloud": "云",
diff --git a/packages/vue/src/i18n/messages/ai.ts b/packages/vue/src/i18n/messages/ai.ts
index b51561ff6..c871ab86b 100644
--- a/packages/vue/src/i18n/messages/ai.ts
+++ b/packages/vue/src/i18n/messages/ai.ts
@@ -274,6 +274,7 @@ export const aiMessageDefaults = {
aiSetupAccessAgentsDescription:
'Use your existing subscription. The agent chooses its own model.',
aiSetupAccessAgentsDesktop: 'Coding agents are available in the OpenPencil desktop app.',
+ modelProviderSetUp: 'Set up',
aiSetupAccessAPI: 'API accounts',
aiSetupAccessServer: 'Local model or company server',
aiSetupAccessMore: 'More providers',
@@ -416,15 +417,14 @@ export const aiMessageDefaults = {
chatReferenceSkills: 'Skills',
chatReferenceCommands: 'Commands',
openSkillSettings: params('Open skill “{name}”'),
+ skillsDescription:
+ 'Instructions the AI chat loads when a request matches their description. Upload a ZIP of a skill’s folder or a SKILL.md, or use the skills your coding agents installed.',
+ skillsEnabledCount: params('{enabled} of {total} enabled'),
+ searchSkills: 'Search skills',
+ noMatchingSkills: 'No skills match your search.',
skillsUpload: 'Upload skill',
skillsUploadedSource: 'Uploaded',
- skillsUploadedSourceDescription:
- 'Skills the AI chat loads when a request matches their description. Upload a ZIP of a skill’s folder or a SKILL.md.',
skillsProjectSource: 'Next to this document',
- skillsProjectSourceDescription: params(
- 'Read from {folder}. Skills here are off until you trust the folder.'
- ),
- skillsProjectSourceTrusted: params('Read from {folder}, which you trust.'),
skillsTrustFolder: 'Trust folder',
skillsStopTrusting: 'Stop trusting',
skillsTrustTitle: 'Trust this folder?',
@@ -433,11 +433,7 @@ export const aiMessageDefaults = {
),
skillsFolderUntrusted: 'Trust its folder to use this skill.',
skillsAgentsSource: 'Shared agent skills',
- skillsAgentsSourceDescription: params(
- 'Read from {folder}, where pi, Codex, Gemini CLI, Cursor, and other agents install skills.'
- ),
skillsClaudeSource: 'Claude Code skills',
- skillsClaudeSourceDescription: params('Read from {folder}.'),
skillsNoUploads: 'No uploaded skills yet.',
skillsNoneInFolder: 'No skills in this folder.',
skillsProblems: 'Some folders could not be read as skills',
@@ -452,7 +448,6 @@ export const aiMessageDefaults = {
skillsFiles: 'Files',
skillsInstructions: 'Instructions',
skillsWarnings: 'This skill departs from the Agent Skills specification',
- skillsUseSource: 'Use skills from this folder',
skillsUse: 'Use this skill',
skillsUseDescription: 'The AI chat lists it and loads its instructions when a request matches.',
skillsSourceOff: 'Skills from this folder are turned off.',
diff --git a/packages/vue/src/i18n/messages/automation.ts b/packages/vue/src/i18n/messages/automation.ts
index c78cd038e..9a0bea8e0 100644
--- a/packages/vue/src/i18n/messages/automation.ts
+++ b/packages/vue/src/i18n/messages/automation.ts
@@ -3,11 +3,6 @@ import { params } from '@nanostores/i18n'
import { i18n } from '#vue/i18n/create'
export const automationMessageDefaults = {
- toolAccessDescription:
- 'Configure design tools independently for built-in AI and the local MCP server.',
- toolAccessTarget: 'Configure tool access for',
- builtInAI: 'Built-in AI',
- localMCP: 'Local MCP',
restoreToolDefaults: 'Restore defaults',
aiToolAccessDescription:
'Choose tools for direct AI model connections. ACP and Pi agents use MCP access instead.',
diff --git a/packages/vue/src/i18n/messages/media.ts b/packages/vue/src/i18n/messages/media.ts
index 510afddbe..ad4f632f6 100644
--- a/packages/vue/src/i18n/messages/media.ts
+++ b/packages/vue/src/i18n/messages/media.ts
@@ -3,7 +3,7 @@ import { i18n } from '#vue/i18n/create'
export const mediaMessageDefaults = {
vectorization: 'Image vectorization',
vectorizationDescription:
- 'Send image layers to Recraft or fal.ai and return editable vectors. Provider charges may apply.',
+ 'Send image layers to Recraft, fal.ai, or QuiverAI and return editable vectors. Provider charges may apply.',
vectorizeProvider: 'Vectorization service',
pexelsAPIKey: 'Pexels API Key (stock photos)',
unsplashAccessKey: 'Unsplash Access Key',
diff --git a/packages/vue/src/i18n/messages/settings.ts b/packages/vue/src/i18n/messages/settings.ts
index ec4998a8e..22c95ea8a 100644
--- a/packages/vue/src/i18n/messages/settings.ts
+++ b/packages/vue/src/i18n/messages/settings.ts
@@ -67,6 +67,8 @@ export const settingsMessageDefaults = {
media: 'Media',
mcp: 'MCP',
toolAccess: 'Tool access',
+ capabilityShow: 'Show',
+ capabilityShowAll: 'All',
skills: 'Skills',
edit: 'Edit',
configured: 'Configured',
diff --git a/src/app/automation/tool-access/settings/list.ts b/src/app/automation/tool-access/settings/list.ts
index 22f703f37..7f31abe5a 100644
--- a/src/app/automation/tool-access/settings/list.ts
+++ b/src/app/automation/tool-access/settings/list.ts
@@ -42,7 +42,8 @@ export function useToolAccess(tools: Readonly<Ref<ToolAccessEntry[]>>, disabled:
}),
state: computed<'mixed' | 'idle'>(() =>
count.value > 0 && count.value < members.value.length ? 'mixed' : 'idle'
- )
+ ),
+ counts: computed(() => ({ enabled: count.value, total: members.value.length }))
}
}
@@ -58,6 +59,7 @@ export function useToolAccess(tools: Readonly<Ref<ToolAccessEntry[]>>, disabled:
effect,
enabled: categories[effect].enabled.value,
state: categories[effect].state.value,
+ counts: categories[effect].counts.value,
tools: visibleTools.value.filter((tool) => tool.effect === effect)
}))
)
diff --git a/src/app/automation/tool-access/settings/use.ts b/src/app/automation/tool-access/settings/use.ts
index 59636ce0d..5f6ca222a 100644
--- a/src/app/automation/tool-access/settings/use.ts
+++ b/src/app/automation/tool-access/settings/use.ts
@@ -5,35 +5,48 @@ import { aiToolOverrides, disabledAITools } from '@/app/ai/tools/preferences'
import { configurableMCPTools, disabledMCPTools } from '@/app/automation/mcp/preferences'
import { openSettingsDialog } from '@/app/settings/dialog'
-import type { ToolAccessTarget } from '../types'
-
-const target = ref<ToolAccessTarget>('ai')
+import type { ToolAccessEntry, ToolAccessTarget } from '../types'
+
+/** Whether the MCP page shows its tool list, which it opens over itself. */
+export const mcpToolAccessOpen = ref(false)
+
+/**
+ * Opens the tools of one kind of agent where they are set: the built-in AI's on Tool access, the
+ * local MCP server's on the MCP page.
+ */
+export function openToolAccessSettings(target: ToolAccessTarget) {
+ mcpToolAccessOpen.value = target === 'mcp'
+ openSettingsDialog(target === 'ai' ? 'tools' : 'mcp')
+}
-export function openToolAccessSettings(value: ToolAccessTarget) {
- target.value = value
- openSettingsDialog('tools')
+function countOn(tools: ToolAccessEntry[], disabled: string[]) {
+ const off = new Set(disabled)
+ return { enabled: tools.filter((tool) => !off.has(tool.name)).length, total: tools.length }
}
-export function useToolAccessSettings() {
- const tools = computed(() =>
- target.value === 'ai' ? configurableAITools : configurableMCPTools.value
- )
+/** How many tools each kind of agent can call, for the MCP page's link to its list. */
+export const toolAccessCounts = computed<
+ Record<ToolAccessTarget, { enabled: number; total: number }>
+>(() => ({
+ ai: countOn(configurableAITools, disabledAITools.value),
+ mcp: countOn(configurableMCPTools.value, disabledMCPTools.value)
+}))
+
+/** The tools one kind of agent can call, and its own disabled list. */
+export function useToolAccessSettings(target: ToolAccessTarget) {
+ const tools = computed(() => (target === 'ai' ? configurableAITools : configurableMCPTools.value))
const disabled = computed({
- get: () => (target.value === 'ai' ? disabledAITools.value : disabledMCPTools.value),
+ get: () => (target === 'ai' ? disabledAITools.value : disabledMCPTools.value),
set: (names: string[]) => {
- if (target.value === 'ai') disabledAITools.value = names
+ if (target === 'ai') disabledAITools.value = names
else disabledMCPTools.value = names
}
})
- function selectTarget(value: string) {
- if (value === 'ai' || value === 'mcp') target.value = value
- }
-
function reset() {
- if (target.value === 'ai') aiToolOverrides.value = {}
+ if (target === 'ai') aiToolOverrides.value = {}
else disabledMCPTools.value = []
}
- return { target, tools, disabled, selectTarget, reset }
+ return { tools, disabled, reset }
}
diff --git a/src/app/automation/tool-access/types.ts b/src/app/automation/tool-access/types.ts
index debc7169b..56b93acd0 100644
--- a/src/app/automation/tool-access/types.ts
+++ b/src/app/automation/tool-access/types.ts
@@ -4,12 +4,3 @@ import type { ToolDescriptor } from '@open-pencil/mcp/tools'
export type ToolAccessEntry = Pick<ToolDescriptor, 'name' | 'description' | 'effect'>
export type ToolAccessTarget = 'ai' | 'mcp'
-
-/** One catalog group as presented to the settings UI, including its translated label. */
-export type ToolAccessGroup = {
- effect: ToolAccessEntry['effect']
- label: string
- enabled: boolean
- state: 'mixed' | 'idle'
- tools: ToolAccessEntry[]
-}
diff --git a/src/app/editor/vectorize/credentials.ts b/src/app/editor/vectorize/credentials.ts
index b9f1ce56e..1d67331ef 100644
--- a/src/app/editor/vectorize/credentials.ts
+++ b/src/app/editor/vectorize/credentials.ts
@@ -10,7 +10,8 @@ export function vectorizeCredentialRef(providerID: VectorizeProviderID): Credent
export const VECTORIZE_CREDENTIAL_REFS = [
vectorizeCredentialRef('recraft'),
- vectorizeCredentialRef('fal')
+ vectorizeCredentialRef('fal'),
+ vectorizeCredentialRef('quiver')
] as const
export function vectorizeCredentialStatus(
diff --git a/src/app/editor/vectorize/providers.ts b/src/app/editor/vectorize/providers.ts
index 6c7d78289..6456237a6 100644
--- a/src/app/editor/vectorize/providers.ts
+++ b/src/app/editor/vectorize/providers.ts
@@ -1,4 +1,5 @@
import { fromUint8Array } from 'js-base64'
+import * as v from 'valibot'
import { IS_TAURI } from '@open-pencil/core/constants'
@@ -14,6 +15,8 @@ import {
} from './types'
const REQUEST_TIMEOUT_MS = 30_000
+/** Arrow writes the SVG token by token, so a detailed image takes it minutes, not seconds. */
+const QUIVER_TIMEOUT_MS = 180_000
const NATIVE_TIMEOUT_GRACE_MS = 1000
const MAX_SVG_BYTES = 20 * 1024 * 1024
const MAX_API_RESPONSE_BYTES = 1024 * 1024
@@ -33,28 +36,60 @@ const FAL_DEFINITION = {
keyPlaceholder: 'fal API key'
} satisfies VectorizeProviderDefinition
+const QUIVER_DEFINITION = {
+ id: 'quiver',
+ name: 'QuiverAI',
+ keyURL: 'https://platform.quiver.ai/api-keys',
+ keyPlaceholder: 'QuiverAI API key'
+} satisfies VectorizeProviderDefinition
+
export const VECTORIZE_PROVIDER_DEFINITIONS: readonly VectorizeProviderDefinition[] = [
RECRAFT_DEFINITION,
- FAL_DEFINITION
+ FAL_DEFINITION,
+ QUIVER_DEFINITION
]
+/** An answer read in full: the body of a success, or the start of a failure's for its message. */
+interface VectorizeResponse {
+ ok: boolean
+ status: number
+ url: string
+ text: string
+}
+
+/** How much of a failure's body its message quotes. */
+const ERROR_DETAIL_BYTES = 4096
+const ERROR_DETAIL_CHARS = 500
+
+/**
+ * Sends a request and reads its answer under one deadline. A browser's fetch resolves on the
+ * headers, so a service that stalls in the body would otherwise hold the layer's vectorization
+ * open with no timeout left.
+ */
async function vectorizeFetch(
input: string,
- init?: RequestInit,
- maxResponseBytes = MAX_API_RESPONSE_BYTES
-): Promise<Response> {
+ init: RequestInit,
+ {
+ maxResponseBytes = MAX_API_RESPONSE_BYTES,
+ timeoutMs = REQUEST_TIMEOUT_MS,
+ sizeError = 'Vectorization response is too large'
+ }: { maxResponseBytes?: number; timeoutMs?: number; sizeError?: string } = {}
+): Promise<VectorizeResponse> {
const controller = new AbortController()
- const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS)
+ const timeout = setTimeout(() => controller.abort(), timeoutMs)
try {
const requestInit = { ...init, signal: controller.signal }
- return await (IS_TAURI
- ? tauriFetch(
- input,
- requestInit,
- maxResponseBytes,
- REQUEST_TIMEOUT_MS + NATIVE_TIMEOUT_GRACE_MS
- )
+ const response = await (IS_TAURI
+ ? tauriFetch(input, requestInit, maxResponseBytes, timeoutMs + NATIVE_TIMEOUT_GRACE_MS)
: fetch(input, requestInit))
+ const text = response.ok
+ ? await readBoundedResponse(response, maxResponseBytes, sizeError)
+ : await readBoundedResponse(response, ERROR_DETAIL_BYTES, sizeError).then(
+ (detail) => detail.trim().slice(0, ERROR_DETAIL_CHARS),
+ () => ''
+ )
+ if (controller.signal.aborted) throw new VectorizeTimeoutError()
+ return { ok: response.ok, status: response.status, url: response.url, text }
} catch (error) {
if (controller.signal.aborted) throw new VectorizeTimeoutError()
throw error
@@ -63,6 +98,14 @@ async function vectorizeFetch(
}
}
+function providerFailure(name: string, response: VectorizeResponse): Error {
+ return new Error(
+ response.text
+ ? `${name} vectorization failed (${response.status}): ${response.text}`
+ : `${name} vectorization failed (${response.status})`
+ )
+}
+
type VectorizeResponseRecord = {
image?: unknown
data?: unknown
@@ -99,8 +142,15 @@ export function extractVectorizedSVGURL(payload: unknown): string | null {
return readURLField(record)
}
+/** Where each service serves the SVGs it links to; Quiver returns its SVG inline. */
+const ASSET_HOSTS: Record<VectorizeProviderID, readonly string[]> = {
+ recraft: ['recraft.ai'],
+ fal: ['fal.media', 'fal.run', 'fal.ai'],
+ quiver: []
+}
+
function isAllowedAssetHost(providerID: VectorizeProviderID, hostname: string): boolean {
- const suffixes = providerID === 'recraft' ? ['recraft.ai'] : ['fal.media', 'fal.run', 'fal.ai']
+ const suffixes = ASSET_HOSTS[providerID]
return suffixes.some((suffix) => hostname === suffix || hostname.endsWith(`.${suffix}`))
}
@@ -123,29 +173,21 @@ async function readBoundedResponse(
async function fetchSVGFromURL(providerID: VectorizeProviderID, rawURL: string): Promise<string> {
const url = validateVectorizedAssetURL(providerID, rawURL)
- let response: Response
+ let response: VectorizeResponse
try {
response = await vectorizeFetch(
url.href,
{ credentials: 'omit', redirect: 'error' },
- MAX_SVG_BYTES
+ { maxResponseBytes: MAX_SVG_BYTES, sizeError: 'Vectorized SVG is too large' }
)
} catch (error) {
if (error instanceof VectorizeTimeoutError) throw error
+ if (error instanceof Error && error.message === 'Vectorized SVG is too large') throw error
throw new Error('Vectorized SVG could not be downloaded. Try again or use the desktop app.')
}
if (!response.ok) throw new Error(`Failed to download vectorized SVG (${response.status})`)
if (response.url) validateVectorizedAssetURL(providerID, response.url)
- return readBoundedResponse(response, MAX_SVG_BYTES, 'Vectorized SVG is too large')
-}
-
-async function responseErrorDetail(response: Response): Promise<string> {
- const detail = await readBoundedResponse(
- response,
- 4096,
- 'Provider error response is too large'
- ).catch(() => '')
- return detail.trim().slice(0, 500)
+ return response.text
}
const recraft: VectorizeProvider = {
@@ -159,33 +201,24 @@ const recraft: VectorizeProvider = {
) as ArrayBuffer
form.append('file', new Blob([payload], { type: 'image/png' }), 'image.png')
- const response = await vectorizeFetch('https://external.api.recraft.ai/v1/images/vectorize', {
- method: 'POST',
- headers: { Authorization: `Bearer ${apiKey}` },
- body: form,
- credentials: 'omit',
- redirect: 'error'
- })
+ const response = await vectorizeFetch(
+ 'https://external.api.recraft.ai/v1/images/vectorize',
+ {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${apiKey}` },
+ body: form,
+ credentials: 'omit',
+ redirect: 'error'
+ },
+ { sizeError: `${recraft.name} response is too large` }
+ )
if (!response.ok) {
if (response.status === 401 || response.status === 403) {
throw new VectorizeAuthError(recraft.name)
}
- const detail = await responseErrorDetail(response)
- throw new Error(
- detail
- ? `${recraft.name} vectorization failed (${response.status}): ${detail}`
- : `${recraft.name} vectorization failed (${response.status})`
- )
+ throw providerFailure(recraft.name, response)
}
- const url = extractVectorizedSVGURL(
- JSON.parse(
- await readBoundedResponse(
- response,
- MAX_API_RESPONSE_BYTES,
- `${recraft.name} response is too large`
- )
- )
- )
+ const url = extractVectorizedSVGURL(JSON.parse(response.text))
if (!url) throw new Error(`${recraft.name} returned no SVG URL`)
return fetchSVGFromURL(recraft.id, url)
}
@@ -195,42 +228,75 @@ const fal: VectorizeProvider = {
...FAL_DEFINITION,
async vectorize(pngBytes, apiKey) {
if (pngBytes.byteLength > MAX_IMAGE_BYTES) throw new Error('Image is too large to vectorize')
- const response = await vectorizeFetch('https://fal.run/fal-ai/recraft/vectorize', {
- method: 'POST',
- headers: {
- Authorization: `Key ${apiKey}`,
- 'Content-Type': 'application/json'
+ const response = await vectorizeFetch(
+ 'https://fal.run/fal-ai/recraft/vectorize',
+ {
+ method: 'POST',
+ headers: {
+ Authorization: `Key ${apiKey}`,
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify({ image_url: `data:image/png;base64,${fromUint8Array(pngBytes)}` }),
+ credentials: 'omit',
+ redirect: 'error'
},
- body: JSON.stringify({ image_url: `data:image/png;base64,${fromUint8Array(pngBytes)}` }),
- credentials: 'omit',
- redirect: 'error'
- })
+ { sizeError: `${fal.name} response is too large` }
+ )
if (!response.ok) {
if (response.status === 401 || response.status === 403) {
throw new VectorizeAuthError(fal.name)
}
- const detail = await responseErrorDetail(response)
- throw new Error(
- detail
- ? `${fal.name} vectorization failed (${response.status}): ${detail}`
- : `${fal.name} vectorization failed (${response.status})`
- )
+ throw providerFailure(fal.name, response)
}
- const url = extractVectorizedSVGURL(
- JSON.parse(
- await readBoundedResponse(
- response,
- MAX_API_RESPONSE_BYTES,
- `${fal.name} response is too large`
- )
- )
- )
+ const url = extractVectorizedSVGURL(JSON.parse(response.text))
if (!url) throw new Error(`${fal.name} returned no SVG URL`)
return fetchSVGFromURL(fal.id, url)
}
}
-const providers: Record<VectorizeProviderID, VectorizeProvider> = { recraft, fal }
+/** Quiver's Image to SVG answer, which carries the SVG markup itself rather than a link to it. */
+const quiverResponseSchema = v.object({
+ data: v.pipe(v.array(v.object({ svg: v.pipe(v.string(), v.minLength(1)) })), v.minLength(1))
+})
+
+const quiver: VectorizeProvider = {
+ ...QUIVER_DEFINITION,
+ async vectorize(pngBytes, apiKey) {
+ if (pngBytes.byteLength > MAX_IMAGE_BYTES) throw new Error('Image is too large to vectorize')
+ const response = await vectorizeFetch(
+ 'https://api.quiver.ai/v1/svgs/vectorizations',
+ {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ model: 'arrow-2',
+ image: { base64: fromUint8Array(pngBytes) },
+ stream: false
+ }),
+ credentials: 'omit',
+ redirect: 'error'
+ },
+ {
+ maxResponseBytes: MAX_SVG_BYTES,
+ timeoutMs: QUIVER_TIMEOUT_MS,
+ sizeError: `${quiver.name} response is too large`
+ }
+ )
+ if (!response.ok) {
+ // Quiver answers 403 for a frozen account or a refused request, never for the key.
+ if (response.status === 401) throw new VectorizeAuthError(quiver.name)
+ throw providerFailure(quiver.name, response)
+ }
+ const parsed = v.safeParse(
+ v.pipe(v.string(), v.parseJson(), quiverResponseSchema),
+ response.text
+ )
+ if (!parsed.success) throw new Error(`${quiver.name} returned no SVG`)
+ return parsed.output.data[0].svg
+ }
+}
+
+const providers: Record<VectorizeProviderID, VectorizeProvider> = { recraft, fal, quiver }
export function getVectorizeProvider(providerID: VectorizeProviderID): VectorizeProvider {
return providers[providerID]
diff --git a/src/app/editor/vectorize/types.ts b/src/app/editor/vectorize/types.ts
index 410681137..c7d4e9b84 100644
--- a/src/app/editor/vectorize/types.ts
+++ b/src/app/editor/vectorize/types.ts
@@ -1,4 +1,4 @@
-export const VECTORIZE_PROVIDER_IDS = ['recraft', 'fal'] as const
+export const VECTORIZE_PROVIDER_IDS = ['recraft', 'fal', 'quiver'] as const
export type VectorizeProviderID = (typeof VECTORIZE_PROVIDER_IDS)[number]
diff --git a/src/components/home/recent/RecentFilesSection.vue b/src/components/home/recent/RecentFilesSection.vue
index 5e909eda8..e17e6a44d 100644
--- a/src/components/home/recent/RecentFilesSection.vue
+++ b/src/components/home/recent/RecentFilesSection.vue
@@ -20,7 +20,7 @@ const { workspace, documents, query } = defineProps<{
const emit = defineEmits<{ open: [document: RecentDocument] }>()
const view = defineModel<'grid' | 'list'>('view', { required: true })
const { panels, files, common } = useI18n()
-const { isMobile } = useViewportKind()
+const { isTouch } = useViewportKind()
const dates = useDateFormat()
const previewURL = workspace.previewURL
const vWorkspacePreview = workspace.previewDirective
@@ -53,7 +53,7 @@ function formattedDate(updatedAt: string): string {
v-model="view"
required
:label="files.recentFiles"
- :size="isMobile ? 'touch' : 'md'"
+ :size="isTouch ? 'touch' : 'md'"
:options="[
{ value: 'grid', label: panels.gridView },
{ value: 'list', label: panels.listView }
diff --git a/src/components/home/search/HomeSearchActions.vue b/src/components/home/search/HomeSearchActions.vue
index dbbd50d5d..22cf89806 100644
--- a/src/components/home/search/HomeSearchActions.vue
+++ b/src/components/home/search/HomeSearchActions.vue
@@ -17,11 +17,12 @@ const { destination = null } = defineProps<{ destination?: string | null }>()
const emit = defineEmits<{ 'new-document': [] }>()
const query = defineModel<string>({ required: true })
const { menu, files } = useI18n()
-const { isMobile } = useViewportKind()
+const { isMobile, isTouch } = useViewportKind()
const searchInput = templateRef<{ focus: (options?: FocusOptions) => void }>('searchInput')
function focusSearch(onCleanup: (cleanup: () => void) => void): void {
- if (isMobile.value || activeTab.value?.kind !== 'home') return
+ // Focusing the field would raise a touch screen's keyboard over the page.
+ if (isTouch.value || activeTab.value?.kind !== 'home') return
const tabId = activeTab.value.id
const previousFocus = document.activeElement
if (previousFocus instanceof HTMLElement && previousFocus.closest('[role="tablist"]')) return
@@ -30,7 +31,7 @@ function focusSearch(onCleanup: (cleanup: () => void) => void): void {
cancelled = true
})
void nextTick(() => {
- if (cancelled || isMobile.value || activeTab.value?.id !== tabId) return
+ if (cancelled || isTouch.value || activeTab.value?.id !== tabId) return
if (document.activeElement !== previousFocus) return
searchInput.value?.focus({ preventScroll: true })
})
@@ -53,7 +54,7 @@ watch(
autocomplete="off"
class="md:flex-1"
size="md"
- :density="isMobile ? 'comfortable' : 'compact'"
+ :density="isTouch ? 'comfortable' : 'compact'"
:placeholder="isMobile ? files.searchFiles : files.searchRecentAndStorageFiles"
:aria-label="files.searchFiles"
>
@@ -61,10 +62,10 @@ watch(
</AppInput>
<div class="grid grid-cols-2 gap-2 md:contents">
<div class="col-span-2 grid md:contents">
- <HomeJoinRoom :size="isMobile ? 'lg' : 'md'" />
+ <HomeJoinRoom :size="isTouch ? 'lg' : 'md'" />
</div>
<AppButton
- :size="isMobile ? 'lg' : 'md'"
+ :size="isTouch ? 'lg' : 'md'"
variant="outline"
data-test-id="home-open-file"
@click="openFileDialog"
@@ -73,7 +74,7 @@ watch(
{{ menu.open }}
</AppButton>
<AppButton
- :size="isMobile ? 'lg' : 'md'"
+ :size="isTouch ? 'lg' : 'md'"
color="primary"
variant="solid"
data-test-id="home-new-document"
diff --git a/src/components/settings/SettingsDialog.vue b/src/components/settings/SettingsDialog.vue
index 5135f052b..ab0050276 100644
--- a/src/components/settings/SettingsDialog.vue
+++ b/src/components/settings/SettingsDialog.vue
@@ -212,7 +212,7 @@ function onOpenChange(open: boolean): void {
</section>
</AppTabsContent>
<AppTabsContent value="tools" as-child>
- <ToolAccessSettingsPanel />
+ <ToolAccessSettingsPanel target="ai" />
</AppTabsContent>
<AppTabsContent value="skills" as-child>
<SkillsSettingsPanel />
diff --git a/src/components/settings/capability/CapabilityList.stories.ts b/src/components/settings/capability/CapabilityList.stories.ts
new file mode 100644
index 000000000..cfec49321
--- /dev/null
+++ b/src/components/settings/capability/CapabilityList.stories.ts
@@ -0,0 +1,169 @@
+import type { Meta, StoryObj } from '@storybook/vue3-vite'
+import { expect, fn, userEvent, within } from 'storybook/test'
+import { computed, ref, watch } from 'vue'
+
+import CapabilityList from './CapabilityList.vue'
+import type { CapabilityGroup, CapabilityItem } from './types'
+
+function items(prefix: string, count: number, description: string): CapabilityItem[] {
+ return Array.from({ length: count }, (_, index) => ({
+ key: `${prefix}_${index + 1}`,
+ name: `${prefix}_${index + 1}`,
+ description,
+ enabled: true
+ }))
+}
+
+const reads = items(
+ 'inspect_component',
+ 60,
+ 'Inspect a component and its properties in the active document. Narrow the selection to inspect fewer layers.'
+)
+const writes = items('edit_component', 20, 'Change a property on one or more components.')
+
+type Args = {
+ disabled: string[]
+ collapsed: boolean
+ onOpen?: (group: string, item: string) => void
+}
+
+const meta = {
+ title: 'App/Settings/Capability List',
+ args: { disabled: [], collapsed: false },
+ render: (args) => ({
+ components: { CapabilityList },
+ setup: () => {
+ const disabled = ref<string[]>([])
+ const expanded = ref<Record<string, boolean>>({})
+ // Controls restart the list from their values; clicks change it until then.
+ watch(
+ () => [args.disabled, args.collapsed] as const,
+ ([initial, collapsed]) => {
+ disabled.value = [...initial]
+ expanded.value = { read: !collapsed, write: false }
+ },
+ { immediate: true }
+ )
+ const groups = computed<CapabilityGroup[]>(() =>
+ [
+ { key: 'read', label: 'Read-only', members: reads },
+ { key: 'write', label: 'Changes', members: writes }
+ ].map(({ key, label, members }) => {
+ const on = members.filter((item) => !disabled.value.includes(item.key)).length
+ return {
+ key,
+ label,
+ toggle: { enabled: on > 0, state: on > 0 && on < members.length ? 'mixed' : 'idle' },
+ items: members.map((item) => ({ ...item, enabled: !disabled.value.includes(item.key) }))
+ }
+ })
+ )
+ function setGroup(key: string, enabled: boolean) {
+ const keys = (key === 'read' ? reads : writes).map((item) => item.key)
+ disabled.value = enabled
+ ? disabled.value.filter((name) => !keys.includes(name))
+ : [...disabled.value, ...keys]
+ }
+ function setItem(_group: string, key: string, enabled: boolean) {
+ disabled.value = enabled
+ ? disabled.value.filter((name) => name !== key)
+ : [...disabled.value, key]
+ }
+ return { groups, expanded, setGroup, setItem }
+ },
+ template: `
+ <div class="max-w-lg bg-panel p-3 text-surface">
+ <CapabilityList
+ :groups="groups"
+ :expanded="expanded"
+ @update:expanded="(key, open) => (expanded = { ...expanded, [key]: open })"
+ @set-group="setGroup"
+ @set-item="setItem"
+ />
+ </div>`
+ })
+} satisfies Meta<Args>
+
+export default meta
+type Story = StoryObj<typeof meta>
+
+export const LongCatalog: Story = {}
+export const MixedAccess: Story = { args: { disabled: ['inspect_component_1'] } }
+export const CollapsedGroup: Story = { args: { collapsed: true } }
+export const ToggleAccess: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement)
+ await userEvent.click(canvas.getByRole('switch', { name: 'inspect_component_1' }))
+ await userEvent.click(canvas.getByRole('button', { name: 'Changes' }))
+ await expect(canvas.getByRole('switch', { name: 'edit_component_1' })).toBeVisible()
+ }
+}
+
+const skillGroups: CapabilityGroup[] = [
+ {
+ key: 'uploads',
+ label: 'Uploaded',
+ toggle: { enabled: true, state: 'idle' },
+ items: [],
+ empty: 'No uploaded skills yet.'
+ },
+ {
+ key: 'project',
+ label: 'Next to this document',
+ detail: '~/site/design/.agents/skills',
+ toggle: null,
+ items: [
+ {
+ key: 'grid',
+ name: 'grid',
+ description: 'Lay out pages on an eight-point grid.',
+ enabled: false,
+ locked: true,
+ note: 'Not trusted'
+ }
+ ]
+ },
+ {
+ key: 'agents',
+ label: 'Shared agent skills',
+ detail: '~/.agents/skills',
+ toggle: { enabled: true, state: 'idle' },
+ items: [
+ {
+ key: 'brand-review',
+ name: 'brand-review',
+ description: 'Check a layout against the brand guide.',
+ enabled: true,
+ note: 'Not used'
+ }
+ ]
+ }
+]
+
+/** Skills: a source without its own switch, an empty one, details to open, and notes. */
+export const Openable: Story = {
+ args: { onOpen: fn() },
+ render: (args) => ({
+ components: { CapabilityList },
+ setup: () => ({ args, groups: skillGroups, expanded: {} }),
+ template: `
+ <div class="max-w-lg bg-panel p-3 text-surface">
+ <CapabilityList
+ :groups="groups"
+ :expanded="expanded"
+ :open-label="(item) => 'Show ' + item.name"
+ @open="args.onOpen"
+ >
+ <template #group-actions="{ group }">
+ <button v-if="group.key === 'project'" type="button" class="text-xs">Trust folder</button>
+ </template>
+ </CapabilityList>
+ </div>`
+ }),
+ play: async ({ canvasElement, args }) => {
+ const canvas = within(canvasElement)
+ await userEvent.click(canvas.getByRole('button', { name: 'Show brand-review' }))
+ await expect(args.onOpen).toHaveBeenCalledWith('agents', 'brand-review')
+ await expect(canvas.getByRole('switch', { name: 'grid' })).toBeDisabled()
+ }
+}
diff --git a/src/components/settings/capability/CapabilityList.vue b/src/components/settings/capability/CapabilityList.vue
new file mode 100644
index 000000000..d58c4449c
--- /dev/null
+++ b/src/components/settings/capability/CapabilityList.vue
@@ -0,0 +1,145 @@
+<script setup lang="ts">
+import { CollapsibleContent, CollapsibleRoot, CollapsibleTrigger } from 'reka-ui'
+import { useId } from 'vue'
+
+import Tip from '@/components/ui/overlay/Tip.vue'
+import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'
+import { collapsibleContentMotion } from '@/theme/collapsible/collapsible'
+
+import type { CapabilityGroup, CapabilityItem } from './types'
+
+/**
+ * Groups of things the AI can use as one dense list, as Linear lists issues: a row per group with
+ * its switch, then a row per item with its switch, name, and description on one line. Given
+ * `openLabel`, a row opens the item's details; without it, a row works its switch.
+ */
+const { groups, expanded, openLabel } = defineProps<{
+ groups: CapabilityGroup[]
+ expanded: Record<string, boolean>
+ /** The accessible name of an item's details button: `name => "Show brand-review"`. */
+ openLabel?: (item: CapabilityItem) => string
+}>()
+
+const emit = defineEmits<{
+ 'update:expanded': [group: string, open: boolean]
+ 'set-group': [group: string, enabled: boolean]
+ 'set-item': [group: string, item: string, enabled: boolean]
+ open: [group: string, item: string]
+}>()
+
+defineSlots<{
+ /** Buttons at the end of a group's row, such as Trust folder. */
+ 'group-actions'?: (props: { group: CapabilityGroup }) => unknown
+}>()
+
+const baseId = useId()
+
+function isOpen(group: CapabilityGroup) {
+ return expanded[group.key] ?? true
+}
+</script>
+
+<template>
+ <div
+ class="@container/capabilities shrink-0 overflow-clip rounded border border-border text-xs"
+ data-slot="capability-list"
+ >
+ <template v-for="group in groups" :key="group.key">
+ <!-- Reka directly, as collapsibles with their own header shape do (theme/collapsible). -->
+ <CollapsibleRoot
+ v-if="group.items.length || group.empty"
+ as="section"
+ class="border-border not-first:border-t"
+ :data-group="group.key"
+ :aria-label="group.label"
+ :open="isOpen(group)"
+ @update:open="emit('update:expanded', group.key, $event)"
+ >
+ <!-- Pinned at the top edge of the scrolling page (CapabilityPage). -->
+ <div class="sticky top-0 z-10 flex min-h-8 items-center gap-3 bg-panel-secondary px-3 py-1">
+ <span class="flex w-7 shrink-0">
+ <AppSwitch
+ v-if="group.toggle"
+ :model-value="group.toggle.enabled"
+ :state="group.toggle.state"
+ :label="group.label"
+ @update:model-value="emit('set-group', group.key, $event)"
+ />
+ </span>
+ <CollapsibleTrigger
+ class="group flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
+ >
+ <icon-lucide-chevron-right
+ class="size-3 shrink-0 text-muted transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none"
+ aria-hidden="true"
+ />
+ <span class="shrink-0 font-semibold text-surface">{{ group.label }}</span>
+ <code v-if="group.detail" class="min-w-0 truncate text-[11px] text-muted">{{
+ group.detail
+ }}</code>
+ </CollapsibleTrigger>
+ <span v-if="group.count" class="shrink-0 text-[11px] text-muted">{{ group.count }}</span>
+ <slot name="group-actions" :group="group" />
+ </div>
+ <CollapsibleContent :class="collapsibleContentMotion">
+ <p
+ v-if="!group.items.length"
+ class="border-t border-border py-2 pr-3 pl-13 text-[11px] text-muted"
+ >
+ {{ group.empty }}
+ </p>
+ <ul v-else>
+ <li
+ v-for="(item, index) in group.items"
+ :key="item.key"
+ class="flex min-h-8 items-stretch border-t border-border transition-colors hover:bg-hover"
+ :data-item="item.name"
+ >
+ <span class="flex shrink-0 items-center py-1 pr-3 pl-3">
+ <AppSwitch
+ :id="`${baseId}-${group.key}-${index}`"
+ :model-value="item.enabled"
+ :label="item.name"
+ :disabled="item.locked"
+ @update:model-value="emit('set-item', group.key, item.key, $event)"
+ />
+ </span>
+ <!-- The rest of the row opens the item's details, or else works its switch. -->
+ <component
+ :is="openLabel ? 'button' : 'label'"
+ v-bind="
+ openLabel
+ ? { type: 'button', 'aria-label': openLabel(item) }
+ : { for: `${baseId}-${group.key}-${index}` }
+ "
+ class="flex min-w-0 flex-1 items-center gap-3 py-1 pr-3 text-left @max-md/capabilities:flex-wrap"
+ :class="item.locked && !openLabel ? 'cursor-default' : 'cursor-pointer'"
+ @click="openLabel && emit('open', group.key, item.key)"
+ >
+ <code
+ class="w-40 shrink-0 truncate font-medium text-surface @max-md/capabilities:flex-1"
+ >{{ item.name }}</code
+ >
+ <!-- One line each, so text cut off is a hover away. -->
+ <Tip :label="item.description" as-child truncated>
+ <span
+ class="min-w-0 flex-1 truncate text-muted @max-md/capabilities:order-last @max-md/capabilities:basis-full"
+ >{{ item.description }}</span
+ >
+ </Tip>
+ <span v-if="item.note" class="shrink-0 text-[11px] text-warning">{{
+ item.note
+ }}</span>
+ <icon-lucide-chevron-right
+ v-if="openLabel"
+ class="size-3.5 shrink-0 text-muted"
+ aria-hidden="true"
+ />
+ </component>
+ </li>
+ </ul>
+ </CollapsibleContent>
+ </CollapsibleRoot>
+ </template>
+ </div>
+</template>
diff --git a/src/components/settings/capability/CapabilityPage.vue b/src/components/settings/capability/CapabilityPage.vue
new file mode 100644
index 000000000..d10c6ad06
--- /dev/null
+++ b/src/components/settings/capability/CapabilityPage.vue
@@ -0,0 +1,66 @@
+<script setup lang="ts">
+import { computed } from 'vue'
+
+import { useCommonMessages, useSettingsMessages } from '@open-pencil/vue/i18n'
+
+import { AppDialogBody } from '@/components/ui/dialog'
+import AppInput from '@/components/ui/input/AppInput.vue'
+import AppSelect from '@/components/ui/select/AppSelect.vue'
+
+import type { CapabilityFilter } from './types'
+
+/**
+ * A capability list's page: what it is with its main action, then search and a filter by whether
+ * items are on, over the scrolling list. Tool access and Skills share it.
+ */
+const { searchLabel } = defineProps<{ searchLabel: string }>()
+const search = defineModel<string>('search', { required: true })
+const show = defineModel<CapabilityFilter>('show', { required: true })
+
+const common = useCommonMessages()
+const settings = useSettingsMessages()
+const showOptions = computed(() => [
+ { value: 'all' as const, label: settings.value.capabilityShowAll },
+ { value: 'enabled' as const, label: common.value.enabled },
+ { value: 'disabled' as const, label: common.value.disabled }
+])
+</script>
+
+<template>
+ <div class="@container/capability-page flex min-h-0 min-w-0 flex-1 flex-col">
+ <div
+ class="flex shrink-0 flex-col gap-3 border-b border-border px-5 pt-4 pb-3 sm:px-6"
+ data-slot="capability-toolbar"
+ >
+ <div class="flex items-start justify-between gap-4 @max-md/capability-page:flex-col">
+ <p class="max-w-prose text-xs leading-relaxed text-muted"><slot name="description" /></p>
+ <div v-if="$slots.actions" class="flex shrink-0 items-center gap-2">
+ <slot name="actions" />
+ </div>
+ </div>
+ <div class="flex flex-wrap items-center gap-2">
+ <AppInput
+ v-model="search"
+ type="search"
+ class="min-w-40 flex-1"
+ :placeholder="searchLabel"
+ :aria-label="searchLabel"
+ />
+ <AppSelect
+ v-model="show"
+ :options="showOptions"
+ :label="settings.capabilityShow"
+ size="sm"
+ :ui="{ trigger: 'w-auto' }"
+ />
+ <slot name="tools" />
+ </div>
+ </div>
+ <!-- Padded inside the scroll area, so the list's group rows stick to its very top. -->
+ <AppDialogBody :ui="{ body: 'p-0' }">
+ <div class="flex flex-col gap-3 p-5 sm:p-6">
+ <slot />
+ </div>
+ </AppDialogBody>
+ </div>
+</template>
diff --git a/src/components/settings/capability/filter.ts b/src/components/settings/capability/filter.ts
new file mode 100644
index 000000000..1cb4f1a1d
--- /dev/null
+++ b/src/components/settings/capability/filter.ts
@@ -0,0 +1,17 @@
+import type { CapabilityFilter, CapabilityGroup } from './types'
+
+/**
+ * Keeps the items the filter shows. A filtered group says nothing when none are left, so the list
+ * hides it rather than calling it empty.
+ */
+export function filterCapabilities(
+ groups: CapabilityGroup[],
+ show: CapabilityFilter
+): CapabilityGroup[] {
+ if (show === 'all') return groups
+ const enabled = show === 'enabled'
+ return groups.map(({ empty: _empty, ...group }) => ({
+ ...group,
+ items: group.items.filter((item) => item.enabled === enabled)
+ }))
+}
diff --git a/src/components/settings/capability/types.ts b/src/components/settings/capability/types.ts
new file mode 100644
index 000000000..12699cd71
--- /dev/null
+++ b/src/components/settings/capability/types.ts
@@ -0,0 +1,32 @@
+/**
+ * What the AI can use, as the capability lists in Settings show it: tools, skills. Each page maps
+ * its own records onto these and decides what switching a group or an item does.
+ */
+export interface CapabilityItem {
+ key: string
+ /** An identifier such as `get_selection` or `brand-review`, shown in code type. */
+ name: string
+ description: string
+ enabled: boolean
+ /** The switch cannot change now, such as a skill whose folder is off. */
+ locked?: boolean
+ /** Why it does not apply despite its switch, such as "Not used". */
+ note?: string
+}
+
+export interface CapabilityGroup {
+ key: string
+ label: string
+ /** Where the group comes from, such as a folder, shown under its name. */
+ detail?: string
+ /** How many of its items are on, such as "2 of 7 enabled". */
+ count?: string
+ /** The group's own switch, or none when something else turns it on, such as trusting it. */
+ toggle: { enabled: boolean; state: 'mixed' | 'idle' } | null
+ items: CapabilityItem[]
+ /** Shown in place of items when the group has none. */
+ empty?: string
+}
+
+/** Which items a capability page lists: all of them, or only those on or off. */
+export type CapabilityFilter = 'all' | 'enabled' | 'disabled'
diff --git a/src/components/settings/mcp/MCPSettingsPanel.vue b/src/components/settings/mcp/MCPSettingsPanel.vue
index 648782f82..94d45d097 100644
--- a/src/components/settings/mcp/MCPSettingsPanel.vue
+++ b/src/components/settings/mcp/MCPSettingsPanel.vue
@@ -18,7 +18,7 @@ import {
import { localMCPAvailable, mcpRuntime } from '@/app/automation/mcp/runtime'
import { useMCPSettings } from '@/app/automation/mcp/settings/use'
import { needsMCPInstall } from '@/app/automation/mcp/setup-prompt'
-import { openToolAccessSettings } from '@/app/automation/tool-access/settings/use'
+import { openToolAccessSettings, toolAccessCounts } from '@/app/automation/tool-access/settings/use'
import { isTauri } from '@/app/tauri/env'
import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'
import SettingsLink from '@/components/settings/layout/SettingsLink.vue'
@@ -96,25 +96,27 @@ const serverSetup = useMCPServerSetup(() =>
</template>
</AppAlert>
<template v-else>
- <SettingsGroup>
- <SettingsRow :label="automation.status">
- <AppStatus :tone="statusTone">{{ statusMessage }}</AppStatus>
- </SettingsRow>
- <SettingsRow :label="automation.address">
- <!-- Below the label on one line, so a long address truncates instead of overflowing. -->
- <template #description>
- <AppCopyField
- look="plain"
- :value="mcpRuntime.endpoint"
- :copy-label="common.copy"
- :copied-label="common.copied"
- :ui="{ root: 'mt-1', value: 'truncate' }"
- />
+ <SettingsGroup data-slot="mcp-server-status">
+ <SettingsRow>
+ <template #label>
+ <AppStatus :tone="statusTone">{{ statusMessage }}</AppStatus>
+ </template>
+ <template v-if="mcpRuntime.version" #description>
+ <span class="mt-1 block text-[11px] text-muted"
+ >{{ automation.version }} <code>{{ mcpRuntime.version }}</code></span
+ >
</template>
</SettingsRow>
- <SettingsRow v-if="mcpRuntime.version" :label="automation.version">
- <code class="text-xs text-surface">{{ mcpRuntime.version }}</code>
- </SettingsRow>
+ <div class="px-3 py-2.5">
+ <AppCopyField
+ :value="mcpRuntime.endpoint"
+ :copy-label="common.copy"
+ :copied-label="common.copied"
+ :ui="{ value: 'truncate' }"
+ />
+ </div>
+ </SettingsGroup>
+ <SettingsGroup>
<SettingsRow
:label="automation.authentication"
:description="automation.authenticationDescription"
@@ -137,12 +139,12 @@ const serverSetup = useMCPServerSetup(() =>
</SettingsRow>
<SettingsRow :label="automation.rootDirectory">
<template #description>
- <p class="mt-1 font-mono text-xs break-all text-surface">
- {{ mcpRootDirectory || automation.rootDirectoryDefault }}
- </p>
- <p class="mt-1 text-xs leading-relaxed text-muted">
- {{ automation.rootDirectoryDescription }}
- </p>
+ <code class="mt-1 block text-[11px] break-all text-surface">{{
+ mcpRootDirectory || automation.rootDirectoryDefault
+ }}</code>
+ <span class="mt-1 block text-[11px] leading-relaxed text-muted">{{
+ automation.rootDirectoryDescription
+ }}</span>
</template>
<div v-if="mcpRootDirectory || isTauri()" class="flex flex-wrap justify-end gap-2">
<AppButton
@@ -162,11 +164,9 @@ const serverSetup = useMCPServerSetup(() =>
>
</div>
</SettingsRow>
- </SettingsGroup>
- <SettingsGroup>
<SettingsRow
:label="settings.toolAccess"
- :description="automation.mcpToolAccessDescription"
+ :description="automation.toolsEnabled(toolAccessCounts.mcp)"
>
<AppButton
size="xs"
diff --git a/src/components/settings/mcp/MCPWorkspacePanel.vue b/src/components/settings/mcp/MCPWorkspacePanel.vue
index 31fb3f2a4..f70a5e30a 100644
--- a/src/components/settings/mcp/MCPWorkspacePanel.vue
+++ b/src/components/settings/mcp/MCPWorkspacePanel.vue
@@ -1,19 +1,48 @@
<script setup lang="ts">
+import { computed, onUnmounted } from 'vue'
+
+import { useSettingsMessages } from '@open-pencil/vue/i18n'
+
+import { mcpToolAccessOpen } from '@/app/automation/tool-access/settings/use'
import { webmcpMode } from '@/app/automation/webmcp/preferences'
import { webmcpRuntime } from '@/app/automation/webmcp/runtime'
+import { useSettingsFormGuard } from '@/app/settings/navigation/use'
import { isTauri } from '@/app/tauri/env'
+import ToolAccessSettingsPanel from '@/components/settings/tool-access/ToolAccessSettingsPanel.vue'
+import PanelDrillIn from '@/components/ui/panel/PanelDrillIn.vue'
import MCPConnectionsSection from './MCPConnectionsSection.vue'
import MCPSettingsPanel from './MCPSettingsPanel.vue'
import WebMCPSettingsPanel from './WebMCPSettingsPanel.vue'
+
+/** The MCP page, with the local server's tool list opening over it as Tool access does for the AI. */
+const settings = useSettingsMessages()
+
+useSettingsFormGuard(
+ {
+ dirty: computed(() => false),
+ busy: computed(() => false),
+ cancel: () => {
+ mcpToolAccessOpen.value = false
+ },
+ crumb: { parent: () => settings.value.mcp, title: () => settings.value.toolAccess }
+ },
+ mcpToolAccessOpen
+)
+onUnmounted(() => {
+ mcpToolAccessOpen.value = false
+})
</script>
<template>
- <div class="flex min-h-0 min-w-0 flex-1 flex-col" data-test-id="settings-mcp-panel">
- <MCPConnectionsSection>
- <MCPSettingsPanel />
- <!-- WebMCP serves agents built into a browser; the desktop webview has neither the API nor an agent. -->
- <WebMCPSettingsPanel v-if="!isTauri()" v-model="webmcpMode" :state="webmcpRuntime" />
- </MCPConnectionsSection>
- </div>
+ <PanelDrillIn :open="mcpToolAccessOpen">
+ <template #detail><ToolAccessSettingsPanel target="mcp" /></template>
+ <div class="flex min-h-0 min-w-0 flex-1 flex-col" data-test-id="settings-mcp-panel">
+ <MCPConnectionsSection>
+ <MCPSettingsPanel />
+ <!-- WebMCP serves agents built into a browser; the desktop webview has neither the API nor an agent. -->
+ <WebMCPSettingsPanel v-if="!isTauri()" v-model="webmcpMode" :state="webmcpRuntime" />
+ </MCPConnectionsSection>
+ </div>
+ </PanelDrillIn>
</template>
diff --git a/src/components/settings/models/ProfileEditor.vue b/src/components/settings/models/ProfileEditor.vue
index f2df85d49..622cc8489 100644
--- a/src/components/settings/models/ProfileEditor.vue
+++ b/src/components/settings/models/ProfileEditor.vue
@@ -1,5 +1,5 @@
<script setup lang="ts">
-import { computed, ref, useTemplateRef } from 'vue'
+import { computed, nextTick, ref, useTemplateRef } from 'vue'
import type { AIProviderID } from '@open-pencil/core/constants'
import { useI18n } from '@open-pencil/vue/i18n'
@@ -16,6 +16,7 @@ import SettingsPage from '@/components/settings/layout/SettingsPage.vue'
import SettingsSaveFeedback from '@/components/settings/layout/SettingsSaveFeedback.vue'
import SettingsSection from '@/components/settings/layout/SettingsSection.vue'
import ProfileCapabilities from '@/components/settings/models/ProfileCapabilities.vue'
+import ProviderChooser from '@/components/settings/models/ProviderChooser.vue'
import ProviderSelect from '@/components/settings/provider-select/ProviderSelect.vue'
import ChatGPTSignInField from '@/components/settings/provider/ChatGPTSignInField.vue'
import ProviderConnectionTestButton from '@/components/settings/provider/ProviderConnectionTestButton.vue'
@@ -31,7 +32,14 @@ const emit = defineEmits<{ done: []; deleted: [] }>()
const { ai, common, credentials, settings } = useI18n()
const formElement = useTemplateRef<HTMLFormElement>('formElement')
const nameInput = useTemplateRef('nameInput')
-defineExpose({ focus: () => nameInput.value?.focus({ preventScroll: true }) })
+/** A new model starts by choosing what it runs on; the form follows for that choice. */
+const choosing = ref(!profileId)
+defineExpose({
+ focus: () => {
+ if (!choosing.value) return nameInput.value?.focus({ preventScroll: true })
+ formElement.value?.querySelector<HTMLElement>('[data-provider]')?.focus({ preventScroll: true })
+ }
+})
const keyInput = ref('')
const deleteOpen = ref(false)
const profile = useModelProfileEditor({ profileId, keyInput, labels: ai })
@@ -99,6 +107,13 @@ function updateProvider(id: AIProviderID) {
profile.updateProvider(id)
}
+async function choose(id: AIProviderID) {
+ updateProvider(id)
+ choosing.value = false
+ await nextTick()
+ nameInput.value?.focus({ preventScroll: true })
+}
+
async function save() {
if (busy.value) return
if (!(await feedback.validate('save'))) {
@@ -132,7 +147,8 @@ async function remove() {
@submit.prevent="save"
>
<SettingsPage data-test-id="settings-model-editor">
- <fieldset :disabled="busy" class="flex min-w-0 flex-col gap-6">
+ <ProviderChooser v-if="choosing" @choose="choose" />
+ <fieldset v-else :disabled="busy" class="flex min-w-0 flex-col gap-6">
<ProviderSettingsField
v-slot="{ control }"
:label="ai.modelName"
@@ -355,7 +371,7 @@ async function remove() {
<AppButton class="ml-auto" :disabled="busy" @click="emit('done')">
{{ common.cancel }}
</AppButton>
- <AppButton type="submit" color="primary" variant="solid" :loading="busy">
+ <AppButton v-if="!choosing" type="submit" color="primary" variant="solid" :loading="busy">
{{ ai.saveModel }}
</AppButton>
</template>
diff --git a/src/components/settings/models/ProviderChooser.vue b/src/components/settings/models/ProviderChooser.vue
new file mode 100644
index 000000000..8e779b146
--- /dev/null
+++ b/src/components/settings/models/ProviderChooser.vue
@@ -0,0 +1,130 @@
+<script setup lang="ts">
+import { computed } from 'vue'
+
+import { IS_TAURI, type AIProviderID } from '@open-pencil/core/constants'
+import { useAIMessages } from '@open-pencil/vue/i18n'
+
+import { aiModelSettings, modelConnection } from '@/app/ai/models'
+import { modelProviderName } from '@/app/ai/models/provider-name'
+import {
+ ONBOARDING_AGENTS,
+ ONBOARDING_API_PROVIDERS,
+ ONBOARDING_MORE_API_PROVIDERS,
+ ONBOARDING_SERVER_PROVIDER,
+ ONBOARDING_SUBSCRIPTIONS
+} from '@/app/ai/models/settings/onboarding/plan'
+import { OPENPENCIL_AI_PROVIDER } from '@/app/ai/providers/openpencil/provider'
+import { cloudAIAvailable } from '@/app/cloud/integration'
+import SettingsLink from '@/components/settings/layout/SettingsLink.vue'
+import SettingsSection from '@/components/settings/layout/SettingsSection.vue'
+import ProviderLogo from '@/components/settings/provider/ProviderLogo.vue'
+import AppAlert from '@/components/ui/feedback/AppAlert.vue'
+import AppBadge from '@/components/ui/feedback/AppBadge.vue'
+import AppActionRow from '@/components/ui/list/AppActionRow.vue'
+import { DESKTOP_DOWNLOAD_URL } from '@/constants'
+
+/**
+ * What a new model runs on, chosen before its form, in guided setup's groups: coding agents and
+ * subscriptions on the desktop, API accounts, servers, and Cloud's models while it offers them.
+ */
+const emit = defineEmits<{ choose: [providerID: AIProviderID] }>()
+const ai = useAIMessages()
+
+/** Providers a model in the list already runs on; choosing one again adds another model. */
+const setUp = computed(
+ () =>
+ new Set(
+ aiModelSettings.value.models.flatMap(
+ (model) => modelConnection(model.connectionId)?.providerID ?? []
+ )
+ )
+)
+
+interface Choice {
+ id: AIProviderID
+ description?: string
+}
+
+const groups = computed(() => {
+ const groups: { key: string; title: string; description?: string; choices: Choice[] }[] = []
+ // Agents run, and subscriptions sign in, on this computer.
+ if (IS_TAURI) {
+ groups.push(
+ {
+ key: 'agents',
+ title: ai.value.aiSetupAccessAgents,
+ description: ai.value.aiSetupAccessAgentsDescription,
+ choices: ONBOARDING_AGENTS.map((id) => ({ id }))
+ },
+ {
+ key: 'subscriptions',
+ title: ai.value.aiSetupAccessSubscriptions,
+ choices: ONBOARDING_SUBSCRIPTIONS.map((id) => ({
+ id,
+ description: ai.value.aiSetupAccessChatGPT
+ }))
+ }
+ )
+ }
+ groups.push(
+ {
+ key: 'api',
+ title: ai.value.aiSetupAccessAPI,
+ choices: [...ONBOARDING_API_PROVIDERS, ...ONBOARDING_MORE_API_PROVIDERS].map((id) => ({ id }))
+ },
+ {
+ key: 'servers',
+ title: ai.value.aiSetupAccessServer,
+ choices: [
+ { id: ONBOARDING_SERVER_PROVIDER, description: ai.value.aiSetupAccessServerDescription },
+ { id: 'anthropic-compatible' }
+ ]
+ }
+ )
+ if (cloudAIAvailable.value) {
+ groups.push({
+ key: 'cloud',
+ title: modelProviderName(OPENPENCIL_AI_PROVIDER),
+ choices: [{ id: OPENPENCIL_AI_PROVIDER }]
+ })
+ }
+ return groups
+})
+</script>
+
+<template>
+ <div class="flex flex-col gap-6" data-test-id="settings-model-provider-chooser">
+ <!-- As guided setup says it: agents and subscriptions come with the desktop app. -->
+ <SettingsSection v-if="!IS_TAURI">
+ <template #title>{{ ai.aiSetupAccessAgents }}</template>
+ <AppAlert :heading="ai.aiSetupAccessAgentsDesktop">
+ <template #actions>
+ <SettingsLink :href="DESKTOP_DOWNLOAD_URL">{{ ai.aiSetupGetDesktop }}</SettingsLink>
+ </template>
+ </AppAlert>
+ </SettingsSection>
+ <SettingsSection v-for="group in groups" :key="group.key">
+ <template #title>{{ group.title }}</template>
+ <template v-if="group.description" #description>{{ group.description }}</template>
+ <div class="flex flex-col gap-1.5">
+ <AppActionRow
+ v-for="choice in group.choices"
+ :key="choice.id"
+ :data-provider="choice.id"
+ :data-set-up="setUp.has(choice.id) || undefined"
+ @click="emit('choose', choice.id)"
+ >
+ <template #leading><ProviderLogo :provider="choice.id" /></template>
+ {{ modelProviderName(choice.id) }}
+ <template v-if="choice.description" #description>{{ choice.description }}</template>
+ <template #trailing>
+ <AppBadge v-if="setUp.has(choice.id)" :ui="{ base: 'bg-hover text-surface' }">{{
+ ai.modelProviderSetUp
+ }}</AppBadge>
+ <icon-lucide-chevron-right class="size-3.5" />
+ </template>
+ </AppActionRow>
+ </div>
+ </SettingsSection>
+ </div>
+</template>
diff --git a/src/components/settings/skills/SkillList.stories.ts b/src/components/settings/skills/SkillList.stories.ts
deleted file mode 100644
index 44f3b5a8e..000000000
--- a/src/components/settings/skills/SkillList.stories.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/vue3-vite'
-import { expect, userEvent, within } from 'storybook/test'
-import { ref } from 'vue'
-
-import type { SkillListEntry } from '@/app/ai/skills/settings/use'
-import type { Skill } from '@/app/ai/skills/types'
-
-import SkillList from './SkillList.vue'
-
-function skill(name: string, description: string): Skill {
- return {
- name,
- description,
- instructions: '',
- modelInvocable: true,
- userInvocable: true,
- source: 'agents',
- location: `~/.agents/skills/${name}`,
- files: [],
- readFile: () => Promise.resolve(''),
- warnings: []
- }
-}
-
-const entries: SkillListEntry[] = [
- {
- skill: skill(
- 'brand-review',
- 'Check a layout against the brand guide: colors, type scale, spacing, and logo clear space. Use when reviewing or polishing marketing pages before they ship.'
- ),
- enabled: true,
- shadowed: false,
- untrusted: false
- },
- {
- skill: skill('grid', 'Lay out pages on an eight-point grid.'),
- enabled: true,
- shadowed: true,
- untrusted: false
- },
- {
- skill: skill('pr-review', 'Review GitHub pull requests.'),
- enabled: false,
- shadowed: false,
- untrusted: false
- }
-]
-
-const meta = {
- title: 'App/Settings/Skills/List',
- render: () => ({
- components: { SkillList },
- setup: () => ({ entries, opened: ref('') }),
- template: `
- <div class="max-w-lg bg-panel p-3 text-surface">
- <SkillList :entries="entries" @open="(skill) => (opened = skill.name)" />
- <p class="mt-3 text-xs text-muted" data-opened>{{ opened }}</p>
- </div>`
- })
-} satisfies Meta
-
-export default meta
-type Story = StoryObj<typeof meta>
-
-export const States: Story = {
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement)
- await expect(canvas.getByRole('button', { name: /^brand-review / })).toHaveTextContent(
- 'Enabled'
- )
- await expect(canvas.getByRole('button', { name: /^grid / })).toHaveTextContent('Not used')
- await expect(canvas.getByRole('button', { name: /^pr-review / })).toHaveTextContent('Disabled')
- await userEvent.click(canvas.getByRole('button', { name: /^grid / }))
- await expect(canvasElement.querySelector('[data-opened]')).toHaveTextContent('grid')
- }
-}
diff --git a/src/components/settings/skills/SkillList.vue b/src/components/settings/skills/SkillList.vue
deleted file mode 100644
index 0e0fbdd67..000000000
--- a/src/components/settings/skills/SkillList.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-<script setup lang="ts">
-import { useAIMessages, useCommonMessages } from '@open-pencil/vue/i18n'
-
-import type { SkillListEntry } from '@/app/ai/skills/settings/use'
-import type { Skill } from '@/app/ai/skills/types'
-import AppActionRow from '@/components/ui/list/AppActionRow.vue'
-
-const { entries } = defineProps<{ entries: SkillListEntry[] }>()
-
-const emit = defineEmits<{ open: [skill: Skill] }>()
-
-const ai = useAIMessages()
-const common = useCommonMessages()
-
-function status(entry: SkillListEntry): string {
- if (entry.untrusted) return ai.value.skillsNotTrusted
- if (entry.shadowed) return ai.value.skillsNotUsed
- return entry.enabled ? common.value.enabled : common.value.disabled
-}
-</script>
-
-<template>
- <div class="flex flex-col gap-1.5" data-slot="skill-list">
- <AppActionRow
- v-for="entry in entries"
- :key="entry.skill.name"
- :data-skill="entry.skill.name"
- @click="emit('open', entry.skill)"
- >
- <template #leading><icon-lucide-book-open class="size-3.5" /></template>
- {{ entry.skill.name }}
- <template #description>
- <span class="line-clamp-2">{{ entry.skill.description }}</span>
- </template>
- <template #trailing>
- <span class="text-xs">{{ status(entry) }}</span>
- <icon-lucide-chevron-right class="size-3.5" />
- </template>
- </AppActionRow>
- </div>
-</template>
diff --git a/src/components/settings/skills/SkillsSettingsPanel.vue b/src/components/settings/skills/SkillsSettingsPanel.vue
index e4ddc27b8..a1296f2df 100644
--- a/src/components/settings/skills/SkillsSettingsPanel.vue
+++ b/src/components/settings/skills/SkillsSettingsPanel.vue
@@ -3,31 +3,41 @@ import { useFileDialog } from '@vueuse/core'
import { AlertDialogAction, AlertDialogCancel } from 'reka-ui'
import { computed, ref } from 'vue'
+import { IS_TAURI } from '@open-pencil/core/constants'
import { useAIMessages, useCommonMessages, useSettingsMessages } from '@open-pencil/vue/i18n'
+import { skillPreferenceKey } from '@/app/ai/skills/preferences'
import { useSkillsSettings, type SkillSourceGroup } from '@/app/ai/skills/settings/use'
+import type { Skill, SkillSourceID } from '@/app/ai/skills/types'
import { useSettingsFormGuard } from '@/app/settings/navigation/use'
-import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'
-import SettingsPage from '@/components/settings/layout/SettingsPage.vue'
-import SettingsRow from '@/components/settings/layout/SettingsRow.vue'
-import SettingsSection from '@/components/settings/layout/SettingsSection.vue'
+import CapabilityList from '@/components/settings/capability/CapabilityList.vue'
+import CapabilityPage from '@/components/settings/capability/CapabilityPage.vue'
+import { filterCapabilities } from '@/components/settings/capability/filter'
+import type {
+ CapabilityFilter,
+ CapabilityGroup,
+ CapabilityItem
+} from '@/components/settings/capability/types'
import AppButton from '@/components/ui/button/AppButton.vue'
+import IconButton from '@/components/ui/button/IconButton.vue'
import { AppAlertDialogRoot, AppDialogFooter, AppDialogHeader } from '@/components/ui/dialog'
import AppAlert from '@/components/ui/feedback/AppAlert.vue'
import AppPlaceholder from '@/components/ui/feedback/AppPlaceholder.vue'
import PanelDrillIn from '@/components/ui/panel/PanelDrillIn.vue'
-import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'
import { useSkillMessages } from './messages'
import SkillDetails from './SkillDetails.vue'
-import SkillList from './SkillList.vue'
+/** Skills as Tool access lists tools: a group per source with its switch, a switch per skill. */
const ai = useAIMessages()
const common = useCommonMessages()
const settings = useSettingsMessages()
const messages = useSkillMessages()
const skills = useSkillsSettings()
const { groups, loading, uploading, uploadFailure, selected, detailOpen } = skills
+const search = ref('')
+const show = ref<CapabilityFilter>('all')
+const expanded = ref<Record<string, boolean>>({})
const deleteOpen = ref(false)
const trustOpen = ref(false)
/** The folder near the document the person is asked to trust; kept while the dialog closes. */
@@ -54,34 +64,96 @@ fileDialog.onChange((files) => {
if (file) void skills.upload(file)
})
-function sourceTitle(group: SkillSourceGroup): string {
- if (group.source === 'project') return ai.value.skillsProjectSource
- if (group.source === 'agents') return ai.value.skillsAgentsSource
- if (group.source === 'claude') return ai.value.skillsClaudeSource
- return ai.value.skillsUploadedSource
+const SOURCE_TITLES: Record<SkillSourceID, () => string> = {
+ openpencil: () => ai.value.skillsUploadedSource,
+ project: () => ai.value.skillsProjectSource,
+ agents: () => ai.value.skillsAgentsSource,
+ claude: () => ai.value.skillsClaudeSource
}
-function sourceDescription(group: SkillSourceGroup): string {
- const folder = group.folder ?? ''
- if (group.source === 'project') {
- return group.enabled
- ? ai.value.skillsProjectSourceTrusted({ folder })
- : ai.value.skillsProjectSourceDescription({ folder })
- }
- if (group.source === 'agents') return ai.value.skillsAgentsSourceDescription({ folder })
- if (group.source === 'claude') return ai.value.skillsClaudeSourceDescription({ folder })
- return ai.value.skillsUploadedSourceDescription
+function matches(skill: Skill, query: string): boolean {
+ return `${skill.name} ${skill.description}`.toLowerCase().includes(query)
+}
+
+const listGroups = computed<CapabilityGroup[]>(() => {
+ const query = search.value.trim().toLowerCase()
+ const all = groups.value.map((group): CapabilityGroup => ({
+ key: group.key,
+ label: SOURCE_TITLES[group.source](),
+ ...(group.folder && { detail: group.folder }),
+ ...(group.skills.length > 0 && {
+ count: ai.value.skillsEnabledCount({
+ enabled: group.skills.filter((entry) => entry.enabled).length,
+ total: group.skills.length
+ })
+ }),
+ // A folder next to the document is trusted rather than switched on.
+ toggle: group.trustPath ? null : { enabled: group.enabled, state: 'idle' },
+ items: group.skills
+ .filter((entry) => !query || matches(entry.skill, query))
+ .map((entry): CapabilityItem => ({
+ key: skillPreferenceKey(entry.skill),
+ name: entry.skill.name,
+ description: entry.skill.description,
+ enabled: entry.enabled,
+ locked: !group.enabled,
+ ...(entry.untrusted && { note: ai.value.skillsNotTrusted }),
+ ...(entry.shadowed && { note: ai.value.skillsNotUsed })
+ })),
+ ...(!query && { empty: group.folder ? ai.value.skillsNoneInFolder : ai.value.skillsNoUploads })
+ }))
+ return filterCapabilities(all, show.value)
+})
+
+// Without a search or filter, empty groups say why they are empty instead.
+const hasMatches = computed(
+ () =>
+ (!search.value.trim() && show.value === 'all') ||
+ listGroups.value.some((group) => group.items.length)
+)
+
+const hasProblems = computed(() => groups.value.some((group) => group.problems.length))
+
+function sourceGroup(key: string): SkillSourceGroup | undefined {
+ return groups.value.find((group) => group.key === key)
+}
+
+function find(groupKey: string, itemKey: string): Skill | undefined {
+ return sourceGroup(groupKey)?.skills.find(({ skill }) => skillPreferenceKey(skill) === itemKey)
+ ?.skill
+}
+
+function setGroup(groupKey: string, enabled: boolean) {
+ const group = sourceGroup(groupKey)
+ if (group && !group.trustPath) skills.setSourceEnabled(group.source, enabled)
+}
+
+function setItem(groupKey: string, itemKey: string, enabled: boolean) {
+ const skill = find(groupKey, itemKey)
+ if (skill) skills.setSkillEnabled(skill, enabled)
+}
+
+function open(groupKey: string, itemKey: string) {
+ const skill = find(groupKey, itemKey)
+ if (skill) skills.open(skill)
}
const trustDescription = computed(() =>
ai.value.skillsTrustDescription({ folder: trusting.value?.folder ?? '' })
)
-function askTrust(group: SkillSourceGroup) {
+function askTrust(groupKey: string) {
+ const group = sourceGroup(groupKey)
+ if (!group) return
trusting.value = group
trustOpen.value = true
}
+function stopTrusting(groupKey: string) {
+ const path = sourceGroup(groupKey)?.trustPath
+ if (path) skills.setFolderTrusted(path, false)
+}
+
function trust() {
if (trusting.value?.trustPath) skills.setFolderTrusted(trusting.value.trustPath, true)
trustOpen.value = false
@@ -114,59 +186,32 @@ async function remove() {
@set-enabled="skills.setSkillEnabled(selected.skill, $event)"
/>
</template>
- <SettingsPage>
- <div class="flex flex-col gap-6" :aria-busy="loading">
- <SettingsSection v-for="group in groups" :key="group.key" :data-skill-source="group.source">
- <template #title>{{ sourceTitle(group) }}</template>
- <template #description>{{ sourceDescription(group) }}</template>
- <template #actions>
- <AppButton
- v-if="group.source === 'openpencil'"
- variant="outline"
- :loading="uploading"
- @click="fileDialog.open()"
- >
- <template #leading><icon-lucide-upload class="size-3.5" /></template>
- {{ ai.skillsUpload }}
- </AppButton>
- <AppButton
- v-else-if="group.trustPath && group.enabled"
- variant="outline"
- @click="skills.setFolderTrusted(group.trustPath, false)"
- >
- {{ ai.skillsStopTrusting }}
- </AppButton>
- <AppButton v-else-if="group.trustPath" variant="outline" @click="askTrust(group)">
- <template #leading><icon-lucide-shield-check class="size-3.5" /></template>
- {{ ai.skillsTrustFolder }}
- </AppButton>
- <AppButton v-else variant="outline" :loading="loading" @click="skills.reload">
- <template #leading><icon-lucide-refresh-cw class="size-3.5" /></template>
- {{ common.refresh }}
- </AppButton>
- </template>
- <AppAlert
- v-if="group.source === 'openpencil' && uploadFailure"
- tone="error"
- :heading="ai.skillsUploadFailed"
- :description="messages.uploadFailure(uploadFailure)"
- />
- <SettingsGroup v-if="group.folder && !group.trustPath">
- <SettingsRow as="label" :label="ai.skillsUseSource">
- <AppSwitch
- :model-value="group.enabled"
- :label="ai.skillsUseSource"
- @update:model-value="skills.setSourceEnabled(group.source, $event)"
- />
- </SettingsRow>
- </SettingsGroup>
- <SkillList v-if="group.skills.length" :entries="group.skills" @open="skills.open" />
- <AppPlaceholder
- v-else
- size="compact"
- :fill="false"
- :label="group.folder ? ai.skillsNoneInFolder : ai.skillsNoUploads"
- />
+ <CapabilityPage
+ v-model:search="search"
+ v-model:show="show"
+ :search-label="ai.searchSkills"
+ :aria-busy="loading"
+ >
+ <template #description>{{ ai.skillsDescription }}</template>
+ <template #actions>
+ <AppButton color="primary" variant="solid" :loading="uploading" @click="fileDialog.open()">
+ <template #leading><icon-lucide-upload class="size-3.5" /></template>
+ {{ ai.skillsUpload }}
+ </AppButton>
+ </template>
+ <template v-if="IS_TAURI" #tools>
+ <IconButton :label="common.refresh" :disabled="loading" @click="skills.reload">
+ <icon-lucide-refresh-cw class="size-3.5" :class="loading && 'motion-safe:animate-spin'" />
+ </IconButton>
+ </template>
+ <div v-if="uploadFailure || hasProblems" class="flex flex-col gap-2">
+ <AppAlert
+ v-if="uploadFailure"
+ tone="error"
+ :heading="ai.skillsUploadFailed"
+ :description="messages.uploadFailure(uploadFailure)"
+ />
+ <template v-for="group in groups" :key="group.key">
<AppAlert v-if="group.problems.length" tone="warning" :heading="ai.skillsProblems">
<ul class="flex flex-col gap-0.5">
<li v-for="problem in group.problems" :key="problem.location">
@@ -175,9 +220,42 @@ async function remove() {
</li>
</ul>
</AppAlert>
- </SettingsSection>
+ </template>
</div>
- </SettingsPage>
+ <AppPlaceholder
+ v-if="!hasMatches"
+ size="compact"
+ :fill="false"
+ :label="ai.noMatchingSkills"
+ />
+ <CapabilityList
+ v-else
+ :groups="listGroups"
+ :expanded="expanded"
+ :open-label="(item) => ai.openSkillSettings({ name: item.name })"
+ @update:expanded="(key, isOpen) => (expanded = { ...expanded, [key]: isOpen })"
+ @set-group="setGroup"
+ @set-item="setItem"
+ @open="open"
+ >
+ <template #group-actions="{ group }">
+ <template v-if="sourceGroup(group.key)?.trustPath">
+ <AppButton
+ v-if="sourceGroup(group.key)?.enabled"
+ size="xs"
+ variant="link"
+ @click.stop="stopTrusting(group.key)"
+ >
+ {{ ai.skillsStopTrusting }}
+ </AppButton>
+ <AppButton v-else size="xs" variant="outline" @click.stop="askTrust(group.key)">
+ <template #leading><icon-lucide-shield-check class="size-3.5" /></template>
+ {{ ai.skillsTrustFolder }}
+ </AppButton>
+ </template>
+ </template>
+ </CapabilityList>
+ </CapabilityPage>
</PanelDrillIn>
<AppAlertDialogRoot v-model:open="trustOpen">
<AppDialogHeader
diff --git a/src/components/settings/tool-access/ToolAccessList.stories.ts b/src/components/settings/tool-access/ToolAccessList.stories.ts
deleted file mode 100644
index d74f24d6e..000000000
--- a/src/components/settings/tool-access/ToolAccessList.stories.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import type { Meta, StoryObj } from '@storybook/vue3-vite'
-import { expect, userEvent, within } from 'storybook/test'
-import { computed, ref } from 'vue'
-
-import type { ToolAccessEntry, ToolAccessGroup } from '@/app/automation/tool-access/types'
-
-import ToolAccessList from './ToolAccessList.vue'
-
-const entries: ToolAccessEntry[] = Array.from({ length: 60 }, (_, index) => ({
- name: `inspect_component_${index + 1}`,
- description:
- 'Inspect a component and its properties in the active document. Narrow the selection to inspect fewer layers.',
- effect: 'read'
-}))
-const writeEntries: ToolAccessEntry[] = Array.from({ length: 20 }, (_, index) => ({
- name: `edit_component_${index + 1}`,
- description: 'Change a property on one or more components.',
- effect: 'write'
-}))
-
-const meta = {
- title: 'App/Settings/Tool Access/List',
- args: {
- disabledTools: [] as string[],
- initiallyCollapsed: false,
- labels: ['Read-only', 'Changes']
- },
- render: (args) => ({
- components: { ToolAccessList },
- setup: () => {
- const disabled = ref([...args.disabledTools])
- const expanded = ref({ read: !args.initiallyCollapsed, write: false })
- const all = [...entries, ...writeEntries]
- const groups = computed<ToolAccessGroup[]>(() =>
- (['read', 'write'] as const).map((effect) => {
- const tools = all.filter((tool) => tool.effect === effect)
- const enabled = tools.filter((tool) => !disabled.value.includes(tool.name)).length
- return {
- effect,
- label: effect === 'read' ? args.labels[0] : args.labels[1],
- enabled: enabled > 0,
- state: enabled > 0 && enabled < tools.length ? 'mixed' : 'idle',
- tools
- }
- })
- )
- const isEnabled = (tool: ToolAccessEntry) => !disabled.value.includes(tool.name)
- return { args, disabled, expanded, groups, isEnabled }
- },
- template: `
- <div class="max-w-lg bg-panel p-3 text-surface">
- <ToolAccessList
- :groups="groups"
- :expanded="expanded"
- :is-enabled="isEnabled"
- @update:expanded="(effect, open) => (expanded = { ...expanded, [effect]: open })"
- @set-group="(effect, enabled) => (disabled = enabled
- ? disabled.filter((name) => !groups.find((g) => g.effect === effect).tools.some((t) => t.name === name))
- : [...disabled, ...groups.find((g) => g.effect === effect).tools.map((t) => t.name)])"
- @set-tool="(name, enabled) => (disabled = enabled ? disabled.filter((n) => n !== name) : [...disabled, name])"
- />
- </div>`
- })
-} satisfies Meta<{ disabledTools: string[]; initiallyCollapsed: boolean; labels: [string, string] }>
-
-export default meta
-type Story = StoryObj<typeof meta>
-
-export const LongCatalog: Story = {}
-export const MixedAccess: Story = { args: { disabledTools: ['inspect_component_1'] } }
-export const CollapsedGroup: Story = { args: { initiallyCollapsed: true } }
-export const ToggleAccess: Story = {
- play: async ({ canvasElement }) => {
- const canvas = within(canvasElement)
- await userEvent.click(canvas.getByRole('switch', { name: 'inspect_component_1' }))
- await userEvent.click(canvas.getByRole('button', { name: 'Changes' }))
- await expect(canvas.getByRole('switch', { name: 'edit_component_1' })).toBeVisible()
- }
-}
diff --git a/src/components/settings/tool-access/ToolAccessList.vue b/src/components/settings/tool-access/ToolAccessList.vue
deleted file mode 100644
index 3acdab5d0..000000000
--- a/src/components/settings/tool-access/ToolAccessList.vue
+++ /dev/null
@@ -1,53 +0,0 @@
-<script setup lang="ts">
-import type { ToolAccessEntry, ToolAccessGroup } from '@/app/automation/tool-access/types'
-import SettingsDisclosure from '@/components/settings/layout/SettingsDisclosure.vue'
-import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'
-
-const { groups, expanded, isEnabled } = defineProps<{
- groups: ToolAccessGroup[]
- expanded: Record<ToolAccessEntry['effect'], boolean>
- isEnabled: (tool: ToolAccessEntry) => boolean
-}>()
-
-const emit = defineEmits<{
- 'update:expanded': [effect: ToolAccessEntry['effect'], open: boolean]
- 'set-group': [effect: ToolAccessEntry['effect'], enabled: boolean]
- 'set-tool': [name: string, enabled: boolean]
-}>()
-</script>
-
-<template>
- <div data-slot="tool-access-list">
- <template v-for="group in groups" :key="group.effect">
- <SettingsDisclosure
- v-if="group.tools.length"
- :open="expanded[group.effect]"
- class="border-b border-border"
- @update:open="emit('update:expanded', group.effect, $event)"
- >
- <template #label>{{ group.label }}</template>
- <template #actions>
- <AppSwitch
- :model-value="group.enabled"
- :state="group.state"
- :label="group.label"
- @update:model-value="emit('set-group', group.effect, $event)"
- />
- </template>
- <ul class="divide-y divide-border">
- <li v-for="tool in group.tools" :key="tool.name" class="flex items-start gap-3 py-3">
- <div class="min-w-0 flex-1">
- <code class="break-all text-xs font-medium text-surface">{{ tool.name }}</code>
- <p class="mt-1 text-xs leading-relaxed text-muted">{{ tool.description }}</p>
- </div>
- <AppSwitch
- :model-value="isEnabled(tool)"
- :label="tool.name"
- @update:model-value="emit('set-tool', tool.name, $event)"
- />
- </li>
- </ul>
- </SettingsDisclosure>
- </template>
- </div>
-</template>
diff --git a/src/components/settings/tool-access/ToolAccessSettingsPanel.vue b/src/components/settings/tool-access/ToolAccessSettingsPanel.vue
index 36bb070fa..c0c1abdb0 100644
--- a/src/components/settings/tool-access/ToolAccessSettingsPanel.vue
+++ b/src/components/settings/tool-access/ToolAccessSettingsPanel.vue
@@ -1,5 +1,5 @@
<script setup lang="ts">
-import { computed } from 'vue'
+import { computed, ref } from 'vue'
import { useAutomationMessages } from '@open-pencil/vue/i18n'
@@ -7,87 +7,89 @@ import { mcpRuntime } from '@/app/automation/mcp/runtime'
import { useMCPSettings } from '@/app/automation/mcp/settings/use'
import { useToolAccess } from '@/app/automation/tool-access/settings/list'
import { useToolAccessSettings } from '@/app/automation/tool-access/settings/use'
-import type { ToolAccessGroup } from '@/app/automation/tool-access/types'
+import type { ToolAccessEntry, ToolAccessTarget } from '@/app/automation/tool-access/types'
+import CapabilityList from '@/components/settings/capability/CapabilityList.vue'
+import CapabilityPage from '@/components/settings/capability/CapabilityPage.vue'
+import { filterCapabilities } from '@/components/settings/capability/filter'
+import type { CapabilityFilter, CapabilityGroup } from '@/components/settings/capability/types'
import AppButton from '@/components/ui/button/AppButton.vue'
-import { AppDialogBody } from '@/components/ui/dialog'
import AppPlaceholder from '@/components/ui/feedback/AppPlaceholder.vue'
-import AppInput from '@/components/ui/input/AppInput.vue'
-import SegmentedControl from '@/components/ui/select/SegmentedControl.vue'
-import ToolAccessList from './ToolAccessList.vue'
+/**
+ * The tools one kind of agent can call: the built-in AI's on Tool access, the local MCP server's
+ * on the MCP page.
+ */
+const { target } = defineProps<{ target: ToolAccessTarget }>()
const automation = useAutomationMessages()
-const { target, tools, disabled, selectTarget, reset } = useToolAccessSettings()
-const { search, enabledCount, groups, expanded, setGroupEnabled, isEnabled, setToolEnabled } =
- useToolAccess(tools, disabled)
+const { tools, disabled, reset } = useToolAccessSettings(target)
+const { search, groups, expanded, setGroupEnabled, isEnabled, setToolEnabled } = useToolAccess(
+ tools,
+ disabled
+)
const { restart } = useMCPSettings()
+const show = ref<CapabilityFilter>('all')
-const targetOptions = computed(() => [
- { value: 'ai', label: automation.value.builtInAI },
- { value: 'mcp', label: automation.value.localMCP }
-])
-const labelledGroups = computed<ToolAccessGroup[]>(() =>
- groups.value.map((group) => ({
- ...group,
- label:
- group.effect === 'read' ? automation.value.readOnlyTools : automation.value.sideEffectTools
- }))
+const listGroups = computed<CapabilityGroup[]>(() =>
+ filterCapabilities(
+ groups.value.map((group) => ({
+ key: group.effect,
+ label:
+ group.effect === 'read' ? automation.value.readOnlyTools : automation.value.sideEffectTools,
+ count: automation.value.toolsEnabled(group.counts),
+ toggle: { enabled: group.enabled, state: group.state },
+ items: group.tools.map((tool) => ({
+ key: tool.name,
+ name: tool.name,
+ description: tool.description,
+ enabled: isEnabled(tool)
+ }))
+ })),
+ show.value
+ )
)
-const hasMatches = computed(() => labelledGroups.value.some((group) => group.tools.length))
-function setExpanded(effect: 'read' | 'write', open: boolean) {
- expanded.value = { ...expanded.value, [effect]: open }
+const hasMatches = computed(() => listGroups.value.some((group) => group.items.length))
+
+function effectOf(key: string): ToolAccessEntry['effect'] {
+ return key === 'write' ? 'write' : 'read'
+}
+function setExpanded(key: string, open: boolean) {
+ expanded.value = { ...expanded.value, [effectOf(key)]: open }
}
</script>
<template>
- <div class="flex min-h-0 min-w-0 flex-1 flex-col" data-slot="tool-access">
- <div
- class="flex shrink-0 flex-wrap items-center gap-2 border-b border-border px-5 py-3 sm:px-6"
- data-slot="tool-access-toolbar"
- >
- <SegmentedControl
- :model-value="target"
- :options="targetOptions"
- :label="automation.toolAccessTarget"
- class="max-sm:w-full"
- @update:model-value="selectTarget"
- />
- <span class="text-xs text-muted">
- {{ automation.toolsEnabled({ enabled: enabledCount, total: tools.length }) }}
- </span>
- <AppButton size="xs" variant="link" @click="reset">{{
+ <CapabilityPage
+ v-model:search="search"
+ v-model:show="show"
+ :search-label="automation.searchTools"
+ data-slot="tool-access"
+ :data-target="target"
+ >
+ <template #description>{{
+ target === 'ai' ? automation.aiToolAccessDescription : automation.mcpToolAccessDescription
+ }}</template>
+ <template #tools>
+ <AppButton size="sm" variant="outline" @click="reset">{{
automation.restoreToolDefaults
}}</AppButton>
- <AppInput
- v-model="search"
- type="search"
- class="ml-auto min-w-40 flex-1 sm:max-w-60"
- :placeholder="automation.searchTools"
- :aria-label="automation.searchTools"
- />
- </div>
- <AppDialogBody :ui="{ body: 'p-5 sm:p-6' }">
- <p class="pb-3 text-xs leading-relaxed text-muted">
- {{
- target === 'ai' ? automation.aiToolAccessDescription : automation.mcpToolAccessDescription
- }}
- </p>
- <AppPlaceholder
- v-if="!hasMatches"
- size="compact"
- :fill="false"
- :label="automation.noMatchingTools"
- />
- <ToolAccessList
- v-else
- :groups="labelledGroups"
- :expanded="expanded"
- :is-enabled="isEnabled"
- @update:expanded="setExpanded"
- @set-group="setGroupEnabled"
- @set-tool="setToolEnabled"
- />
- <p class="border-t border-border pt-3 text-xs leading-relaxed text-muted">
+ </template>
+ <AppPlaceholder
+ v-if="!hasMatches"
+ size="compact"
+ :fill="false"
+ :label="automation.noMatchingTools"
+ />
+ <CapabilityList
+ v-else
+ :groups="listGroups"
+ :expanded="expanded"
+ @update:expanded="setExpanded"
+ @set-group="(key, enabled) => setGroupEnabled(effectOf(key), enabled)"
+ @set-item="(_group, name, enabled) => setToolEnabled(name, enabled)"
+ />
+ <div class="flex flex-wrap items-center justify-between gap-3">
+ <p class="max-w-prose text-[11px] leading-relaxed text-muted">
{{
target === 'ai'
? automation.aiToolsNotice
@@ -96,18 +98,16 @@ function setExpanded(effect: 'read' | 'write', open: boolean) {
: automation.toolsRestartNotice
}}
</p>
- <div v-if="target === 'mcp'" class="pt-2">
- <AppButton
- color="primary"
- variant="solid"
- :disabled="mcpRuntime.externallyManaged"
- :loading="mcpRuntime.status === 'starting' || mcpRuntime.checking"
- @click="restart"
- >{{
- mcpRuntime.externallyManaged ? automation.externallyManaged : automation.restart
- }}</AppButton
- >
- </div>
- </AppDialogBody>
- </div>
+ <AppButton
+ v-if="target === 'mcp'"
+ variant="outline"
+ :disabled="mcpRuntime.externallyManaged"
+ :loading="mcpRuntime.status === 'starting' || mcpRuntime.checking"
+ @click="restart"
+ >{{
+ mcpRuntime.externallyManaged ? automation.externallyManaged : automation.restart
+ }}</AppButton
+ >
+ </div>
+ </CapabilityPage>
</template>
diff --git a/src/components/ui/overlay/Tip.vue b/src/components/ui/overlay/Tip.vue
index e6313c926..5b04cb803 100644
--- a/src/components/ui/overlay/Tip.vue
+++ b/src/components/ui/overlay/Tip.vue
@@ -29,12 +29,15 @@ const {
asChild = false,
side = 'top',
disabled = false,
+ truncated = false,
label
} = defineProps<{
asChild?: boolean
label?: string
side?: 'top' | 'bottom' | 'left' | 'right'
disabled?: boolean
+ /** Show only while the text it repeats is cut off, as a hover on a truncated label does. */
+ truncated?: boolean
}>()
const trigger = shallowRef<HTMLElement>()
@@ -75,8 +78,13 @@ const {
{ immediate: false }
)
+function isCutOff() {
+ const element = anchor.value
+ return Boolean(element && element.scrollWidth > element.clientWidth)
+}
+
function show() {
- if (!label || disabled) return
+ if (!label || disabled || (truncated && !isCutOff())) return
document.dispatchEvent(new CustomEvent(TOOLTIP_CLAIM_EVENT, { detail: trigger.value }))
stopOpenTimer()
if (performance.now() - lastClosedAt.value < TOOLTIP_SKIP_DELAY_MS) open.value = true
diff --git a/src/components/ui/overlay/tooltip.ts b/src/components/ui/overlay/tooltip.ts
index 71e0f31be..01d3e9759 100644
--- a/src/components/ui/overlay/tooltip.ts
+++ b/src/components/ui/overlay/tooltip.ts
@@ -7,7 +7,8 @@ import { tooltipSurface } from '@/theme/overlay'
const tooltipTheme = {
slots: {
- content: ['z-50 px-2 py-1 text-[11px]', tooltipSurface]
+ // Long text wraps rather than running across the window.
+ content: ['z-50 max-w-80 px-2 py-1 text-[11px] break-words', tooltipSurface]
}
} as const
diff --git a/src/components/ui/panel/PanelDrillIn.vue b/src/components/ui/panel/PanelDrillIn.vue
index 3ecc959e8..9b14abf8b 100644
--- a/src/components/ui/panel/PanelDrillIn.vue
+++ b/src/components/ui/panel/PanelDrillIn.vue
@@ -28,9 +28,9 @@ const emit = defineEmits<{ back: []; closed: []; openAutoFocus: [event: Event] }
const styles = tv(drillInTheme)()
/**
- * The list shows under the detail while it slides, then hides once covered. It is inert from the
- * moment the detail opens, and a closing detail is inert while it slides away, so the two never
- * share the tab order.
+ * The list stays under the detail's background while its content slides in, then hides. It is
+ * inert from the moment the detail opens, and a closing detail is inert while it slides away, so
+ * the two never share the tab order.
*/
const covered = ref(false)
diff --git a/src/theme/home/location-menu.ts b/src/theme/home/location-menu.ts
index e72c24a94..de5e8bfee 100644
--- a/src/theme/home/location-menu.ts
+++ b/src/theme/home/location-menu.ts
@@ -1,11 +1,14 @@
-/** The home tab's location picker on phones, in place of the sidebar. */
+/**
+ * The home tab's location picker in a narrow window, in place of the sidebar; touch-sized only
+ * when the pointer is a finger.
+ */
export default {
slots: {
trigger:
- 'flex h-10 w-full items-center gap-2 rounded-lg border border-border bg-panel-field px-3 text-left text-sm text-surface outline-none hover:bg-panel-field-hover focus-visible:ring-2 focus-visible:ring-accent/50',
- icon: 'size-4 shrink-0 text-muted',
+ 'flex h-8 w-full items-center gap-2 rounded-md border border-border bg-panel-field px-2.5 text-left text-xs text-surface outline-none pointer-coarse:h-10 pointer-coarse:rounded-lg pointer-coarse:px-3 pointer-coarse:text-sm hover:bg-panel-field-hover focus-visible:ring-2 focus-visible:ring-accent/50',
+ icon: 'size-3.5 shrink-0 text-muted pointer-coarse:size-4',
label: 'min-w-0 flex-1 truncate font-medium',
- chevron: 'size-4 shrink-0 text-muted',
+ chevron: 'size-3.5 shrink-0 text-muted pointer-coarse:size-4',
content: 'w-[var(--reka-dropdown-menu-trigger-width)]',
itemLabel: 'min-w-0 flex-1 truncate',
count: 'shrink-0 text-[11px] text-muted tabular-nums',
diff --git a/src/theme/markdown/markdown.css b/src/theme/markdown/markdown.css
index a62cecfb0..07638ee0c 100644
--- a/src/theme/markdown/markdown.css
+++ b/src/theme/markdown/markdown.css
@@ -48,6 +48,11 @@
background-color: var(--color-input);
}
+/* A code block's language and copy bar stays on the block; pinned, it covered the lines above. */
+.markdown-root [data-stream-markdown='code-block-header'].sticky {
+ position: static;
+}
+
.markdown-content {
--shiki-dark-bg: var(--color-input);
diff --git a/src/theme/motion/styles.ts b/src/theme/motion/styles.ts
index 2b7ff9e69..1c8435e25 100644
--- a/src/theme/motion/styles.ts
+++ b/src/theme/motion/styles.ts
@@ -12,14 +12,19 @@ export const motionStyles = {
pulse: 'animate-pulse motion-reduce:animate-none'
} as const
-/** A detail view sliding in over its list and back out the way it came. */
+/**
+ * A detail view sliding in over its list and back out the way it came. The view's background
+ * covers the list at once and only its content moves, so the two never show through each other;
+ * `duration` tells Vue how long that is, since the view itself has no transition to time.
+ */
export const drillInTransition = {
+ duration: { enter: 150, leave: 100 },
enterActiveClass:
- 'transition-[opacity,translate] duration-150 ease-out motion-reduce:transition-none',
- enterFromClass: 'translate-x-3 opacity-0 motion-reduce:translate-x-0',
+ '*:transition-[opacity,translate] *:duration-150 *:ease-out motion-reduce:*:transition-none',
+ enterFromClass: '*:translate-x-3 *:opacity-0 motion-reduce:*:translate-x-0',
leaveActiveClass:
- 'transition-[opacity,translate] duration-100 ease-in motion-reduce:transition-none',
- leaveToClass: 'translate-x-3 opacity-0 motion-reduce:translate-x-0'
+ '*:transition-[opacity,translate] *:duration-100 *:ease-in motion-reduce:*:transition-none',
+ leaveToClass: '*:translate-x-3 *:opacity-0 motion-reduce:*:translate-x-0'
} as const
/** One view replacing another in place, such as an inspector switching to another item. */
diff --git a/src/theme/panel/drill-in.ts b/src/theme/panel/drill-in.ts
index 887639c47..8cf18eb5c 100644
--- a/src/theme/panel/drill-in.ts
+++ b/src/theme/panel/drill-in.ts
@@ -1,7 +1,7 @@
export default {
slots: {
root: 'relative flex min-h-0 flex-1 flex-col',
- base: 'flex min-h-0 flex-1 flex-col',
+ base: 'isolate flex min-h-0 flex-1 flex-col',
detail: 'absolute inset-0 z-10 flex min-h-0 flex-col bg-panel',
header: 'flex shrink-0 items-center gap-1 border-b border-border px-1.5 py-1',
body: 'flex min-h-0 flex-1 flex-col'
diff --git a/tests/app/editor/vectorize/providers.test.ts b/tests/app/editor/vectorize/providers.test.ts
new file mode 100644
index 000000000..0e1c975be
--- /dev/null
+++ b/tests/app/editor/vectorize/providers.test.ts
@@ -0,0 +1,155 @@
+import { describe, expect, spyOn, test } from 'bun:test'
+
+import {
+ extractVectorizedSVGURL,
+ getVectorizeProvider,
+ validateVectorizedAssetURL
+} from '@/app/editor/vectorize/providers'
+import { appCredentialRefs } from '@/app/settings/credentials/persistence'
+import { credentialKey } from '@/app/settings/credentials/reference'
+
+import { fetchStub } from '#tests/helpers/fetch'
+
+describe('vectorization providers', () => {
+ test('extracts supported nested SVG response URLs', () => {
+ expect(extractVectorizedSVGURL({ image: { url: 'https://cdn.recraft.ai/a.svg' } })).toBe(
+ 'https://cdn.recraft.ai/a.svg'
+ )
+ expect(extractVectorizedSVGURL({ data: [{ url: 'https://v3.fal.media/a.svg' }] })).toBe(
+ 'https://v3.fal.media/a.svg'
+ )
+ expect(extractVectorizedSVGURL({ data: { image: { url: 'https://fal.media/a.svg' } } })).toBe(
+ 'https://fal.media/a.svg'
+ )
+ })
+
+ test('allows only provider-owned HTTPS asset hosts', () => {
+ expect(validateVectorizedAssetURL('recraft', 'https://cdn.recraft.ai/a.svg').hostname).toBe(
+ 'cdn.recraft.ai'
+ )
+ expect(validateVectorizedAssetURL('fal', 'https://v3.fal.media/a.svg').hostname).toBe(
+ 'v3.fal.media'
+ )
+ expect(() => validateVectorizedAssetURL('recraft', 'https://example.com/a.svg')).toThrow(
+ 'untrusted'
+ )
+ expect(() => validateVectorizedAssetURL('fal', 'http://fal.media/a.svg')).toThrow('untrusted')
+ })
+
+ test('rejects redirects from trusted asset hosts to untrusted hosts', async () => {
+ let requestCount = 0
+ const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
+ fetchStub(async () => {
+ requestCount += 1
+ if (requestCount === 1) {
+ return Response.json({ image: { url: 'https://cdn.recraft.ai/result.svg' } })
+ }
+ const response = new Response('<svg xmlns="http://www.w3.org/2000/svg"/>', {
+ headers: { 'content-type': 'image/svg+xml' }
+ })
+ Object.defineProperty(response, 'url', { value: 'https://example.com/result.svg' })
+ return response
+ })
+ )
+
+ try {
+ await expect(
+ getVectorizeProvider('recraft').vectorize(new Uint8Array([1, 2, 3]), 'secret')
+ ).rejects.toThrow('untrusted')
+ expect(requestCount).toBe(2)
+ } finally {
+ fetchSpy.mockRestore()
+ }
+ })
+
+ test('includes vectorization keys in browser persistence changes', () => {
+ const keys = appCredentialRefs().map(credentialKey)
+ expect(keys).toContain('v1:vectorize-recraft:default:api-key')
+ expect(keys).toContain('v1:vectorize-fal:default:api-key')
+ expect(keys).toContain('v1:vectorize-quiver:default:api-key')
+ })
+
+ test('Quiver sends the image to Arrow 2 and returns the SVG its answer carries', async () => {
+ const svg =
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 4"><path d="M0 0h4v4z"/></svg>'
+ const requests: { url: string; init?: RequestInit }[] = []
+ const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
+ fetchStub(async (input, init) => {
+ requests.push({ url: String(input), init })
+ return Response.json({
+ id: 'resp_1',
+ created: 1,
+ data: [{ mime_type: 'image/svg+xml', svg }]
+ })
+ })
+ )
+ try {
+ expect(
+ await getVectorizeProvider('quiver').vectorize(new Uint8Array([1, 2, 3]), 'sk_test_1')
+ ).toBe(svg)
+ expect(requests).toHaveLength(1)
+ expect(requests[0].url).toBe('https://api.quiver.ai/v1/svgs/vectorizations')
+ expect(new Headers(requests[0].init?.headers).get('authorization')).toBe('Bearer sk_test_1')
+ expect(JSON.parse(String(requests[0].init?.body))).toEqual({
+ model: 'arrow-2',
+ image: { base64: 'AQID' },
+ stream: false
+ })
+ } finally {
+ fetchSpy.mockRestore()
+ }
+ })
+
+ test('Quiver reports a rejected key, a frozen account and an answer without an SVG apart', async () => {
+ const answers = [
+ new Response('{"error":"invalid key"}', { status: 401 }),
+ Response.json({ code: 'account_frozen' }, { status: 403 }),
+ Response.json({ id: 'resp_1', created: 1, data: [] })
+ ]
+ const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
+ fetchStub(async () => answers.shift() ?? new Response(null, { status: 500 }))
+ )
+ const quiver = getVectorizeProvider('quiver')
+ try {
+ await expect(quiver.vectorize(new Uint8Array([1]), 'bad')).rejects.toThrow(
+ 'QuiverAI API key was rejected'
+ )
+ await expect(quiver.vectorize(new Uint8Array([1]), 'key')).rejects.toThrow(
+ 'QuiverAI vectorization failed (403)'
+ )
+ await expect(quiver.vectorize(new Uint8Array([1]), 'key')).rejects.toThrow(
+ 'QuiverAI returned no SVG'
+ )
+ } finally {
+ fetchSpy.mockRestore()
+ }
+ })
+
+ test('an answer that stalls after its headers times out instead of waiting forever', async () => {
+ const realSetTimeout = globalThis.setTimeout
+ // The deadline runs out at once, after the headers have arrived.
+ const timerSpy = spyOn(globalThis, 'setTimeout').mockImplementation(((handler: () => void) =>
+ realSetTimeout(handler, 0)) as typeof setTimeout)
+ const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
+ fetchStub(async (_input, init) => {
+ const body = new ReadableStream<Uint8Array>({
+ start(controller) {
+ controller.enqueue(new TextEncoder().encode('{"data":['))
+ init?.signal?.addEventListener('abort', () =>
+ controller.error(new DOMException('aborted', 'AbortError'))
+ )
+ }
+ })
+ return new Response(body)
+ })
+ )
+ try {
+ await expect(
+ getVectorizeProvider('quiver').vectorize(new Uint8Array([1]), 'key')
+ ).rejects.toThrow('timed out')
+ } finally {
+ fetchSpy.mockRestore()
+ timerSpy.mockRestore()
+ }
+ })
+})
diff --git a/tests/e2e/app/recent-files.spec.ts b/tests/e2e/app/recent-files.spec.ts
index 345f20199..b56642109 100644
--- a/tests/e2e/app/recent-files.spec.ts
+++ b/tests/e2e/app/recent-files.spec.ts
@@ -55,20 +55,35 @@ test.describe('a populated recent files list', () => {
})
})
-test('keeps the New tab layout usable on mobile', async ({ page }) => {
- await page.setViewportSize({ width: 390, height: 844 })
+test.describe('on a phone', () => {
+ // A touch screen: a narrow desktop window keeps mouse-sized controls and focuses the search.
+ test.use({ hasTouch: true, isMobile: true, viewport: { width: 390, height: 844 } })
+
+ test('keeps the New tab layout usable', async ({ page }) => {
+ await page.goto('/?recent-files')
+
+ const search = page.getByLabel('Search files…')
+ await expect(search).toBeVisible()
+ await expect(search).not.toBeFocused()
+ await expect(search).toHaveAttribute('placeholder', 'Search files…')
+ await expect(page.getByTestId('home-open-file')).toBeVisible()
+ await expect(page.getByTestId('home-new-document')).toBeVisible()
+ await expect(page.getByTestId('recent-files-home')).toHaveJSProperty(
+ 'scrollWidth',
+ await page.getByTestId('recent-files-home').evaluate((element) => element.clientWidth)
+ )
+ })
+})
+
+test('a narrow window with a mouse keeps mouse-sized controls and focuses the search', async ({
+ page
+}) => {
+ await page.setViewportSize({ width: 600, height: 800 })
await page.goto('/?recent-files')
- const search = page.getByLabel('Search files…')
- await expect(search).toBeVisible()
- await expect(search).not.toBeFocused()
- await expect(search).toHaveAttribute('placeholder', 'Search files…')
- await expect(page.getByTestId('home-open-file')).toBeVisible()
- await expect(page.getByTestId('home-new-document')).toBeVisible()
- await expect(page.getByTestId('recent-files-home')).toHaveJSProperty(
- 'scrollWidth',
- await page.getByTestId('recent-files-home').evaluate((element) => element.clientWidth)
- )
+ await expect(page.getByLabel('Search files…')).toBeFocused()
+ // Medium buttons, 32 px tall; touch screens get the 36 px large ones.
+ expect((await page.getByTestId('home-open-file').boundingBox())?.height).toBe(32)
})
test('opens to the recent-files home and starts a new document', async ({ page }) => {
diff --git a/tests/e2e/chat/references.spec.ts b/tests/e2e/chat/references.spec.ts
index 1165fe5bb..3a0674300 100644
--- a/tests/e2e/chat/references.spec.ts
+++ b/tests/e2e/chat/references.spec.ts
@@ -60,7 +60,7 @@ test('/ starts a message with a skill', async ({ configuredChat: chat }) => {
mimeType: 'application/zip',
buffer: Buffer.from(zipSync({ 'grid/SKILL.md': strToU8(SKILL) }))
})
- await expect(page.locator('[data-skill="grid"]')).toBeVisible()
+ await expect(page.locator('[data-item="grid"]')).toBeVisible()
await page.getByTestId('app-settings-done').click()
await chat.input.click()
diff --git a/tests/e2e/settings/credentials.spec.ts b/tests/e2e/settings/credentials.spec.ts
index 671fade95..1b73b4980 100644
--- a/tests/e2e/settings/credentials.spec.ts
+++ b/tests/e2e/settings/credentials.spec.ts
@@ -161,17 +161,18 @@ test('model library keeps reusable profiles and role assignments', async ({ page
await page.getByTestId('app-settings-trigger').click()
await page.getByTestId('settings-section-ai').click()
await page.getByTestId('settings-add-model').click()
+ await page.locator('[data-provider="google"]').click()
await page.getByLabel('Name').fill('Fast model')
- await page.getByTestId('settings-model-provider').click()
- await page.getByRole('option', { name: 'Google AI' }).click()
await page.getByLabel('Model ID').click()
await page.getByRole('option').first().click()
await page.getByRole('button', { name: 'Save model' }).click()
await page.getByTestId('settings-add-model').click()
+ // The chooser marks the provider the saved model runs on.
+ await expect(page.locator('[data-provider="google"]')).toHaveAttribute('data-set-up')
+ await expect(page.locator('[data-provider="openrouter"]')).not.toHaveAttribute('data-set-up')
+ await page.locator('[data-provider="openrouter"]').click()
await page.getByLabel('Name').fill('Vision model')
- await page.getByTestId('settings-model-provider').click()
- await page.getByRole('option', { name: 'OpenRouter' }).click()
await page.getByLabel('Model ID').first().click()
await page.getByRole('option').first().click()
await page.getByRole('button', { name: 'Save model' }).click()
diff --git a/tests/e2e/settings/feedback.spec.ts b/tests/e2e/settings/feedback.spec.ts
index 739420521..df06e08b4 100644
--- a/tests/e2e/settings/feedback.spec.ts
+++ b/tests/e2e/settings/feedback.spec.ts
@@ -13,6 +13,7 @@ test('model Save and Test explain missing fields and focus the first error', asy
await openSettings(page)
await page.getByTestId('settings-section-ai').click()
await page.getByTestId('settings-add-model').click()
+ await page.locator('[data-provider="openrouter"]').click()
const editor = page.getByTestId('settings-model-editor')
const name = editor.getByRole('textbox', { name: 'Name', exact: true })
const save = page.getByRole('button', { name: 'Save model', exact: true })
@@ -164,9 +165,8 @@ test('a partial model save is explained and retry does not duplicate the profile
await openSettings(page)
await page.getByTestId('settings-section-ai').click()
await page.getByTestId('settings-add-model').click()
+ await page.locator('[data-provider="google"]').click()
await page.getByLabel('Name', { exact: true }).fill('Partial model')
- await page.getByTestId('settings-model-provider').click()
- await page.getByRole('option', { name: 'Google AI', exact: true }).click()
await page.getByLabel('Model ID', { exact: true }).click()
await page.getByRole('option').first().click()
await page.getByTestId('provider-settings-api-key').fill('test-only-key')
diff --git a/tests/e2e/settings/mcp/forms.spec.ts b/tests/e2e/settings/mcp/forms.spec.ts
index 0f93730de..6955cf83d 100644
--- a/tests/e2e/settings/mcp/forms.spec.ts
+++ b/tests/e2e/settings/mcp/forms.spec.ts
@@ -29,7 +29,8 @@ for (const viewport of [
const search = page.getByRole('searchbox', { name: 'Search tools' })
await search.fill('no-such-mcp-tool')
await expect(page.getByText('No tools match your search.', { exact: true })).toBeVisible()
- await selectMCPSection(page, viewport.width < 640)
+ // The tool list opens over the MCP page; its breadcrumb leads back.
+ await page.getByTestId('settings-editor-back').click()
const access = page.getByRole('combobox', { name: 'Browser agent access' })
await expect(access).toHaveText('Off')
await access.click()
diff --git a/tests/e2e/settings/model-editor.spec.ts b/tests/e2e/settings/model-editor.spec.ts
index c6bec8e2a..ac97f20c9 100644
--- a/tests/e2e/settings/model-editor.spec.ts
+++ b/tests/e2e/settings/model-editor.spec.ts
@@ -35,6 +35,7 @@ test('model editing keeps the Settings shell stable and isolates the form', asyn
await expect(page.getByRole('alertdialog')).toHaveCount(0)
await page.getByTestId('settings-add-model').click()
await expect(editor).toBeVisible()
+ await editor.locator('[data-provider="openrouter"]').click()
// Accidental dismissal must not throw away an in-progress profile.
await editor.getByRole('textbox', { name: 'Name', exact: true }).fill('Draft profile')
@@ -68,7 +69,8 @@ for (const reducedMotion of ['reduce', 'no-preference'] as const) {
for (let attempt = 0; attempt < 3; attempt++) {
await add.click()
const editor = page.getByTestId('settings-model-editor')
- await expect(editor.locator('input').first()).toBeFocused()
+ // A new model opens on its first provider choice.
+ await expect(editor.locator('[data-provider]').first()).toBeFocused()
await editor.getByRole('button', { name: 'Cancel', exact: true }).click()
await expect(add).toBeFocused()
await expect(dialog.getByRole('tabpanel')).toHaveCount(1)
diff --git a/tests/e2e/settings/polish.spec.ts b/tests/e2e/settings/polish.spec.ts
index 9792f0586..bbeed1545 100644
--- a/tests/e2e/settings/polish.spec.ts
+++ b/tests/e2e/settings/polish.spec.ts
@@ -54,6 +54,7 @@ test('external Settings requests respect a dirty editor', async ({ page }) => {
await openSettings(page)
await page.getByTestId('settings-section-ai').click()
await page.getByTestId('settings-add-model').click()
+ await page.locator('[data-provider="openrouter"]').click()
const name = page.getByRole('textbox', { name: 'Name', exact: true })
await name.fill('Keep this draft')
const requestSection = () =>
diff --git a/tests/e2e/settings/skills.spec.ts b/tests/e2e/settings/skills.spec.ts
index a700cfe6f..1ee402ee2 100644
--- a/tests/e2e/settings/skills.spec.ts
+++ b/tests/e2e/settings/skills.spec.ts
@@ -17,35 +17,36 @@ async function upload(page: Page, name: string, buffer: Buffer) {
await (await chooser).setFiles({ name, mimeType: 'application/octet-stream', buffer })
}
-test('an uploaded skill can be read, turned off, and deleted', async ({ page }) => {
+test('an uploaded skill is switched in the list, read in its details, and deleted', async ({
+ page
+}) => {
await page.goto('/?test')
const canvas = new CanvasHelper(page)
await canvas.waitForInit()
await openSkills(page)
await upload(page, 'grid.zip', Buffer.from(zipSync({ 'grid/SKILL.md': strToU8(SKILL) })))
- const row = page.getByRole('button', { name: /^grid / })
- await row.click()
-
- const details = page.getByTestId('settings-skill-details')
- await expect(details.getByRole('heading', { name: 'Grid', exact: true })).toBeVisible()
- await expect(page.getByTestId('settings-breadcrumb')).toContainText('grid')
- const use = details.getByRole('switch')
- await expect(use).toHaveAttribute('data-state', 'checked')
- await use.click()
- await page.getByTestId('settings-editor-back').click()
- await expect(details).toBeHidden()
+ const panel = page.getByTestId('settings-skills-panel')
+ const toggle = panel.getByRole('switch', { name: 'grid', exact: true })
+ await expect(toggle).toHaveAttribute('data-state', 'checked')
+ await toggle.click()
+ await expect(toggle).toHaveAttribute('data-state', 'unchecked')
await page.reload()
await canvas.waitForInit()
await openSkills(page)
- await row.click()
- await expect(use).toHaveAttribute('data-state', 'unchecked')
+ await expect(toggle).toHaveAttribute('data-state', 'unchecked')
+
+ await panel.locator('[data-item="grid"]').getByRole('button').first().click()
+ const details = page.getByTestId('settings-skill-details')
+ await expect(details.getByRole('heading', { name: 'Grid', exact: true })).toBeVisible()
+ await expect(page.getByTestId('settings-breadcrumb')).toContainText('grid')
+ await expect(details.getByRole('switch')).toHaveAttribute('data-state', 'unchecked')
await details.getByRole('button', { name: 'Delete skill' }).click()
await page.getByRole('alertdialog').getByRole('button', { name: 'Delete skill' }).click()
await expect(details).toBeHidden()
- await expect(row).toHaveCount(0)
+ await expect(panel.locator('[data-item="grid"]')).toHaveCount(0)
})
test('a file that holds no skill is refused', async ({ page }) => {
@@ -54,5 +55,5 @@ test('a file that holds no skill is refused', async ({ page }) => {
await openSkills(page)
await upload(page, 'notes.zip', Buffer.from(zipSync({ 'README.md': strToU8('# Notes') })))
await expect(page.getByRole('alert')).toBeVisible()
- await expect(page.locator('[data-skill]')).toHaveCount(0)
+ await expect(page.locator('[data-item]')).toHaveCount(0)
})
diff --git a/tests/e2e/settings/tool-access.spec.ts b/tests/e2e/settings/tool-access.spec.ts
index 3ccf6802c..04ddb5486 100644
--- a/tests/e2e/settings/tool-access.spec.ts
+++ b/tests/e2e/settings/tool-access.spec.ts
@@ -1,42 +1,53 @@
-import { expect, test } from '@playwright/test'
+import { expect, test, type Page } from '@playwright/test'
import { CanvasHelper } from '#tests/helpers/canvas'
+async function openSection(page: Page, name: string, phone: boolean) {
+ await page.keyboard.press(process.platform === 'darwin' ? 'Meta+,' : 'Control+,')
+ if (phone) {
+ await page.getByRole('combobox', { name: 'Settings', exact: true }).click()
+ await page.getByRole('option', { name, exact: true }).click()
+ } else await page.getByRole('tab', { name, exact: true }).click()
+}
+
for (const width of [1280, 390]) {
- test(`AI and MCP tool settings remain independent across reload at ${width}px`, async ({
+ test(`the AI's tools on Tool access and MCP's on the MCP page stay independent at ${width}px`, async ({
page
}) => {
+ const phone = width < 640
await page.setViewportSize({ width, height: 900 })
await page.goto('/?test')
const canvas = new CanvasHelper(page)
await canvas.waitForInit()
- async function open() {
- await page.keyboard.press(process.platform === 'darwin' ? 'Meta+,' : 'Control+,')
- if (width < 640) {
- await page.getByRole('combobox', { name: 'Settings', exact: true }).click()
- await page.getByRole('option', { name: 'Tool access', exact: true }).click()
- } else await page.getByRole('tab', { name: 'Tool access', exact: true }).click()
- }
- await open()
const search = page.getByRole('searchbox', { name: 'Search tools' })
const create = page.getByRole('switch', { name: 'create_component', exact: true })
+
+ // The built-in AI starts without it; the local MCP server offers it.
+ await openSection(page, 'Tool access', phone)
await search.fill('create_component')
await expect(create).toHaveAttribute('data-state', 'unchecked')
await create.click()
- await page.getByRole('button', { name: 'Local MCP', exact: true }).click()
- await expect(search).toHaveValue('create_component')
+ await page.keyboard.press('Escape')
+
+ await openSection(page, 'MCP', phone)
+ await page.getByTestId('settings-mcp-tool-access').click()
+ await search.fill('create_component')
await expect(create).toHaveAttribute('data-state', 'checked')
await create.click()
- await page.getByRole('button', { name: 'Built-in AI', exact: true }).click()
- await expect(create).toHaveAttribute('data-state', 'checked')
+ await page.keyboard.press('Escape')
+
await page.reload()
await canvas.waitForInit()
- await open()
+ await openSection(page, 'Tool access', phone)
await search.fill('create_component')
await expect(create).toHaveAttribute('data-state', 'checked')
await page.getByRole('button', { name: 'Restore defaults' }).click()
await expect(create).toHaveAttribute('data-state', 'unchecked')
- await page.getByRole('button', { name: 'Local MCP', exact: true }).click()
+ await page.keyboard.press('Escape')
+
+ await openSection(page, 'MCP', phone)
+ await page.getByTestId('settings-mcp-tool-access').click()
+ await search.fill('create_component')
await expect(create).toHaveAttribute('data-state', 'unchecked')
await page.getByRole('button', { name: 'Restore defaults' }).click()
await expect(create).toHaveAttribute('data-state', 'checked')
diff --git a/tests/e2e/storybook/controls.spec.ts b/tests/e2e/storybook/controls.spec.ts
index edd9c2893..9d7f8988d 100644
--- a/tests/e2e/storybook/controls.spec.ts
+++ b/tests/e2e/storybook/controls.spec.ts
@@ -19,7 +19,7 @@ const stories = [
'design-system-navigation-tabs--constrained-labels',
'design-system-layout-collapsible--collapsed',
'design-system-inputs-preset-number--custom-selected',
- 'app-settings-tool-access-list--mixed-access',
+ 'app-settings-capability-list--mixed-access',
'app-settings-mcp-failure-alert--all-reasons'
]
diff --git a/tests/engine/app/editor/vectorize/providers.test.ts b/tests/engine/app/editor/vectorize/providers.test.ts
deleted file mode 100644
index ccc6176ce..000000000
--- a/tests/engine/app/editor/vectorize/providers.test.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { describe, expect, spyOn, test } from 'bun:test'
-
-import {
- extractVectorizedSVGURL,
- getVectorizeProvider,
- validateVectorizedAssetURL
-} from '@/app/editor/vectorize/providers'
-import { appCredentialRefs } from '@/app/settings/credentials/persistence'
-import { credentialKey } from '@/app/settings/credentials/reference'
-
-import { fetchStub } from '#tests/helpers/fetch'
-
-describe('vectorization providers', () => {
- test('extracts supported nested SVG response URLs', () => {
- expect(extractVectorizedSVGURL({ image: { url: 'https://cdn.recraft.ai/a.svg' } })).toBe(
- 'https://cdn.recraft.ai/a.svg'
- )
- expect(extractVectorizedSVGURL({ data: [{ url: 'https://v3.fal.media/a.svg' }] })).toBe(
- 'https://v3.fal.media/a.svg'
- )
- expect(extractVectorizedSVGURL({ data: { image: { url: 'https://fal.media/a.svg' } } })).toBe(
- 'https://fal.media/a.svg'
- )
- })
-
- test('allows only provider-owned HTTPS asset hosts', () => {
- expect(validateVectorizedAssetURL('recraft', 'https://cdn.recraft.ai/a.svg').hostname).toBe(
- 'cdn.recraft.ai'
- )
- expect(validateVectorizedAssetURL('fal', 'https://v3.fal.media/a.svg').hostname).toBe(
- 'v3.fal.media'
- )
- expect(() => validateVectorizedAssetURL('recraft', 'https://example.com/a.svg')).toThrow(
- 'untrusted'
- )
- expect(() => validateVectorizedAssetURL('fal', 'http://fal.media/a.svg')).toThrow('untrusted')
- })
-
- test('rejects redirects from trusted asset hosts to untrusted hosts', async () => {
- let requestCount = 0
- const fetchSpy = spyOn(globalThis, 'fetch').mockImplementation(
- fetchStub(async () => {
- requestCount += 1
- if (requestCount === 1) {
- return Response.json({ image: { url: 'https://cdn.recraft.ai/result.svg' } })
- }
- const response = new Response('<svg xmlns="http://www.w3.org/2000/svg"/>', {
- headers: { 'content-type': 'image/svg+xml' }
- })
- Object.defineProperty(response, 'url', { value: 'https://example.com/result.svg' })
- return response
- })
- )
-
- try {
- await expect(
- getVectorizeProvider('recraft').vectorize(new Uint8Array([1, 2, 3]), 'secret')
- ).rejects.toThrow('untrusted')
- expect(requestCount).toBe(2)
- } finally {
- fetchSpy.mockRestore()
- }
- })
-
- test('includes vectorization keys in browser persistence changes', () => {
- const keys = appCredentialRefs().map(credentialKey)
- expect(keys).toContain('v1:vectorize-recraft:default:api-key')
- expect(keys).toContain('v1:vectorize-fal:default:api-key')
- })
-})
diff --git a/tests/engine/app/settings/ai-tool-access.test.ts b/tests/engine/app/settings/ai-tool-access.test.ts
index db11844aa..278bb8886 100644
--- a/tests/engine/app/settings/ai-tool-access.test.ts
+++ b/tests/engine/app/settings/ai-tool-access.test.ts
@@ -15,7 +15,6 @@ afterEach(() => {
aiToolOverrides.value = originalAI
disabledMCPTools.value = originalMCP
configurableMCPTools.value = originalCatalog
- useToolAccessSettings().selectTarget('ai')
})
test('AI catalog includes exposed extended tools while preserving compact defaults', () => {
@@ -61,30 +60,27 @@ test('AI catalog includes exposed extended tools while preserving compact defaul
)
})
-test('target switching, bulk changes and reset preserve independent permissions', () => {
+test('each kind of agent keeps its own permissions through bulk changes and reset', () => {
aiToolOverrides.value = {}
disabledMCPTools.value = ['create_component']
- const access = useToolAccessSettings()
- access.selectTarget('ai')
- expect(access.disabled.value).toContain('create_component')
- access.disabled.value = access.disabled.value.filter((name) => name !== 'create_component')
+ const ai = useToolAccessSettings('ai')
+ const mcp = useToolAccessSettings('mcp')
+ expect(ai.disabled.value).toContain('create_component')
+ ai.disabled.value = ai.disabled.value.filter((name) => name !== 'create_component')
expect(disabledAITools.value).not.toContain('create_component')
expect(disabledMCPTools.value).toEqual(['create_component'])
- access.selectTarget('mcp')
- access.reset()
+ mcp.reset()
expect(disabledMCPTools.value).toEqual([])
expect(disabledAITools.value).not.toContain('create_component')
- access.disabled.value = ['find_nodes']
- access.selectTarget('ai')
- access.reset()
+ mcp.disabled.value = ['find_nodes']
+ ai.reset()
expect(aiToolOverrides.value).toEqual({})
expect(disabledAITools.value).toContain('create_component')
expect(disabledMCPTools.value).toEqual(['find_nodes'])
})
test('disabling all AI tools is preserved and does not change MCP access', () => {
- const access = useToolAccessSettings()
- access.selectTarget('ai')
+ const access = useToolAccessSettings('ai')
access.disabled.value = configurableAITools.map((tool) => tool.name)
expect(enabledAIToolDefinitions(aiToolOverrides.value)).toEqual([])
})
diff --git a/tools/checks/i18n/mixed-script-baseline.txt b/tools/checks/i18n/mixed-script-baseline.txt
index d81caa118..454da5ff4 100644
--- a/tools/checks/i18n/mixed-script-baseline.txt
+++ b/tools/checks/i18n/mixed-script-baseline.txt
@@ -91,7 +91,6 @@ ja:automation.bearerAuthentication
ja:automation.bearerToken
ja:automation.bearerTokenPlaceholder
ja:automation.bearerTokenRequired
-ja:automation.builtInAI
ja:automation.connectionNameHint
ja:automation.connectionNameInvalid
ja:automation.connections
@@ -100,7 +99,6 @@ ja:automation.deleteConnectionDescription
ja:automation.description
ja:automation.editConnection
ja:automation.enableConnection
-ja:automation.localMCP
ja:automation.localServerDesktopOnly
ja:automation.mcpFailureExited
ja:automation.mcpFailureMalformed
@@ -122,7 +120,6 @@ ja:automation.rootDirectoryDescription
ja:automation.selectionScopeDescription
ja:automation.serverURL
ja:automation.serverURLHint
-ja:automation.toolAccessDescription
ja:automation.toolsRestartNotice
ja:automation.webmcpDescription
ja:automation.webmcpFailed
@@ -316,7 +313,6 @@ zh-cn:automation.bearerAuthentication
zh-cn:automation.bearerToken
zh-cn:automation.bearerTokenPlaceholder
zh-cn:automation.bearerTokenRequired
-zh-cn:automation.builtInAI
zh-cn:automation.connectionNameHint
zh-cn:automation.connectionNameInvalid
zh-cn:automation.connections
@@ -325,7 +321,6 @@ zh-cn:automation.deleteConnectionDescription
zh-cn:automation.description
zh-cn:automation.editConnection
zh-cn:automation.enableConnection
-zh-cn:automation.localMCP
zh-cn:automation.localServerDesktopOnly
zh-cn:automation.mcpFailureExited
zh-cn:automation.mcpFailureMalformed
@@ -347,7 +342,6 @@ zh-cn:automation.rootDirectoryDescription
zh-cn:automation.selectionScopeDescription
zh-cn:automation.serverURL
zh-cn:automation.serverURLHint
-zh-cn:automation.toolAccessDescription
zh-cn:automation.toolsRestartNotice
zh-cn:automation.webmcpDescription
zh-cn:automation.webmcpFailed
@@ -568,8 +562,6 @@ ja:ai.connectionTestCloudCreditsExhausted
zh-cn:ai.chatCloudAllowanceUsed
zh-cn:ai.chatCloudAllowanceUsedUntil
zh-cn:ai.connectionTestCloudCreditsExhausted
-ja:ai.skillsUploadedSourceDescription
-ja:ai.skillsAgentsSourceDescription
ja:ai.skillsClaudeSource
ja:ai.skillsUploadTooLarge
ja:ai.skillsUploadNoSkill
@@ -582,8 +574,6 @@ ja:ai.skillErrorNoFrontmatter
ja:ai.skillErrorInvalidFrontmatter
ja:ai.skillErrorNoDescription
ja:ai.skillErrorNoName
-zh-cn:ai.skillsUploadedSourceDescription
-zh-cn:ai.skillsAgentsSourceDescription
zh-cn:ai.skillsClaudeSource
zh-cn:ai.skillsUploadTooLarge
zh-cn:ai.skillsUploadNoSkill
@@ -601,3 +591,5 @@ ja:ai.skillsTrustDescription
zh-cn:ai.skillsTrustDescription
zh-cn:ai.queueMessage
ja:ai.queueMessage
+ja:ai.skillsDescription
+zh-cn:ai.skillsDescription
diff --git a/tools/checks/test-homes/engine-baseline.txt b/tools/checks/test-homes/engine-baseline.txt
index c4a561df2..b0857bf3a 100644
--- a/tools/checks/test-homes/engine-baseline.txt
+++ b/tools/checks/test-homes/engine-baseline.txt
@@ -61,7 +61,6 @@ tests/engine/app/editor/preparation/multi-tab.test.ts
tests/engine/app/editor/selection/focus.test.ts
tests/engine/app/editor/store-path.test.ts
tests/engine/app/editor/variables.test.ts
-tests/engine/app/editor/vectorize/providers.test.ts
tests/engine/app/external-link.test.ts
tests/engine/app/font-loading.test.ts
tests/engine/app/integrations/mcp-connections.test.ts