@kevludwig/eve-lexware-office 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ import { saveWarnings } from "../lib/findings.mjs";
9
9
  import { readJournal, writeJournal } from "../lib/journal.mjs";
10
10
  import { rememberShownContacts, shownContactsOf } from "../lib/state.mjs";
11
11
  import { z } from "zod";
12
- import { createCustomer, describeError, findContactsByName } from "@kevludwig/lexware-office";
12
+ import { MIN_NAME_SEARCH_LENGTH, createCustomer, describeError, findContactsByName } from "@kevludwig/lexware-office";
13
13
  import { defineTool } from "eve/tools";
14
14
  const inputSchema = z.object({
15
15
  company_name: z.string().trim().min(1).max(255).optional().describe("Firmenname inkl. Rechtsform — entweder dieser oder last_name"),
@@ -32,6 +32,15 @@ var create_customer_default = defineTool({
32
32
  const name = nameOf(ctx.toolInput ?? {});
33
33
  if (!name) return "user-approval";
34
34
  const findings = [];
35
+ if (name.trim().length < MIN_NAME_SEARCH_LENGTH) {
36
+ findings.push({
37
+ kind: "note",
38
+ title: "⚠ Name zu kurz für die Suche",
39
+ value: `Ähnliche Kontakte ungeprüft (Lexware sucht ab ${MIN_NAME_SEARCH_LENGTH} Zeichen).`
40
+ });
41
+ saveWarnings(ctx.callId, findings);
42
+ return "user-approval";
43
+ }
35
44
  try {
36
45
  const similar = await findContactsByName(client(), name, {
37
46
  size: 5,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevludwig/eve-lexware-office",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "eve": {
6
6
  "extension": {
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@vercel/blob": "^2.8.0",
26
26
  "zod": "4.5.4",
27
- "@kevludwig/lexware-office": "0.1.1"
27
+ "@kevludwig/lexware-office": "0.1.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "24.x",