@g9tm/aiassistant-svelte 1.4.1 → 1.5.0

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.
@@ -2,7 +2,7 @@
2
2
  // The approval card: facts, before and after, step ticks (unticking a step unticks what depends on it), the method
3
3
  // (click, PinPad, code), the taint warning. Confirming always goes through the core, bound to the plan's hash.
4
4
  import type { PlanView } from "@g9tm/aiassistant";
5
- import { needsCode } from "@g9tm/aiassistant";
5
+ import { needsCode, REMOTE_EXPIRED } from "@g9tm/aiassistant";
6
6
  import { pageTexts } from "@g9tm/aiassistant/pages";
7
7
  import { cls, override, useUi } from "../context.js";
8
8
  import PinPad from "../slots/PinPad.svelte";
@@ -20,7 +20,7 @@
20
20
 
21
21
  async function confirm(): Promise<void> {
22
22
  busy = true;
23
- await ui.assistant.confirm(plan.id, needsCode(plan.method) ? code : null);
23
+ await ui.assistant.confirm(plan.id, needsCode(plan.method) || (plan.failCode === REMOTE_EXPIRED && code.length > 0) ? code : null); // after the phone ran out, a code may stand in
24
24
  code = "";
25
25
  busy = false;
26
26
  }
@@ -42,7 +42,7 @@
42
42
  {/each}
43
43
  </ol>
44
44
  {#if plan.answered === null}
45
- {#if needsCode(plan.method)}
45
+ {#if needsCode(plan.method) || plan.failCode === REMOTE_EXPIRED}
46
46
  <Pin bind:value={code} label={t("card.code")} />
47
47
  {/if}
48
48
  {#if plan.failCode === "confirm.waiting"}<p class="g9a-note" role="status">{t("card.waiting")}</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/aiassistant-svelte",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Svelte 5 components for the G9 AI assistant, fully customisable (layouts, tokens, per-part classes, overrides, parts).",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@g9tm/aiassistant": "1.4.1"
34
+ "@g9tm/aiassistant": "1.5.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@sveltejs/package": "2.5.8",