diff --git a/packages/kilo-vscode/src/shared/injected-prompt.ts b/packages/kilo-vscode/src/shared/injected-prompt.ts index cd893dc083b..66d7b57e575 100644 --- a/packages/kilo-vscode/src/shared/injected-prompt.ts +++ b/packages/kilo-vscode/src/shared/injected-prompt.ts @@ -68,7 +68,11 @@ const SCHEDULED = [ function scheduled(body: string): InjectedView | undefined { const hit = SCHEDULED.find((item) => body.startsWith(item.tag)) if (!hit) return undefined - const first = body.slice(hit.tag.length).trim().split(/\n\s*\n/, 1)[0]?.trim() + const first = body + .slice(hit.tag.length) + .trim() + .split(/\n\s*\n/, 1)[0] + ?.trim() return { label: hit.label, preview: first || undefined } } diff --git a/packages/kilo-vscode/webview-ui/src/components/chat/VscodeUserMessage.tsx b/packages/kilo-vscode/webview-ui/src/components/chat/VscodeUserMessage.tsx index 2e73f483ad0..faac1d651c7 100644 --- a/packages/kilo-vscode/webview-ui/src/components/chat/VscodeUserMessage.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/chat/VscodeUserMessage.tsx @@ -36,7 +36,8 @@ export const VscodeUserMessage: Component = (props) => { const text = createMemo(() => props.parts.find( (part): part is TextPart => - part.type === "text" && (!part.synthetic || (part.metadata as { wakeup?: unknown } | undefined)?.wakeup === true), + part.type === "text" && + (!part.synthetic || (part.metadata as { wakeup?: unknown } | undefined)?.wakeup === true), ), ) const attribution = createMemo(() => text()?.text.match(ATTRIBUTION)?.[1])