From ccf4e8410c1a410ec15c707f5babc61a159a2165 Mon Sep 17 00:00:00 2001 From: snakajima Date: Sun, 22 Mar 2026 10:25:00 -0700 Subject: [PATCH 1/2] simplified general --- src/components/Sidebar.vue | 1 - src/composables/useUserPreferences.ts | 11 +++++++++-- src/config/roles.ts | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index a53fb6e..44cff78 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -431,7 +431,6 @@

This role uses a curated set of plugins optimized for its purpose. - Switch to General role to customize plugins.

r.id !== "general") + .map((r) => `- ${r.id}: ${r.name}`) + .join("\n") + : ""; + return `${role.prompt}${roleListText}\n${pluginPrompts}\n${customInstructionsText} The user's native language is ${getLanguageName(state.userLanguage)}.`; }; const buildTools = ({ startResponse }: BuildContext) => diff --git a/src/config/roles.ts b/src/config/roles.ts index df4d651..8d7b0fa 100644 --- a/src/config/roles.ts +++ b/src/config/roles.ts @@ -13,10 +13,11 @@ export const ROLES: Role[] = [ id: "general", name: "General", icon: "star", - includePluginPrompts: true, - pluginMode: "customizable", + includePluginPrompts: false, + pluginMode: "fixed", + availablePlugins: ["switchRole"], prompt: - "You are a teacher who explains various things in a way that even middle school students can easily understand. If the user is asking for stock price, browse Yahoo Finance page with the ticker symbol, such as https://finance.yahoo.com/quote/TSLA/ or https://finance.yahoo.com/quote/BTC-USD/.", + "You are a helpful assistant. Help the user pick the right role for their task by switching to the appropriate role using the switchRole tool.", }, { id: "tutor", From f2af2c2c927000f2007555aca2001434dda00f1b Mon Sep 17 00:00:00 2001 From: snakajima Date: Sun, 22 Mar 2026 10:41:20 -0700 Subject: [PATCH 2/2] roles --- src/composables/useTextSession.ts | 1 + src/composables/useUserPreferences.ts | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/composables/useTextSession.ts b/src/composables/useTextSession.ts index 4c66b38..0a1f874 100644 --- a/src/composables/useTextSession.ts +++ b/src/composables/useTextSession.ts @@ -74,6 +74,7 @@ export function useTextSession( const instructions = options.buildInstructions({ startResponse: startResponse.value, }); + console.log("[useTextSession] instructions:", instructions); if (instructions && instructions.trim()) { conversationMessages.value = [ diff --git a/src/composables/useUserPreferences.ts b/src/composables/useUserPreferences.ts index 8c82d9e..2ed548f 100644 --- a/src/composables/useUserPreferences.ts +++ b/src/composables/useUserPreferences.ts @@ -206,12 +206,10 @@ export function useUserPreferences(): UseUserPreferencesReturn { ? ` ${state.customInstructions}` : ""; const roleListText = - role.id === "general" - ? "\n\nAvailable roles you can switch to:\n" + - ROLES.filter((r) => r.id !== "general") - .map((r) => `- ${r.id}: ${r.name}`) - .join("\n") - : ""; + `\n\nYour current role is: ${role.id} (${role.name}). Available roles you can switch to:\n` + + ROLES.filter((r) => r.id !== role.id) + .map((r) => `- ${r.id}: ${r.name}`) + .join("\n"); return `${role.prompt}${roleListText}\n${pluginPrompts}\n${customInstructionsText} The user's native language is ${getLanguageName(state.userLanguage)}.`; };