import { prompt } from "@oh-my-pi/pi-utils"; import workflowNoticeTemplate from "../prompts/system/workflow-notice.md" with { type: "text" }; import { createGradientHighlighter, type KeywordHighlighter } from "./gradient-highlight"; import { keywordInProse } from "./markdown-prose"; /** * "workflowz" keyword support. * * Typing the standalone word in the input editor paints it with a warm * amber→green gradient ({@link highlightWorkflow}); submitting a message that * mentions it appends a hidden workflow notice that steers the model to author * a deterministic multi-subagent workflow through the active task schema. * Matching is whitespace-delimited and case-sensitive (lowercase only) — * "workflowz" triggers, but "workflowzed", "Workflowz", and "workflowz.ts" * never do. */ // Detection: lowercase keyword flanked by whitespace or a string edge. Non-global so `.test` stays stateless. const WORKFLOW_WORD = /(? 30 + t * 120, });