update
Some checks failed
CI / check (push) Has been cancelled

This commit is contained in:
2026-06-22 06:14:29 +02:00
parent fb4018336f
commit 7f5d1a0d03

View File

@@ -18,11 +18,11 @@ export interface Toast { id: number; title: string; ref?: string }
/** Build the exact text inserted into the agent for a "Pass on …" action. /** Build the exact text inserted into the agent for a "Pass on …" action.
* - Plain reference / name → `note => thing` (or just `thing` with no note). * - Plain reference / name → `note => thing` (or just `thing` with no note).
* - Selected code → `note [ref](ref)` followed by the code in a fenced block. */ * - Selected code → `note ref` followed by the code in a fenced block. */
export function buildPass(note: string, ref: string, code?: string): string { export function buildPass(note: string, ref: string, code?: string): string {
const n = note.trim() const n = note.trim()
if (code != null) { if (code != null) {
const head = (n ? n + ' ' : '') + `[${ref}](${ref})` const head = (n ? n + ' ' : '') + ref
return head + '\n```\n' + code + '\n```' return head + '\n```\n' + code + '\n```'
} }
return n ? `${n} => ${ref}` : ref return n ? `${n} => ${ref}` : ref