chore(vscode): format scheduled prompt label changes

This commit is contained in:
Bruno Agatao
2026-10-12 13:44:15 +02:00
parent 5d61e1ed9b
commit 346e7e6372
2 changed files with 7 additions and 2 deletions
@@ -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 }
}
@@ -36,7 +36,8 @@ export const VscodeUserMessage: Component<VscodeUserMessageProps> = (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])