fix: remove remaining workflow invoke surfaces
This commit is contained in:
@@ -79,7 +79,7 @@ message: string,
|
||||
*/
|
||||
timestamp_ms: number, };
|
||||
|
||||
export type Segment = { "kind": "text", content: string, } | { "kind": "paste", id: number, chars: number, lines: number, content: string, } | { "kind": "file_ref", path: string, } | { "kind": "knowledge_ref", slug: string, } | { "kind": "workflow_invoke", slug: string, } | { "kind": "unknown" };
|
||||
export type Segment = { "kind": "text", content: string, } | { "kind": "paste", id: number, chars: number, lines: number, content: string, } | { "kind": "file_ref", path: string, } | { "kind": "knowledge_ref", slug: string, } | { "kind": "unknown" };
|
||||
|
||||
export type WorkerEvent = { "kind": "turn_ended", worker_name: string, } | { "kind": "errored", worker_name: string, message: string, } | { "kind": "shut_down", worker_name: string, } | { "kind": "scope_sub_delegated",
|
||||
/**
|
||||
|
||||
@@ -24,8 +24,7 @@ Deno.test("parseSigilSegments converts TUI-style references", () => {
|
||||
{ kind: "file_ref", path: "src/main.rs" },
|
||||
{ kind: "text", content: " then " },
|
||||
{ kind: "knowledge_ref", slug: "memory" },
|
||||
{ kind: "text", content: " and " },
|
||||
{ kind: "workflow_invoke", slug: "workflow" },
|
||||
{ kind: "text", content: " and /workflow" },
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ function invalidUsage(name: string): ComposerCommandResult {
|
||||
|
||||
export function parseSigilSegments(input: string): Segment[] {
|
||||
const segments: Segment[] = [];
|
||||
const pattern = /(^|\s)([@#/])([^\s]+)/g;
|
||||
const pattern = /(^|\s)([@#])([^\s]+)/g;
|
||||
let cursor = 0;
|
||||
let match: RegExpExecArray | null;
|
||||
while ((match = pattern.exec(input)) !== null) {
|
||||
@@ -187,8 +187,6 @@ function sigilSegment(sigil: string, value: string): Segment {
|
||||
return { kind: "file_ref", path: value };
|
||||
case "#":
|
||||
return { kind: "knowledge_ref", slug: value };
|
||||
case "/":
|
||||
return { kind: "workflow_invoke", slug: value };
|
||||
default:
|
||||
return { kind: "text", content: `${sigil}${value}` };
|
||||
}
|
||||
|
||||
@@ -319,8 +319,6 @@ export function segmentsToText(segments: Segment[]): string {
|
||||
return `@file ${segment.path}`;
|
||||
case "knowledge_ref":
|
||||
return `@knowledge ${segment.slug}`;
|
||||
case "workflow_invoke":
|
||||
return `/${segment.slug}`;
|
||||
case "unknown":
|
||||
return "[unknown segment]";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user