fix: prioritize selected claw shortcut

This commit is contained in:
134 2026-06-28 10:35:14 +08:00
parent e76c983e64
commit 1d0af8c2d8

View File

@ -4868,12 +4868,8 @@ export function CanvasChatPanel({
? { ? {
...session, ...session,
mode, mode,
clawdSkillTagId: clawdSkillTagId: null,
mode === "clawd" ? session.clawdSkillTagId || null : null, clawdSkillTagPromptApplied: false,
clawdSkillTagPromptApplied:
mode === "clawd"
? session.clawdSkillTagPromptApplied === true
: false,
updatedAt: Date.now(), updatedAt: Date.now(),
} }
: session : session
@ -9847,9 +9843,10 @@ export function CanvasChatPanel({
const textContent = normalizeClawdComposerText(input); const textContent = normalizeClawdComposerText(input);
const tableFilesSnapshot = [...clawdTableFiles]; const tableFilesSnapshot = [...clawdTableFiles];
const hasTableFiles = tableFilesSnapshot.length > 0; const hasTableFiles = tableFilesSnapshot.length > 0;
const clawdSkillTagForRequest = activeClawdSkillTag || selectedSkillTag; const clawdSkillTagForRequest = selectedSkillTag || activeClawdSkillTag;
const shouldIncludeClawdSkillTagPrompt = Boolean( const shouldIncludeClawdSkillTagPrompt = Boolean(
clawdSkillTagForRequest && !activeClawdSkillTagPromptApplied clawdSkillTagForRequest &&
(selectedSkillTag || !activeClawdSkillTagPromptApplied)
); );
const clawdSkillTagPrompt = shouldIncludeClawdSkillTagPrompt const clawdSkillTagPrompt = shouldIncludeClawdSkillTagPrompt
? buildClawdSkillTagPrompt(clawdSkillTagForRequest) ? buildClawdSkillTagPrompt(clawdSkillTagForRequest)