From 3ddaffb90cfccd9c7fff4436dbc4cdc76d5c8b3e Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 25 Jun 2026 16:16:58 +0100 Subject: [PATCH] refac --- cptr/frontend/src/routes/+page.svelte | 2 +- cptr/utils/chat_task.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cptr/frontend/src/routes/+page.svelte b/cptr/frontend/src/routes/+page.svelte index 1273073..d2cb08a 100644 --- a/cptr/frontend/src/routes/+page.svelte +++ b/cptr/frontend/src/routes/+page.svelte @@ -341,7 +341,7 @@ }); } else if (workspacePath && workspacePath === lastLoadedPath) { // Same workspace — process intents immediately - processIntentParams(); + if (get(currentWorkspace)?.path === workspacePath) processIntentParams(); } else if (!workspacePath) { lastLoadedPath = null; currentWorkspace.set(null); diff --git a/cptr/utils/chat_task.py b/cptr/utils/chat_task.py index adcb7ba..fc61f6a 100644 --- a/cptr/utils/chat_task.py +++ b/cptr/utils/chat_task.py @@ -1213,7 +1213,8 @@ async def run_chat_task( import re as _re mentioned = _re.findall( - r"\$([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)", last_user["content"] + r"\$([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)", + _plain_message_text(last_user.get("content")), ) skill_names = {s.name for s in skills} attached_skill_ids = [m for m in mentioned if m in skill_names]