@hienlh/ppm 0.17.45 → 0.17.47
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/CHANGELOG.md +28 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/cli-reference.md +4 -4
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/bun.lock +10 -10
- package/dist/web/assets/{ai-resource-editor-bKRP47RQ.js → ai-resource-editor-BywFZ8kq.js} +1 -1
- package/dist/web/assets/{audio-preview-DbvnEkRv.js → audio-preview-0l5TJLgd.js} +1 -1
- package/dist/web/assets/{chat-tab-B7M7IENk.js → chat-tab-DhE2XceO.js} +6 -6
- package/dist/web/assets/{code-editor-CyDEePNK.js → code-editor-BfuUP1De.js} +2 -2
- package/dist/web/assets/{conflict-editor-BDCVX1rJ.js → conflict-editor-B47yD0OS.js} +1 -1
- package/dist/web/assets/{csv-preview-DVkvCs_r.js → csv-preview-C7xm3SBD.js} +1 -1
- package/dist/web/assets/{database-viewer-DBhqh6Tz.js → database-viewer-C7IEdTpP.js} +1 -1
- package/dist/web/assets/{diff-viewer-Cz3oQoYm.js → diff-viewer-DRAU_SI7.js} +1 -1
- package/dist/web/assets/{docx-preview-Dyq1oJUo.js → docx-preview-BK7hQo6W.js} +1 -1
- package/dist/web/assets/{extension-webview-Cm1IeJIL.js → extension-webview-JK1Z7erV.js} +1 -1
- package/dist/web/assets/{git-log-panel-CLuZ_pOz.js → git-log-panel-D9Obmd3x.js} +1 -1
- package/dist/web/assets/{glide-data-grid-Br1FTMc6.js → glide-data-grid-cWxDaC9T.js} +1 -1
- package/dist/web/assets/{group-chat-tab-DammsouM.js → group-chat-tab-8lgr5lig.js} +1 -1
- package/dist/web/assets/{image-preview-CtOwlF9d.js → image-preview-BDJ5dspF.js} +1 -1
- package/dist/web/assets/index-6_hleyhK.css +2 -0
- package/dist/web/assets/{index-DD6twTiS.js → index-BN3MQIrY.js} +3 -3
- package/dist/web/assets/{keybindings-store-BzKxDV_N.js → keybindings-store-BohTqglo.js} +1 -1
- package/dist/web/assets/{markdown-renderer-MZwGAeBK.js → markdown-renderer-CzfDFcb9.js} +1 -1
- package/dist/web/assets/{markdown-renderer-CknfFAEU.js → markdown-renderer-DgfXiX1E.js} +1 -1
- package/dist/web/assets/{notification-store-CHFDRvsf.js → notification-store-D7YxkIs7.js} +1 -1
- package/dist/web/assets/{pdf-preview-DSitNXFC.js → pdf-preview-Bg5Df9YY.js} +1 -1
- package/dist/web/assets/{postgres-viewer-f91idZlH.js → postgres-viewer-C0ibwn7l.js} +1 -1
- package/dist/web/assets/{settings-tab-C-4pUp32.js → settings-tab-B0SUPLm8.js} +1 -1
- package/dist/web/assets/{sql-query-editor-BdS6aIkt.js → sql-query-editor-B14enbgV.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-BVBZkOPi.js → sqlite-viewer-DL3s7Xcm.js} +1 -1
- package/dist/web/assets/{system-monitor-tab-D9CDMKZJ.js → system-monitor-tab-Bw3Cy1dg.js} +1 -1
- package/dist/web/assets/{terminal-tab-Bij4L1XF.js → terminal-tab-Bz8t4LSC.js} +1 -1
- package/dist/web/assets/{tool-cards-Dg6f_lKl.js → tool-cards-DOrdvoz5.js} +2 -2
- package/dist/web/assets/{use-monaco-theme-PSDuGfjN.js → use-monaco-theme-I6u-7ZEM.js} +1 -1
- package/dist/web/assets/{video-preview-oW5BA0vt.js → video-preview-CI_4NIE7.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +3 -3
- package/packages/vscode-compat/node_modules/.bin/tsc.bunx +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsc.exe +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsserver.bunx +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsserver.exe +0 -0
- package/scripts/check-ppm-dir-usage.sh +0 -0
- package/scripts/install.sh +0 -0
- package/scripts/release.sh +0 -0
- package/src/providers/claude-agent-sdk.ts +138 -4
- package/src/providers/image-limit-detection.ts +30 -0
- package/src/server/routes/accounts.ts +6 -2
- package/src/server/routes/chat.ts +32 -23
- package/src/server/routes/upgrade.ts +28 -12
- package/src/server/ws/chat.ts +108 -11
- package/src/services/account-selector.service.ts +98 -11
- package/src/services/claude-usage.service.ts +29 -3
- package/src/services/db.service.ts +46 -3
- package/src/services/subprocess-retention.ts +63 -0
- package/src/services/transcript-images-file.ts +144 -0
- package/src/services/transcript-images.ts +129 -66
- package/src/services/upgrade.service.ts +38 -0
- package/src/shared/turn-usage.ts +15 -1
- package/src/web/components/chat/chat-tab.tsx +3 -2
- package/src/web/components/chat/message-action-bar.tsx +0 -3
- package/src/web/components/chat/message-list.tsx +0 -1
- package/src/web/components/chat/session-debug-dialog.tsx +51 -13
- package/src/web/components/chat/turn-change-rollup.tsx +1 -3
- package/src/web/hooks/use-usage.ts +8 -3
- package/dist/web/assets/index-DxvtmNdJ.css +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.17.47] - 2026-08-31
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **A chat no longer dies for good on an image the API will not accept** — the bundled Claude Code SDK was 105 releases behind, and on that build a single oversized image in the history failed every later message, plain text ones included. Updating it clears the whole class of failure.
|
|
7
|
+
- **A chat that still hits a refused image now repairs itself** — the offending image is dropped from the history and the message retried, instead of repeating "Invalid request sent to the API" with no way out from inside PPM.
|
|
8
|
+
- **The update button appears as soon as you open the app** — the check only replayed what the background service last recorded, and that lands five minutes after startup, so a window opened before then offered no update while the release notes beside it already listed the newer version.
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Image cleanup now works on the chats that need it** — the session debug panel refused any history over 64MB, which was exactly the ones worth cleaning. It streams the file instead, and counts images you attached separately from ones a tool read, since only the first have no copy elsewhere.
|
|
12
|
+
|
|
13
|
+
## [0.17.46] - 2026-08-31
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **Continuing a long chat no longer costs several times more than it should** — a chat's whole history is re-sent to Claude on every message, and that is only cheap while it still matches a cached copy, which is held per account and expires after five minutes. Refreshing a tab, switching apps on a phone or letting a laptop sleep ended the chat's process, and the next message went to whichever account came next in the rotation — paying full price for the entire history again. A chat now stays on one account and keeps its process across a reconnect.
|
|
17
|
+
- **A chat no longer hops between accounts when they are all near their 5-hour limit** — it used to swap accounts on every message in exactly the situation where swapping costs the most, since each swap re-sends the history uncached. It now stays put unless another account genuinely has room.
|
|
18
|
+
- **A chat no longer stays stuck on an account whose weekly limit is spent** — the check only looked at the 5-hour window, so an account with nothing left for the week kept serving as soon as that window reset.
|
|
19
|
+
- **The chat header shows the account serving *this* chat** — with two chats open on two accounts it named whichever one ran most recently, so at least one of them was wrong.
|
|
20
|
+
- **Usage for a newly added account appears right away** — it used to stay blank until the next scheduled refresh.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
- **A chat now tells you when a message cost more than it had to** — a note under the reply explains how much of the history was re-sent uncached, roughly how many times more that made the message cost, and what restarted the chat.
|
|
24
|
+
- **Per-message token and cache history** — the session debug panel (bug icon) lists recent messages with how much of the history came from cache, what it cost and which account served it, so an expensive chat can be compared against its own cheaper messages.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **An idle chat releases its process once its cached history expires** — timed from its last message rather than from when the tab closed, so a process is never held alive protecting a cache that has already lapsed.
|
|
28
|
+
- **At most five idle chats keep a process warm** — beyond that the longest-idle one is released first, which bounds memory when chats are left open across several devices.
|
|
29
|
+
- **The account is no longer repeated under every reply** — it appears once in the header, for the chat it belongs to.
|
|
30
|
+
|
|
3
31
|
## [0.17.45] - 2026-08-31
|
|
4
32
|
|
|
5
33
|
### Fixed
|
|
@@ -71,4 +71,4 @@ This skill covers the `ppm` CLI, its HTTP API, and its config DB. It does **not*
|
|
|
71
71
|
- Third-party extensions (inspect via `ppm ext list`).
|
|
72
72
|
- The Claude Agent SDK internals (separate skill).
|
|
73
73
|
|
|
74
|
-
<!-- Generated for PPM v0.17.
|
|
74
|
+
<!-- Generated for PPM v0.17.47 at build time. Re-run `ppm export skill --install` to refresh. -->
|
|
@@ -763,7 +763,7 @@ Show recent runs for a schedule
|
|
|
763
763
|
Manage and inspect discovered skills & commands
|
|
764
764
|
|
|
765
765
|
**Options:**
|
|
766
|
-
- `--project <path>` — Project path (default: `"
|
|
766
|
+
- `--project <path>` — Project path (default: `"C:\\Users\\PC\\ppm"`)
|
|
767
767
|
|
|
768
768
|
**Usage:** `ppm skills [options] [command]`
|
|
769
769
|
|
|
@@ -773,7 +773,7 @@ List all discovered skills and commands
|
|
|
773
773
|
|
|
774
774
|
**Options:**
|
|
775
775
|
- `--json` — JSON output
|
|
776
|
-
- `--project <path>` — Project path (default: `"
|
|
776
|
+
- `--project <path>` — Project path (default: `"C:\\Users\\PC\\ppm"`)
|
|
777
777
|
|
|
778
778
|
### `ppm skills search`
|
|
779
779
|
|
|
@@ -781,7 +781,7 @@ Fuzzy search skills and commands
|
|
|
781
781
|
|
|
782
782
|
**Options:**
|
|
783
783
|
- `--json` — JSON output
|
|
784
|
-
- `--project <path>` — Project path (default: `"
|
|
784
|
+
- `--project <path>` — Project path (default: `"C:\\Users\\PC\\ppm"`)
|
|
785
785
|
|
|
786
786
|
**Usage:** `ppm skills search [options] <query>`
|
|
787
787
|
|
|
@@ -791,7 +791,7 @@ Show detailed info for a specific skill
|
|
|
791
791
|
|
|
792
792
|
**Options:**
|
|
793
793
|
- `--json` — JSON output
|
|
794
|
-
- `--project <path>` — Project path (default: `"
|
|
794
|
+
- `--project <path>` — Project path (default: `"C:\\Users\\PC\\ppm"`)
|
|
795
795
|
|
|
796
796
|
**Usage:** `ppm skills info [options] <name>`
|
|
797
797
|
|
|
@@ -288,4 +288,4 @@ _Base URL: `http://localhost:8080` (default; override via `ppm config set port <
|
|
|
288
288
|
- `ws://<host>/ws/terminal` — PTY terminal multiplexer
|
|
289
289
|
- `ws://<host>/ws/extensions` — extension host channel
|
|
290
290
|
|
|
291
|
-
<!-- Generated from src/server/routes/ for PPM v0.17.
|
|
291
|
+
<!-- Generated from src/server/routes/ for PPM v0.17.47 -->
|
package/bun.lock
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "ppm",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
8
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.251",
|
|
9
9
|
"@codemirror/lang-sql": "^6.10.0",
|
|
10
10
|
"@glideapps/glide-data-grid": "^6.0.3",
|
|
11
11
|
"@inquirer/prompts": "^8.3.0",
|
|
@@ -96,23 +96,23 @@
|
|
|
96
96
|
"packages": {
|
|
97
97
|
"@antfu/install-pkg": ["@antfu/install-pkg@1.1.0", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="],
|
|
98
98
|
|
|
99
|
-
"@anthropic-ai/claude-agent-sdk": ["@anthropic-ai/claude-agent-sdk@0.3.
|
|
99
|
+
"@anthropic-ai/claude-agent-sdk": ["@anthropic-ai/claude-agent-sdk@0.3.251", "", { "optionalDependencies": { "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.251", "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.251", "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.251", "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.251", "@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.251", "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.251", "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.251", "@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.251" }, "peerDependencies": { "@anthropic-ai/sdk": ">=0.93.0", "@modelcontextprotocol/sdk": "^1.29.0", "zod": "^4.0.0" } }, "sha512-DqSi8mH2tQYRlVV0G+lJnQ/WbjJZ/a+8cJ3vPuYoqh8esIIvXHm1ZOXV1UPGsFYRnbBytEoiSGitguEXd+sQ+Q=="],
|
|
100
100
|
|
|
101
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": ["@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.
|
|
101
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": ["@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.251", "", { "os": "darwin", "cpu": "arm64" }, "sha512-C23h+Dbddcc4gai95+lhm4/94am2IOq+bf3IdEDDS7EPqDQqajo2s5q1/ZSwq9rOc0RJLT7Ws72ZCzYJh67KSg=="],
|
|
102
102
|
|
|
103
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": ["@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.
|
|
103
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": ["@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.251", "", { "os": "darwin", "cpu": "x64" }, "sha512-HrLnb3ggk+vMbymUvbosgPmxWp4W6Ot+0mNVjoBYDn5OZrTV3C3LRtbWf7jwcGyKMcg0xJf0AqiudQ2BRrlr8A=="],
|
|
104
104
|
|
|
105
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": ["@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.
|
|
105
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": ["@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.251", "", { "os": "linux", "cpu": "arm64" }, "sha512-3E27F5j82EWOyEniRW7crmo0jWYYQmPDdP52jWq6Y6aytiyYIdUFMEGZZ6chVHNlZiU7GsjTa3teKk2xlQ68lQ=="],
|
|
106
106
|
|
|
107
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": ["@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.
|
|
107
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": ["@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.251", "", { "os": "linux", "cpu": "arm64" }, "sha512-RTUf7TPBUkQ6oV3pDkEdcD47I0uH0ZpvmZlXHnrLGznFqyLr+7XHupOxUMJD0Jwm9v5qeqpNiPAYB0dL4RYiHg=="],
|
|
108
108
|
|
|
109
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": ["@anthropic-ai/claude-agent-sdk-linux-x64@0.3.
|
|
109
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": ["@anthropic-ai/claude-agent-sdk-linux-x64@0.3.251", "", { "os": "linux", "cpu": "x64" }, "sha512-qCD87XPjcNM1u4ukqmcgpHDl3Y6l+cW8j7kPzH91Y5yLBYJ5xYZA2KtJ7AYNEPOteVyOGJw/efmva0S8CRr0fg=="],
|
|
110
110
|
|
|
111
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": ["@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.
|
|
111
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": ["@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.251", "", { "os": "linux", "cpu": "x64" }, "sha512-SzXrdy7jjrjJIuTG+VMRAY0YZ3G/8w21WuhAozwnvnEUAPo6NDv6lgFinu7NO8J6CPE+MK2sGze6JeCF+ljgUg=="],
|
|
112
112
|
|
|
113
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": ["@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.
|
|
113
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": ["@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.251", "", { "os": "win32", "cpu": "arm64" }, "sha512-FH1ZLcyc97ie3h7CSlIxA1ppXILgf0V8sFQrWnHyKBrthJXQkMHXhsTq9OZV/2KhXslNf2hTe0gHpZ1nCL1Gmg=="],
|
|
114
114
|
|
|
115
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": ["@anthropic-ai/claude-agent-sdk-win32-x64@0.3.
|
|
115
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": ["@anthropic-ai/claude-agent-sdk-win32-x64@0.3.251", "", { "os": "win32", "cpu": "x64" }, "sha512-/jmtFIvfF0UFMxSZ8WV2Aus8aGA3+8Ft6AHvWuBJkY5jM2ubfqi6GnBjKCAL831TTllp2rKZlViANtWWRBvpvg=="],
|
|
116
116
|
|
|
117
117
|
"@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.97.1", "", { "dependencies": { "json-schema-to-ts": "^3.1.1", "standardwebhooks": "^1.0.0" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["zod"], "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-wOf7AUeJPitcVpvKO4UMu63mWH5SaVipkGd7OOQJt/G6VYGlV8D2Gp9dLxOrttDJh/9gqPqdaBwDGcBevumeAg=="],
|
|
118
118
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{b as t,y as n}from"./vendor-markdown-CKTlmXbz.js";import"./vendor-ui-DMRGWRuc.js";import{t as r}from"./save-BM4p9_9n.js";import{s as i}from"./api-client-COQtP-dB.js";import"./vendor-mermaid-CYOBtZtD.js";import"./settings-store-BbFtHCGd.js";import{n as a}from"./utils-E0yyGxXt.js";import{$t as o,D as s,E as c,Mt as l,O as u,T as d,en as f,jt as p,k as m,o as h}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{b as t,y as n}from"./vendor-markdown-CKTlmXbz.js";import"./vendor-ui-DMRGWRuc.js";import{t as r}from"./save-BM4p9_9n.js";import{s as i}from"./api-client-COQtP-dB.js";import"./vendor-mermaid-CYOBtZtD.js";import"./settings-store-BbFtHCGd.js";import{n as a}from"./utils-E0yyGxXt.js";import{$t as o,D as s,E as c,Mt as l,O as u,T as d,en as f,jt as p,k as m,o as h}from"./index-BN3MQIrY.js";import{t as g}from"./use-monaco-theme-I6u-7ZEM.js";var _=e(t(),1),v=n();function y({metadata:e}){let t=e?.filePath,n=e?.name,a=e?.resourceType??`skill`,y=e?.scope??`user`,x=e?.readOnly===!0,S=e?.shadowed===!0,C=e?.shadowedBy,w=e?.project??``,[T,E]=(0,_.useState)(``),[D,O]=(0,_.useState)(``),[k,A]=(0,_.useState)(!0),[j,M]=(0,_.useState)(null),[N,P]=(0,_.useState)(!1),F=g(),I=(0,_.useRef)(``),L=T!==D;(0,_.useEffect)(()=>{let e=!1;return A(!0),M(null),u(t,w).then(t=>{e||(E(t.content),O(t.content),I.current=t.content)}).catch(t=>{e||M(t.message)}).finally(()=>{e||A(!1)}),()=>{e=!0}},[t,w]);let R=(0,_.useCallback)(async()=>{if(x||N)return;let e=I.current;if(e!==D){P(!0);try{await m(t,e,w),O(e),E(e),i.success(`Saved`),s.getState().reload()}catch(e){i.error(e.message)}finally{P(!1)}}},[t,w,D,x,N]);(0,_.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),R())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[R]);let z=c[a];return(0,v.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[(0,v.jsx)(z,{className:`size-4 text-text-subtle`}),(0,v.jsx)(`span`,{className:`text-sm font-semibold`,children:n}),(0,v.jsx)(d,{scope:y}),L&&!x&&(0,v.jsx)(`span`,{className:`size-1.5 rounded-full bg-primary`,title:`Unsaved changes`}),(0,v.jsx)(`div`,{className:`flex-1`}),(0,v.jsxs)(`span`,{className:`hidden sm:block text-[11px] text-text-subtle`,children:[a,` · markdown`]}),!x&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`button`,{onClick:()=>E(D),disabled:!L||N,className:`flex items-center gap-1 rounded px-2 py-1 text-xs text-text-secondary hover:bg-surface-elevated disabled:opacity-40`,children:[(0,v.jsx)(p,{className:`size-3.5`}),` Revert`]}),(0,v.jsxs)(`button`,{onClick:()=>void R(),disabled:!L||N,className:`flex items-center gap-1 rounded bg-primary px-2.5 py-1 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-40`,children:[N?(0,v.jsx)(f,{className:`size-3.5 animate-spin`}):(0,v.jsx)(r,{className:`size-3.5`}),` Save`]})]})]}),x&&(0,v.jsx)(b,{icon:o,tone:`muted`,children:`Bundled resource — read-only. Duplicate it (from the AI Resources panel) to make an editable copy.`}),S&&C&&(0,v.jsxs)(b,{icon:l,tone:`warn`,children:[`This `,a,` is overridden by another “`,C.name,`” from a higher-priority source (`,C.source,`). It is currently inactive.`]}),(0,v.jsx)(`div`,{className:`min-h-0 flex-1`,children:k?(0,v.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,v.jsx)(f,{className:`size-5 animate-spin text-primary`})}):j?(0,v.jsx)(`div`,{className:`p-6 text-center text-sm text-destructive`,children:j}):(0,v.jsx)(h,{height:`100%`,language:`markdown`,theme:F,value:T,onChange:e=>{let t=e??``;I.current=t,E(t)},options:{readOnly:x,minimap:{enabled:!1},fontSize:13,wordWrap:`on`,scrollBeyondLastLine:!1,lineNumbers:`on`}})})]})}function b({icon:e,tone:t,children:n}){return(0,v.jsxs)(`div`,{className:a(`flex items-start gap-2 px-3 py-2 text-[12px] shrink-0 border-b border-border`,t===`warn`?`bg-amber-500/10 text-amber-300`:`bg-surface-elevated text-text-secondary`),children:[(0,v.jsx)(e,{className:`mt-0.5 size-3.5 shrink-0`}),(0,v.jsx)(`span`,{children:n})]})}export{y as AiResourceEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as e}from"./vendor-markdown-CKTlmXbz.js";import"./vendor-ui-DMRGWRuc.js";import{t}from"./createLucideIcon-ConhwJnb.js";import{t as n}from"./file-exclamation-point-DBEC-Kst.js";import"./api-client-COQtP-dB.js";import{t as r}from"./utils-E0yyGxXt.js";import{en as i}from"./index-
|
|
1
|
+
import{y as e}from"./vendor-markdown-CKTlmXbz.js";import"./vendor-ui-DMRGWRuc.js";import{t}from"./createLucideIcon-ConhwJnb.js";import{t as n}from"./file-exclamation-point-DBEC-Kst.js";import"./api-client-COQtP-dB.js";import{t as r}from"./utils-E0yyGxXt.js";import{en as i}from"./index-BN3MQIrY.js";import{t as a}from"./use-blob-url-B3YovXF6.js";var o=t(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),s=e();function c({filePath:e,projectName:t}){let{blobUrl:c,error:l}=a(e,t);return l?(0,s.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3 text-text-secondary`,children:[(0,s.jsx)(n,{className:`size-10 text-text-subtle`}),(0,s.jsx)(`p`,{className:`text-sm`,children:`Failed to load audio.`})]}):c?(0,s.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-4 p-4 bg-surface`,children:[(0,s.jsx)(o,{className:`size-16 text-text-subtle`}),(0,s.jsx)(`p`,{className:`text-sm text-text-secondary truncate max-w-xs`,children:r(e)}),(0,s.jsx)(`audio`,{src:c,controls:!0,className:`w-full max-w-md`})]}):(0,s.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,s.jsx)(i,{className:`size-5 animate-spin text-text-subtle`})})}export{c as AudioPreview};
|