opencode-webui 1.0.5 → 1.0.6

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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Web UI for the OpenCode coding agent — chat, streaming, tool cards, and extensions over the OpenCode engine's HTTP API.",
4
4
  "private": false,
5
5
  "type": "module",
6
- "version": "1.0.5",
6
+ "version": "1.0.6",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
package/server/index.ts CHANGED
@@ -605,9 +605,20 @@ const server: Server<Record<string, unknown>> = Bun.serve({
605
605
  return new Response("not found", { status: 404 });
606
606
  }
607
607
  const file = Bun.file(resolved);
608
- if (await file.exists()) return new Response(file);
608
+ if (await file.exists()) {
609
+ // Hashed assets are immutable; anything NOT hash-named (index.html,
610
+ // SPA fallbacks, favicon) must be revalidated — a cached index.html
611
+ // pins the browser to a stale bundle after every update.
612
+ const immutable = /-[A-Za-z0-9_-]{8}\.[a-z0-9]+$/.test(filePath);
613
+ return new Response(file, {
614
+ headers: {
615
+ "cache-control": immutable ? "public, max-age=31536000, immutable" : "no-store",
616
+ },
617
+ });
618
+ }
609
619
  const index = Bun.file(DIST_DIR + "index.html");
610
- if (await index.exists()) return new Response(index);
620
+ if (await index.exists())
621
+ return new Response(index, { headers: { "cache-control": "no-store" } });
611
622
  }
612
623
  return new Response("not found", { status: 404 });
613
624
  }
@@ -11,7 +11,7 @@ service credentials. One port for UI + `/api/*`: http://localhost:4097
11
11
  (`WEBUI_PROXY_PORT`).
12
12
 
13
13
  - **Repo**: https://github.com/AbdelftahZowail/opencode-webui
14
- - **This skill's version**: 1.0.5 (matches the `v1.0.5` git tag —
14
+ - **This skill's version**: 1.0.6 (matches the `v1.0.6` git tag —
15
15
  the file links below are pinned to it, so they always describe the code
16
16
  this skill was generated with)
17
17
  - **A running instance exposes its version** at `GET /api/webui/config` →
@@ -24,12 +24,12 @@ fetch the exact file at the pinned tag instead of reading a local clone:
24
24
 
25
25
  | File | Purpose |
26
26
  | --- | --- |
27
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/ui-extensions/README.md | Full authoring guide — the source of truth for kinds/hooks/regions |
28
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/src/extensions/registry.tsx | The slot registry — exact register() shapes per kind |
29
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/src/components/Composer.tsx | Where slash entries / prompt hooks / composer regions live |
30
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/src/components/MessageItem.tsx | Where message/message.decoration/message.part render |
31
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/src/lib/composerHandoff.ts | Type-anywhere → composer behavior (if your extension competes for keys) |
32
- | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.5/src/store.ts | The store — actions useStore exposes to extensions |
27
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/ui-extensions/README.md | Full authoring guide — the source of truth for kinds/hooks/regions |
28
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/src/extensions/registry.tsx | The slot registry — exact register() shapes per kind |
29
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/src/components/Composer.tsx | Where slash entries / prompt hooks / composer regions live |
30
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/src/components/MessageItem.tsx | Where message/message.decoration/message.part render |
31
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/src/lib/composerHandoff.ts | Type-anywhere → composer behavior (if your extension competes for keys) |
32
+ | https://raw.githubusercontent.com/AbdelftahZowail/opencode-webui/v1.0.6/src/store.ts | The store — actions useStore exposes to extensions |
33
33
 
34
34
  ## Environment
35
35