From 622f0ddc8a67ade17d97ee401d5755467a412928 Mon Sep 17 00:00:00 2001 From: can1357 Date: Mon, 8 Jun 2026 03:12:28 +0200 Subject: [PATCH] tests(coding-agent): updated keyword comments to workflowz - Aligned doc comments and tests with the workflowz trigger rename. --- packages/coding-agent/src/modes/components/custom-editor.ts | 2 +- packages/coding-agent/src/modes/components/user-message.ts | 2 +- packages/coding-agent/src/modes/magic-keywords.ts | 2 +- packages/coding-agent/src/modes/markdown-prose.ts | 2 +- packages/coding-agent/test/modes/magic-keywords.test.ts | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/coding-agent/src/modes/components/custom-editor.ts b/packages/coding-agent/src/modes/components/custom-editor.ts index 29cf64772..f0742da2e 100644 --- a/packages/coding-agent/src/modes/components/custom-editor.ts +++ b/packages/coding-agent/src/modes/components/custom-editor.ts @@ -76,7 +76,7 @@ export function extractBracketedImagePastePath(data: string): string | undefined export class CustomEditor extends Editor { imageLinks?: readonly (string | undefined)[]; - /** Gradient-highlight the "ultrathink" / "orchestrate" / "workflow" keywords as the user types + /** Gradient-highlight the "ultrathink" / "orchestrate" / "workflowz" keywords as the user types * them, skipping any occurrence inside code spans, fenced blocks, or XML sections. Also make * pasted image placeholders visually distinct and hyperlink them once their blob file exists. */ decorateText = (text: string): string => diff --git a/packages/coding-agent/src/modes/components/user-message.ts b/packages/coding-agent/src/modes/components/user-message.ts index e393a4ef3..6a1c8e81c 100644 --- a/packages/coding-agent/src/modes/components/user-message.ts +++ b/packages/coding-agent/src/modes/components/user-message.ts @@ -15,7 +15,7 @@ export class UserMessageComponent extends Container { constructor(text: string, synthetic = false, imageLinks?: readonly (string | undefined)[]) { super(); const bgColor = (value: string) => theme.bg("userMessageBg", value); - // Paint the magic keywords ("ultrathink"/"orchestrate"/"workflow") inside the rendered + // Paint the magic keywords ("ultrathink"/"orchestrate"/"workflowz") inside the rendered // bubble too — matching the live editor glow. The Markdown component routes code spans and // fenced blocks through its own code styling (never `color`), so those are already excluded; // `highlightMagicKeywords` additionally restores the bubble's own foreground after each diff --git a/packages/coding-agent/src/modes/magic-keywords.ts b/packages/coding-agent/src/modes/magic-keywords.ts index adbb0dbbd..d50d4bd39 100644 --- a/packages/coding-agent/src/modes/magic-keywords.ts +++ b/packages/coding-agent/src/modes/magic-keywords.ts @@ -4,7 +4,7 @@ import { highlightWorkflow } from "./workflow"; /** * Gradient-highlight every magic keyword ("ultrathink", "orchestrate", - * "workflow") that appears as standalone prose, skipping any occurrence inside a + * "workflowz") that appears as standalone prose, skipping any occurrence inside a * code block, inline code span, or XML/HTML section. Each highlighter paints its * own keyword with its own gradient, so chaining is order-independent — the * earlier passes only inject zero-width SGR escapes (no backticks or angle diff --git a/packages/coding-agent/src/modes/markdown-prose.ts b/packages/coding-agent/src/modes/markdown-prose.ts index 10459a1ad..1037c7565 100644 --- a/packages/coding-agent/src/modes/markdown-prose.ts +++ b/packages/coding-agent/src/modes/markdown-prose.ts @@ -1,6 +1,6 @@ /** * Markdown structure awareness for the magic-keyword affordances - * ("ultrathink"/"orchestrate"/"workflow"). + * ("ultrathink"/"orchestrate"/"workflowz"). * * Keyword detection and editor/transcript highlighting must fire only on prose * the user is actually addressing to the model — never on a word that happens to diff --git a/packages/coding-agent/test/modes/magic-keywords.test.ts b/packages/coding-agent/test/modes/magic-keywords.test.ts index 8abd4977f..96a9858d1 100644 --- a/packages/coding-agent/test/modes/magic-keywords.test.ts +++ b/packages/coding-agent/test/modes/magic-keywords.test.ts @@ -9,21 +9,21 @@ beforeAll(async () => { describe("highlightMagicKeywords", () => { it("paints every magic keyword in a single prose pass, preserving visible text", () => { - const input = "first ultrathink then orchestrate the workflow"; + const input = "first ultrathink then orchestrate the workflowz"; const decorated = highlightMagicKeywords(input); expect(decorated).not.toBe(input); expect(decorated).toContain("\x1b[38"); expect(Bun.stripANSI(decorated)).toBe(input); // Each keyword is gradient-painted character-by-character, so none survives as a // contiguous run in the decorated output. - for (const keyword of ["ultrathink", "orchestrate", "workflow"]) { + for (const keyword of ["ultrathink", "orchestrate", "workflowz"]) { expect(decorated).not.toContain(keyword); expect(Bun.stripANSI(decorated)).toContain(keyword); } }); it("never paints keywords inside code spans, fenced blocks, or XML sections", () => { - const input = "`ultrathink`\n```\norchestrate\n```\nworkflow"; + const input = "`ultrathink`\n```\norchestrate\n```\nworkflowz"; expect(highlightMagicKeywords(input)).toBe(input); });