The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tui): bare /personality lists through the owner's /personality handler
Teknium74e6dab05272
diff --git a/ui-tui/src/__tests__/canonicalSlashCommands.test.ts b/ui-tui/src/__tests__/canonicalSlashCommands.test.tsindex c1bf1f3d05d..524d84dbaff 100644--- a/ui-tui/src/__tests__/canonicalSlashCommands.test.ts+++ b/ui-tui/src/__tests__/canonicalSlashCommands.test.ts@@ -77,6 +77,10 @@ function harness() {return { output: 'Session: owner' }}+ if (method === 'slash.exec' && params.command === 'personality') {+ return { type: 'exec', output: '🎭 **Available Personalities**' }+ }+if (method === 'slash.exec' && params.command === 'voice tts') {return { type: 'exec', output: 'Auto-TTS enabled.' }}@@ -255,6 +259,16 @@ it('/voice tts sets the session\'s voice state through the owner\'s /voice handlexpect(sys.mock.calls.map(([text]) => String(text))).toEqual(['Auto-TTS enabled.'])})+it('bare /personality lists through the owner\'s /personality handler', async () => {+ const { request, slash, sys } = harness()++ slash('/personality')+ await flush()++ expect(request).toHaveBeenCalledWith('slash.exec', { command: 'personality', session_id: 'owner' })+ expect(sys.mock.calls.map(([text]) => String(text))).toEqual(['🎭 **Available Personalities**'])+})+it('/personality <name> is the owner\'s config.set like main', async () => {const { request, slash, sys } = harness()diff --git a/ui-tui/src/app/slash/commands/session.ts b/ui-tui/src/app/slash/commands/session.tsindex 281d18f2ae6..8cd93be1d49 100644--- a/ui-tui/src/app/slash/commands/session.ts+++ b/ui-tui/src/app/slash/commands/session.ts@@ -257,6 +257,14 @@ export const sessionCommands: SlashCommand[] = [help: 'switch personality for this session',name: 'personality',run: (arg, ctx) => {+ // The bare form is the owner's /personality listing (one behaviour on every surface).+ if (!arg && ctx.gateway.gw?.isCanonical) {+ return ctx.gateway.gw+ .request<SlashExecResponse>('slash.exec', { command: 'personality', session_id: ctx.sid })+ .then(ctx.guarded<SlashExecResponse>(r => r.output && ctx.transcript.sys(r.output)))+ .catch(ctx.guardedErr)+ }+if (!arg) {return}diff --git a/website/docs/developer-guide/gateway-command-parity.md b/website/docs/developer-guide/gateway-command-parity.mdindex 3e4aca6dfe7..a9ece8b5190 100644--- a/website/docs/developer-guide/gateway-command-parity.md+++ b/website/docs/developer-guide/gateway-command-parity.md@@ -77,7 +77,7 @@ handler does; `client-local (cli_only)` commands are terminal/UI features of a c| `/palette` | refused | refused: not available yet | slash.exec: refused | slash.exec: refused | refused | client-local (cli_only) || `/paste` | refused | refused: not available yet | local | unavailable: terminal | refused | client-local (cli_only) || `/pause` | refused | refused: not available yet | slash.exec: refused | slash.exec: refused | refused | messaging-only |-| `/personality` | control | slash.exec | config.set | slash.exec | refused | per-session setting (gateway handler) |+| `/personality` | control | slash.exec | canonical route | slash.exec | refused | per-session setting (gateway handler) || `/pet` | refused | refused: not available yet | slash.exec | action: pet | refused | client-local (cli_only) || `/plan` | control | slash.exec | slash.exec | slash.exec | refused | || `/platform` | refused | refused: not available yet | slash.exec: refused | slash.exec: refused | refused | messaging adapters; `pause`/`resume` mutate them |