This commit is contained in:
seb
2026-10-16 14:32:10 +02:00
parent a592cc30f6
commit 5c57097ad0
4 changed files with 136 additions and 5 deletions

View File

@@ -331,9 +331,13 @@ const actions = {
/**
* Stage an extracted text snippet (e.g. from an invoice or delivery document) as a pill.
* @param {{ text: string, label?: string }} snippet
* @param {{ text: string, label?: string, instruction?: string }} snippet
*/
insertExtractionSnippet({ text = '', label = 'parsed invoice' } = {}) {
insertExtractionSnippet({
text = '',
label = 'parsed invoice',
instruction = "use 'Process Incoming Product and Invoices' SKILL to fill drafts/delivery vfs file",
} = {}) {
const trimmed = String(text || '').trim();
if (!trimmed) return;
chatOpenedThisSession = true;
@@ -343,6 +347,7 @@ const actions = {
pendingExtraction: {
text: trimmed,
label: label || 'parsed invoice',
instruction: instruction || "use 'Process Incoming Product and Invoices' SKILL to fill drafts/delivery vfs file",
},
});
ensureCompanyEventsConnected();