From aabbaa2eca200f5bd3b53d91b1b3edfdd5fd4b11 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 22 Jul 2024 18:52:54 +0100 Subject: [PATCH] bugfix --- src/lib/ai-extract.mjs | 4 ++-- src/static/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ai-extract.mjs b/src/lib/ai-extract.mjs index db06cba..03b125f 100644 --- a/src/lib/ai-extract.mjs +++ b/src/lib/ai-extract.mjs @@ -7,7 +7,7 @@ const prompt = `The input is a receipt, invoice or parking/bus ticket. The user date (string): the date the item was purchased, formatted as an iso date. If not present, set this value to null. If there are both an invoice date and an order date available, pick the order date. -item_name (string): The name of the item purchased. Where there are multiple items, summarise them with a single name. Shorten excessively long product names. +item_name (string): The name of the item purchased. Where there are multiple items, summarise them with a single name. Summarise excessively long product names. paid (number): The total amount that was paid @@ -61,4 +61,4 @@ export default async function ai_extract(text, pretend=false) { console.log(`--------------------------------------`); return parse_result(obj); -} \ No newline at end of file +} diff --git a/src/static/index.js b/src/static/index.js index 806c99c..68973a1 100644 --- a/src/static/index.js +++ b/src/static/index.js @@ -134,7 +134,7 @@ function handle_add_row(event) { function rewrite_indices() { const els = [...document.querySelectorAll(".index")]; for(const i in els) { - els[i].textContent = `${i}`; + els[i].textContent = `${i+1}`; } }