@seqyuan/pidex 0.8.2 → 0.8.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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +5 -3
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +12 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/agent/[id]/events/route.js +2 -2
- package/.next/server/app/api/agent/[id]/route.js +1 -1
- package/.next/server/app/api/agent/new/route.js +1 -1
- package/.next/server/app/api/auth/all-providers/route.js +1 -1
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
- package/.next/server/app/api/auth/providers/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/default-cwd/route.js +1 -1
- package/.next/server/app/api/files/[...path]/route.js +3 -3
- package/.next/server/app/api/harness/route.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models-config/discover/route.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -1
- package/.next/server/app/api/models-config/test/route.js +1 -1
- package/.next/server/app/api/search/route.js +2 -2
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
- package/.next/server/app/api/sessions/[id]/route.js +1 -1
- package/.next/server/app/api/sessions/new/route.js +1 -1
- package/.next/server/app/api/sessions/route.js +2 -2
- package/.next/server/app/api/settings/route.js +1 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/install/route.js +1 -1
- package/.next/server/app/api/skills/route.js +2 -2
- package/.next/server/app/api/skills/search/route.js +1 -1
- package/.next/server/app/api/soul/route.js +1 -1
- package/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page.js +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/page.js +15 -6
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +5 -3
- package/.next/server/chunks/7601.js +28 -6
- package/.next/server/chunks/7890.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/XSByN-IoznWBE3vWZFcIS/_buildManifest.js +1 -0
- package/.next/static/chunks/7355-29eaa714eb390050.js +1 -0
- package/.next/static/chunks/app/_global-error/page-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/harness/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/home/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/models/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/search/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/settings/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/skills/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/api/soul/route-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/app/page-e3d4e4e921277fd0.js +189 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-3f04b1d8e1b6802c.js +1 -0
- package/.next/static/css/49036b8759ee1d22.css +3 -0
- package/.next/trace +73 -73
- package/.next/trace-build +1 -1
- package/.next/types/app/api/models-config/discover/route.ts +351 -0
- package/.next/types/app/api/settings/route.ts +351 -0
- package/.next/types/routes.d.ts +3 -1
- package/.next/types/validator.ts +18 -0
- package/package.json +1 -1
- package/.next/static/M1PyWKc8CcaMMkD4oZQGl/_buildManifest.js +0 -1
- package/.next/static/chunks/7355-7265e8bebbd74a6a.js +0 -1
- package/.next/static/chunks/app/_global-error/page-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/events/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/agent/[id]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/agent/new/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/all-providers/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/login/[provider]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/providers/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/default-cwd/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/files/[...path]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/harness/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/home/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/models/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/models-config/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/models-config/test/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/search/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/context/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/sessions/[id]/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/sessions/new/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/skills/install/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/skills/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/skills/search/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/api/soul/route-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/app/page-f540479c9c509577.js +0 -180
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-709834bb6e90a0ba.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-709834bb6e90a0ba.js +0 -1
- package/.next/static/css/f6cebe2826ad6e46.css +0 -3
- /package/.next/static/{M1PyWKc8CcaMMkD4oZQGl → XSByN-IoznWBE3vWZFcIS}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"27123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"33890":{"*":{"id":"36832","name":"*","chunks":[],"async":false}},"42309":{"*":{"id":"28447","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":27123,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/client-page.js":{"id":61304,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/client-segment.js":{"id":78616,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":64777,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/layout-router.js":{"id":57121,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":74581,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":90484,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":86869,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"Noto_Sans_Mono\",\"arguments\":[{\"subsets\":[\"latin\",\"cyrillic\"],\"variable\":\"--font-noto-mono\",\"display\":\"swap\"}],\"variableName\":\"notoSansMono\"}":{"id":83683,"name":"*","chunks":["7177","static/chunks/app/layout-827e06e39e1e6b05.js"],"async":false},"/home/runner/work/pidex/pidex/app/globals.css":{"id":66872,"name":"*","chunks":["7177","static/chunks/app/layout-827e06e39e1e6b05.js"],"async":false},"/home/runner/work/pidex/pidex/app/login/page.tsx":{"id":42309,"name":"*","chunks":[],"async":false},"/home/runner/work/pidex/pidex/components/AppShell.tsx":{"id":33890,"name":"*","chunks":["6079","static/chunks/363642f4-043c1475ab9af70e.js","7355","static/chunks/7355-29eaa714eb390050.js","8974","static/chunks/app/page-e3d4e4e921277fd0.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/pidex/pidex/":[],"/home/runner/work/pidex/pidex/app/layout":[{"inlined":false,"path":"static/css/49036b8759ee1d22.css"}],"/home/runner/work/pidex/pidex/app/page":[]},"rscModuleMapping":{"27123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"33890":{"*":{"id":"35790","name":"*","chunks":[],"async":false}},"42309":{"*":{"id":"69613","name":"*","chunks":[],"async":false}},"57121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"61304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"64777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"66872":{"*":{"id":"82704","name":"*","chunks":[],"async":false}},"74581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"78616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"86869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"90484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -16,15 +16,17 @@
|
|
|
16
16
|
"/api/sessions/route": "app/api/sessions/route.js",
|
|
17
17
|
"/api/soul/route": "app/api/soul/route.js",
|
|
18
18
|
"/favicon.ico/route": "app/favicon.ico/route.js",
|
|
19
|
-
"/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
|
|
20
19
|
"/api/agent/[id]/events/route": "app/api/agent/[id]/events/route.js",
|
|
21
|
-
"/api/auth/
|
|
20
|
+
"/api/auth/all-providers/route": "app/api/auth/all-providers/route.js",
|
|
22
21
|
"/api/auth/api-key/[provider]/route": "app/api/auth/api-key/[provider]/route.js",
|
|
22
|
+
"/api/auth/logout/[provider]/route": "app/api/auth/logout/[provider]/route.js",
|
|
23
23
|
"/api/auth/providers/route": "app/api/auth/providers/route.js",
|
|
24
|
-
"/api/models-config/route": "app/api/models-config/route.js",
|
|
25
24
|
"/api/auth/login/[provider]/route": "app/api/auth/login/[provider]/route.js",
|
|
25
|
+
"/api/models-config/discover/route": "app/api/models-config/discover/route.js",
|
|
26
|
+
"/api/models-config/route": "app/api/models-config/route.js",
|
|
26
27
|
"/api/models-config/test/route": "app/api/models-config/test/route.js",
|
|
27
28
|
"/api/models/route": "app/api/models/route.js",
|
|
29
|
+
"/api/settings/route": "app/api/settings/route.js",
|
|
28
30
|
"/api/skills/install/route": "app/api/skills/install/route.js",
|
|
29
31
|
"/api/skills/route": "app/api/skills/route.js",
|
|
30
32
|
"/api/skills/search/route": "app/api/skills/search/route.js",
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
exports.id=7601,exports.ids=[7601],exports.modules={
|
|
1
|
+
exports.id=7601,exports.ids=[7601],exports.modules={9805:(a,b,c)=>{"use strict";c.d(b,{FE:()=>i,J:()=>g,l5:()=>h,xm:()=>k,zN:()=>j});let d=`<widget-capability>
|
|
2
|
+
You can create interactive visualizations with the \`show-widget\` code fence when the user asks for charts, diagrams, flowcharts, dashboards, UI prototypes, or visual explanations.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
Format:
|
|
5
|
+
\`\`\`show-widget
|
|
6
|
+
{"title":"Human readable title","widget_code":"<raw HTML/SVG string>"}
|
|
7
|
+
\`\`\`
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
1. Use a single JSON object. \`widget_code\` must be a JSON string with escaped quotes and newlines.
|
|
11
|
+
2. Do not include DOCTYPE, html, head, body, iframe, object, embed, form, or meta tags.
|
|
12
|
+
3. Prefer responsive SVG or small HTML widgets. Use transparent backgrounds; the host supplies theme colors.
|
|
13
|
+
4. Keep each widget concise, close the JSON object and fence, and put explanation outside the fence.
|
|
14
|
+
5. If the user explicitly asks for raw Markdown, raw Mermaid, or a saved file, honor that format instead of forcing a widget.
|
|
15
|
+
</widget-capability>`,e=/\n?\s*<widget-capability>[\s\S]*?<\/widget-capability>\s*/g,f=/\n?\s*<visualization_harness>[\s\S]*?<\/visualization_harness>\s*/g;function g(a){let b=a.toLowerCase();return b.includes("show-widget")&&(b.includes("# visualization harness")||b.includes("## when to visualize")||b.includes("widget format"))}function h(a){let b=a.toLowerCase();return/\b(chart|plot|graph|visuali[sz]e|diagram|flowchart|timeline|dashboard|prototype|mockup|wireframe|heatmap|scatter|histogram|tree map|treemap|svg|interactive ui|generative ui)\b/.test(b)||/图表|画图|绘图|可视化|流程图|架构图|时序图|原型图|交互式|仪表盘|看板|热图|散点图|折线图|柱状图|饼图|雷达图|网络图|桑基图|甘特图|单细胞.*流程/.test(a)}function i(a){return a.replace(e,"\n").replace(f,"\n").replace(/\n{3,}/g,"\n\n").trim()}function j(a){return a.includes("<widget-capability>")?a:a.trim()?`${d}
|
|
16
|
+
|
|
17
|
+
${a}`:d}function k(a,b){let c=b.trim();return!c||a.includes("<visualization_harness>")?a:a.trim()?`${a.trimEnd()}
|
|
18
|
+
|
|
19
|
+
<visualization_harness>
|
|
20
|
+
${c}
|
|
21
|
+
</visualization_harness>`:`<visualization_harness>
|
|
22
|
+
${c}
|
|
23
|
+
</visualization_harness>`}},12039:(a,b,c)=>{"use strict";function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}c.d(b,{B:()=>d})},40402:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{BR:()=>l,DK:()=>m,O8:()=>k,Uv:()=>n,dQ:()=>h,os:()=>j});var e=c(75430),f=c(12039),g=a([e]);async function h(){let a=await e.SessionManager.listAll(),b=new Map;for(let c of a)b.set(c.path,c.id);let c=i();return a.map(a=>(c.set(a.id,a.path),{path:a.path,id:a.id,cwd:a.cwd,name:a.name,created:a.created instanceof Date?a.created.toISOString():String(a.created),modified:a.modified instanceof Date?a.modified.toISOString():String(a.modified),messageCount:a.messageCount,firstMessage:a.firstMessage||"(no messages)",parentSessionId:a.parentSessionPath?b.get(a.parentSessionPath):void 0}))}function i(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function j(a){let b=i().get(a);return b||(await h(),i().get(a)??null)}function k(a,b){i().set(a,b)}function l(a){i().delete(a)}function m(a){return e.SessionManager.open(a).getEntries()}function n(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id)}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
|
|
24
|
+
|
|
25
|
+
${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model}}e=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},45351:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{H:()=>l,i:()=>k});var e=c(29021),f=c(33873),g=c(75430),h=a([g]);g=(h.then?(await h)():h)[0];let m={generativeUI:!0};function i(){return(0,f.join)((0,g.getAgentDir)(),"pidex-settings.json")}function j(a){return a&&"object"==typeof a?{generativeUI:"boolean"==typeof a.generativeUI?a.generativeUI:m.generativeUI}:{...m}}function k(){let a=i();if(!(0,e.existsSync)(a))return{...m};try{return j(JSON.parse((0,e.readFileSync)(a,"utf8")))}catch{return{...m}}}function l(a){let b=j({...k(),...a}),c=i(),d=(0,f.dirname)(c);return(0,e.existsSync)(d)||(0,e.mkdirSync)(d,{recursive:!0}),(0,e.writeFileSync)(c,JSON.stringify(b,null,2),"utf8"),b}d()}catch(a){d(a)}})},56429:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A4:()=>m,OF:()=>n});var e=c(75430),f=c(40402),g=c(45351),h=c(9805),i=c(29021),j=c(33873),k=a([e,f,g]);[e,f,g]=k.then?(await k)():k;class o{constructor(a,b={}){this.inner=a,this.options=b,this.listeners=[],this.unsubscribe=null,this.idleTimer=null,this.onDestroyCallback=null,this._alive=!0,this.detailedVisualizationInjected=!1}get sessionId(){return this.inner.sessionId}get sessionFile(){return this.inner.sessionFile??""}isAlive(){return this._alive}start(){this.unsubscribe=this.inner.subscribe(a=>{for(let b of(this.resetIdleTimer(),this.listeners))b(a)}),this.resetIdleTimer()}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>this.destroy(),6e5)}onEvent(a){return this.listeners.push(a),()=>{let b=this.listeners.indexOf(a);-1!==b&&this.listeners.splice(b,1)}}onDestroy(a){this.onDestroyCallback=a}async send(a){this.resetIdleTimer();let b=a.type;switch(b){case"prompt":{this.preparePromptContext(a.message);let b=a.images;return this.inner.prompt(a.message,b?.length?{images:b}:void 0).catch(()=>{}),null}case"abort":return await this.inner.abort(),null;case"get_state":{let a=this.inner.model,b=this.inner.getContextUsage(),c=this.inner.agent.state?.systemPrompt??"",d=(0,g.i)();return{sessionId:this.inner.sessionId,sessionFile:this.inner.sessionFile??"",isStreaming:this.inner.isStreaming,isCompacting:this.inner.isCompacting,autoCompactionEnabled:this.inner.autoCompactionEnabled,autoRetryEnabled:this.inner.autoRetryEnabled,model:a?{id:a.id,provider:a.provider}:void 0,messageCount:0,pendingMessageCount:0,contextUsage:b?{percent:b.percent,contextWindow:b.contextWindow,tokens:b.tokens}:null,systemPrompt:d.generativeUI?c:(0,h.FE)(c),thinkingLevel:this.inner.agent.state?.thinkingLevel??"off"}}case"set_model":{let{provider:b,modelId:c}=a,d=this.inner.modelRegistry.find(b,c);if(!d)throw Error(`Model not found: ${b}/${c}`);return await this.inner.setModel(d),{id:d.id,provider:d.provider}}case"fork":{let b,c=a.entryId,d=this.inner.sessionManager,g=this.inner.sessionFile;if(!d.isPersisted())return{cancelled:!0};if(!g)throw Error("Persisted session is missing a session file");let h=d.getEntry(c);if(!h)throw Error("Invalid entry ID for forking");let i=d.getSessionDir();if(h.parentId){let a=e.SessionManager.open(g,i).createBranchedSession(h.parentId);if(!a)throw Error("Failed to create forked session");b=a}else{let a=e.SessionManager.create(d.getCwd(),i);a.newSession({parentSession:g}),b=a.getSessionFile()}let j=e.SessionManager.open(b,i).getSessionId();return(0,f.O8)(j,b),this.destroy(),{cancelled:!1,newSessionId:j}}case"navigate_tree":return{cancelled:(await this.inner.navigateTree(a.targetId,{})).cancelled};case"set_thinking_level":{let b=a.level;return this.inner.setThinkingLevel(b),"xhigh"===b&&this.inner.model?.compat?.thinkingFormat==="deepseek"&&this.inner.agent?.state&&(this.inner.agent.state.thinkingLevel="xhigh"),null}case"compact":{let{findCutPoint:b,DEFAULT_COMPACTION_SETTINGS:d}=await Promise.resolve().then(c.bind(c,75430)),e=this.inner.sessionManager.getBranch(),f={...d,...this.inner.settingsManager.getCompactionSettings()},g=-1;for(let a=e.length-1;a>=0;a--)if("compaction"===e[a].type){g=a;break}let h=g+1,i=b(e,h,e.length,f.keepRecentTokens);if((i.isSplitTurn?i.turnStartIndex:i.firstKeptEntryIndex)<=h)throw Error("Conversation too short to compact");return await this.inner.compact(a.customInstructions)}case"set_auto_compaction":return this.inner.setAutoCompactionEnabled(a.enabled),null;case"steer":{this.preparePromptContext(a.message);let b=a.images;return await this.inner.steer(a.message,b?.length?b:void 0),null}case"follow_up":{this.preparePromptContext(a.message);let b=a.images;return await this.inner.followUp(a.message,b?.length?b:void 0),null}case"get_tools":{let a=this.inner.getAllTools(),b=new Set(this.inner.getActiveToolNames());return a.map(a=>({name:a.name,description:a.description,active:b.has(a.name)}))}case"set_tools":return this.inner.setActiveToolsByName(a.toolNames),null;case"abort_compaction":return this.inner.abortCompaction(),null;case"set_auto_retry":return this.inner.setAutoRetryEnabled(a.enabled),null;default:throw Error(`Unsupported command: ${b}`)}}destroy(){this._alive&&(this._alive=!1,this.idleTimer&&clearTimeout(this.idleTimer),this.unsubscribe?.(),this.onDestroyCallback?.())}preparePromptContext(a){let b=this.inner.agent.state;if(!b||this.options.systemPromptDisabled)return;if(!(0,g.i)().generativeUI){b.systemPrompt=(0,h.FE)(b.systemPrompt??""),this.detailedVisualizationInjected=!1;return}if(b.systemPrompt=(0,h.zN)(b.systemPrompt??""),this.detailedVisualizationInjected)return;let c=this.options.visualizationHarness?.trim();c&&(0,h.l5)(a)&&(b.systemPrompt=(0,h.xm)(b.systemPrompt,c),this.detailedVisualizationInjected=!0)}}function l(){if(!globalThis.__piSessions){globalThis.__piSessions=new Map;let a=()=>globalThis.__piSessions?.forEach(a=>a.destroy());process.once("exit",a),process.once("SIGINT",a),process.once("SIGTERM",a)}return globalThis.__piSessions}function m(a){return l().get(a)}async function n(a,b,d,k){let m=l(),n=(globalThis.__piStartLocks||(globalThis.__piStartLocks=new Map),globalThis.__piStartLocks),p=m.get(a);if(p?.isAlive())return{session:p,realSessionId:a};let q=n.get(a);if(q)return q;let r=(async()=>{let a,l,{SessionManager:n,getAgentDir:p}=await Promise.resolve().then(c.bind(c,75430)),q=p(),r=b?n.open(b,void 0):n.create(d,void 0);void 0!==k&&(a=0===k.length?[]:["read","bash","edit","write","grep","find","ls"]);let{session:s}=await (0,e.createAgentSession)({cwd:d,agentDir:q,sessionManager:r,...void 0!==a?{tools:a}:{}}),t=(0,g.i)(),u=[],v=(0,j.join)(q,"soul.md");if((0,i.existsSync)(v))try{let a=(0,i.readFileSync)(v,"utf-8").trim();a&&u.push(`<soul>
|
|
4
26
|
${a}
|
|
5
|
-
</soul>`)}catch{}let
|
|
27
|
+
</soul>`)}catch{}let w=(0,j.join)(q,"harness.md");if((0,i.existsSync)(w))try{let a=(0,i.readFileSync)(w,"utf-8").trim();a&&((0,h.J)(a)?l=a:u.push(`<harness>
|
|
6
28
|
${a}
|
|
7
|
-
</harness>`)}catch{}let
|
|
29
|
+
</harness>`))}catch{}let x=(0,j.join)(d,"memory.md");if((0,i.existsSync)(x))try{let a=(0,i.readFileSync)(x,"utf-8").trim();a&&u.push(`<project_memory>
|
|
8
30
|
${a}
|
|
9
|
-
</project_memory>`)}catch{}if(
|
|
31
|
+
</project_memory>`)}catch{}if(u.length>0){let a=s.agent.state?.systemPrompt??"",b=u.join("\n\n");s.agent.state.systemPrompt=`${b}
|
|
10
32
|
|
|
11
|
-
${a}`}
|
|
33
|
+
${a}`}t.generativeUI&&(s.agent.state.systemPrompt=(0,h.zN)(s.agent.state?.systemPrompt??"")),k&&k.length>0&&s.setActiveToolsByName(k),k?.length===0&&(s.agent.state.systemPrompt="");let y=new o(s,{visualizationHarness:l,systemPromptDisabled:k?.length===0});y.start();let z=s.sessionId,A=s.sessionFile;return A&&(0,f.O8)(z,A),y.onDestroy(()=>m.delete(z)),m.set(z,y),{session:y,realSessionId:z}})().finally(()=>n.delete(a));return n.set(a,r),r}d()}catch(a){d(a)}})},78335:()=>{},96487:()=>{}};
|