dal-code 1.0.54 → 1.0.55
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 +10 -0
- package/NOTICE +11 -0
- package/dist/bundle/chunks/{anthropic-messages-UHE6F2IE.js → anthropic-messages-LJWWEQIU.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-EK4W2MKL.js → azure-openai-responses-GK4VH6GM.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-K4B5ABCQ.js → chunk-2XX4WZT6.js} +1 -1
- package/dist/bundle/chunks/{chunk-CSZTBJOE.js → chunk-3ANBT7AT.js} +1 -1
- package/dist/bundle/chunks/{chunk-SCYK4XNE.js → chunk-44EXLOHK.js} +1 -1
- package/dist/bundle/chunks/{chunk-3ZHZINH3.js → chunk-5TGFM4KW.js} +2 -2
- package/dist/bundle/chunks/{chunk-RKLUP6JT.js → chunk-6U37J6E7.js} +343 -343
- package/dist/bundle/chunks/{chunk-EH7SFF47.js → chunk-AL3DFAIM.js} +2 -2
- package/dist/bundle/chunks/{chunk-356BFRU3.js → chunk-D3HKK2ZD.js} +1 -1
- package/dist/bundle/chunks/{chunk-IDZ3QKHZ.js → chunk-DBT5OS5V.js} +1 -1
- package/dist/bundle/chunks/{chunk-VIS5PYQO.js → chunk-DWMC4U2M.js} +1 -1
- package/dist/bundle/chunks/{chunk-K7VBBYTT.js → chunk-F5SIUTR7.js} +1 -1
- package/dist/bundle/chunks/{chunk-O7G23ELK.js → chunk-GX37DI5S.js} +1 -1
- package/dist/bundle/chunks/{chunk-FE533CCR.js → chunk-KSF7BFGS.js} +1 -1
- package/dist/bundle/chunks/{chunk-L3RBW36Y.js → chunk-NMU45EFT.js} +1 -1
- package/dist/bundle/chunks/{chunk-2C7JTP5O.js → chunk-PRBATF6B.js} +1 -1
- package/dist/bundle/chunks/{chunk-4DMD6C65.js → chunk-SCSGNIU5.js} +1 -1
- package/dist/bundle/chunks/{chunk-33MCYYJ3.js → chunk-SMPERFJU.js} +1 -1
- package/dist/bundle/chunks/{chunk-XRF4A4KI.js → chunk-SNBVCTMQ.js} +2 -2
- package/dist/bundle/chunks/{chunk-R7FBN5UP.js → chunk-YDOF6JVP.js} +2 -2
- package/dist/bundle/chunks/{chunk-B5GJW7C2.js → chunk-ZYP3V3TD.js} +1 -1
- package/dist/bundle/chunks/{cli-XOLEGZVC.js → cli-VKNCK5P5.js} +1 -1
- package/dist/bundle/chunks/{cli-YJV3WN2N.js → cli-Z44UHMMU.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-KNGB64NR.js → cloudflare-workers-ai-system-one-G4E4L26A.js} +1 -1
- package/dist/bundle/chunks/{easter-egg-3d-5TFBCTIS.js → easter-egg-3d-W2F3ROZ6.js} +1 -1
- package/dist/bundle/chunks/{execute-6PNQ63VS.js → execute-3FWM3EMV.js} +1 -1
- package/dist/bundle/chunks/{google-generative-ai-YJN7TGWU.js → google-generative-ai-HVFDKPI3.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-3BVJFMMZ.js → google-vertex-6E4HATAC.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-JVUWNG3E.js → llama-cpp-classify-3HAEJDKO.js} +1 -1
- package/dist/bundle/chunks/{mcp-PC3Y3FBI.js → mcp-SGBPG7LV.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-O6YIQAS5.js → mistral-conversations-6UC2WYUC.js} +1 -1
- package/dist/bundle/chunks/{office-AXLGVCMO.js → office-2F4B572E.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-YQ5NNPTG.js → openai-codex-responses-WPSZR4EE.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-R4I3PKBD.js → openai-completions-2RGIFVKJ.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-IUHMKKHZ.js → openai-decisions-BLZVYNRQ.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-E2PHOQF4.js → openai-responses-N65DO7MB.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-NCMLTKZW.js → openrouter-images-LQ4VP5P7.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-GLTSGLSO.js → pi-messages-VYTRLMVB.js} +1 -1
- package/dist/bundle/chunks/{review-KXWT7T3V.js → review-MKITXKSI.js} +1 -1
- package/dist/bundle/chunks/{router-26PXJ7YH.js → router-RL7OYANY.js} +1 -1
- package/dist/bundle/chunks/{runtime-LJBCO7CX.js → runtime-KB5ZUQB6.js} +1 -1
- package/dist/bundle/chunks/{sdk-6GP346VB.js → sdk-C5BAFGNR.js} +1 -1
- package/dist/bundle/chunks/sync-AQUDRXHM.js +7 -0
- package/dist/bundle/chunks/{typesafe-system-one-GQFHU7SQ.js → typesafe-system-one-6ZFGVJMV.js} +1 -1
- package/dist/bundle/chunks/{usage-MY7HTXQB.js → usage-CK3QZLTW.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-BEBLHRXC.js → virtual-modules-GRXCAWTO.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/types.d.ts +9 -5
- package/dist/core/tools/bash.js +1 -1
- package/dist/core/tools/edit.js +2 -3
- package/dist/core/tools/renderers/bash.js +1 -1
- package/dist/core/tools/renderers/edit.js +2 -2
- package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
- package/dist/modes/interactive/components/assistant-message.js +2 -2
- package/dist/modes/interactive/components/diff.d.ts +22 -0
- package/dist/modes/interactive/components/diff.js +4 -3
- package/dist/modes/interactive/components/keybinding-hints.js +1 -1
- package/dist/modes/interactive/components/panel-line.js +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +23 -1
- package/dist/modes/interactive/components/status-indicator.js +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -2
- package/dist/modes/interactive/components/tool-execution.js +5 -5
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.js +18 -18
- package/dist/modes/interactive/theme/dark.json +4 -0
- package/dist/modes/interactive/theme/light.json +4 -0
- package/dist/modes/interactive/theme/system-theme.js +1 -1
- package/dist/modes/interactive/theme/theme-tokens.d.ts +10 -0
- package/dist/modes/interactive/theme/theme-tokens.js +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -6
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/engine.js +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/index.js +14 -14
- package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -4
- package/dist/node_modules/@dalcode/dal-learn/src/safety.js +2 -2
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +4 -4
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/bundle/chunks/sync-ONQZCAYG.js +0 -7
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"toolPendingBg": "#1b1912",
|
|
18
18
|
"toolSuccessBg": "#1c1e14",
|
|
19
19
|
"toolErrorBg": "#241910",
|
|
20
|
+
"diffAddedBg": "#232b17",
|
|
21
|
+
"diffRemovedBg": "#33201a",
|
|
20
22
|
"customMsgBg": "#252217"
|
|
21
23
|
},
|
|
22
24
|
"colors": {
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
"toolDiffAdded": "sage",
|
|
60
62
|
"toolDiffRemoved": "terracotta",
|
|
61
63
|
"toolDiffContext": "muted",
|
|
64
|
+
"toolDiffAddedBg": "diffAddedBg",
|
|
65
|
+
"toolDiffRemovedBg": "diffRemovedBg",
|
|
62
66
|
"syntaxComment": "#6e6a58",
|
|
63
67
|
"syntaxKeyword": "#c9a36a",
|
|
64
68
|
"syntaxFunction": "#d8d2b8",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"toolPendingBg": "#f2ecd9",
|
|
18
18
|
"toolSuccessBg": "#e9efdc",
|
|
19
19
|
"toolErrorBg": "#f3e6d8",
|
|
20
|
+
"diffAddedBg": "#e3ebd3",
|
|
21
|
+
"diffRemovedBg": "#f4dfd2",
|
|
20
22
|
"customMsgBg": "#f7f2e2"
|
|
21
23
|
},
|
|
22
24
|
"colors": {
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
"toolDiffAdded": "sage",
|
|
60
62
|
"toolDiffRemoved": "terracotta",
|
|
61
63
|
"toolDiffContext": "muted",
|
|
64
|
+
"toolDiffAddedBg": "diffAddedBg",
|
|
65
|
+
"toolDiffRemovedBg": "diffRemovedBg",
|
|
62
66
|
"syntaxComment": "#8e8871",
|
|
63
67
|
"syntaxKeyword": "#9c5b0f",
|
|
64
68
|
"syntaxFunction": "#3a3728",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Z=Object.defineProperty;var r=(e,n)=>Z(e,"name",{value:n,configurable:!0});import{colorToOkhsl as ee,colorToOklch as A,colorToRgb as te,okhslColor as _,oklabToOkhslLightness as V,oklchColor as ne,rgbColor as P}from"@earendil-works/pi-tui";const ke="system",me="light/dark",R={neutral:{hue:231.49,saturation:{min:.02,max:.08},slot:8},blue:{hue:231.49,saturation:{min:.1,max:.68},slot:4},green:{hue:158.68,saturation:{min:.1,max:.76},slot:2},red:{hue:20,saturation:{min:.1,max:.92},slot:1},yellow:{hue:82.36,saturation:{min:.5,max:1},slot:3},orange:{hue:52,saturation:{min:.12,max:.85},slot:3},violet:{hue:295,saturation:{min:.2,max:.6},slot:5},calamine:{hue:202.43,saturation:{min:.1,max:.74},slot:6},thinkingSlate:{hue:231.49,saturation:{min:.08,max:.2},slot:4},thinkingBlue:{hue:231.49,saturation:{min:.2,max:.45},slot:4},thinkingPeriwinkle:{hue:263.25,saturation:{min:.3,max:.6},slot:6},thinkingViolet:{hue:295,saturation:{min:.4,max:.75},slot:5},thinkingMagenta:{hue:337.5,saturation:{min:.5,max:.85},slot:13},thinkingRed:{hue:20,saturation:{min:.95,max:1},slot:1}},D={selectedBg:"blue",searchMatchBg:"orange",userMessageBg:"blue",customMessageBg:"violet",toolPendingBg:"neutral",toolSuccessBg:"green",toolErrorBg:"red",text:"neutral",userMessageText:"neutral",customMessageText:"neutral",toolTitle:"neutral",syntaxOperator:"neutral",syntaxPunctuation:"neutral",muted:"neutral",dim:"neutral",thinkingText:"neutral",toolOutput:"neutral",mdLinkUrl:"neutral",mdQuote:"neutral",mdQuoteBorder:"neutral",mdHr:"neutral",mdCodeBlockBorder:"neutral",toolDiffContext:"neutral",syntaxComment:"neutral",scrollbarTrack:"neutral",scrollbarThumb:"neutral",searchMatchText:"neutral",borderMuted:"neutral",accent:"violet",borderAccent:"violet",customMessageLabel:"violet",mdCode:"violet",mdListBullet:"violet",syntaxType:"violet",border:"blue",mdLink:"blue",syntaxKeyword:"blue",syntaxVariable:"calamine",success:"green",mdCodeBlock:"green",toolDiffAdded:"green",bashMode:"green",syntaxNumber:"green",error:"red",toolDiffRemoved:"red",warning:"yellow",mdHeading:"yellow",syntaxFunction:"yellow",syntaxString:"orange",thinkingOff:"neutral",thinkingMinimal:"thinkingSlate",thinkingLow:"thinkingBlue",thinkingMedium:"thinkingPeriwinkle",thinkingHigh:"thinkingViolet",thinkingXhigh:"thinkingMagenta",thinkingMax:"thinkingRed"},G={syntaxString:2,syntaxNumber:5,searchMatchBg:3},oe={panel:{dark:{coefficients:[.29131,-.39746,2.33185,-.85524,-1.2076,.86276],reachable:[0,.979]},light:{coefficients:[-3.74073,27.94549,-78.44258,112.6798,-79.60015,22.11277],reachable:[.348,1]}},track:{dark:{coefficients:[.39028,-.23015,.83573,2.43829,-4.38292,2.01582],reachable:[0,.946]},light:{coefficients:[-5.24921,38.37322,-107.28833,152.10005,-106.17127,29.18061],reachable:[.368,1]}},thinking0:{dark:{coefficients:[.52988,-.05809,-.30924,4.63567,-6.52933,2.89108],reachable:[0,.873]},light:{coefficients:[-28.27749,182.85284,-469.62416,603.15916,-384.59976,97.35147],reachable:[.51,1]}},thinking1:{dark:{coefficients:[.55278,-.03667,-.45659,4.95347,-6.90265,3.0706],reachable:[0,.858]},light:{coefficients:[-37.10484,235.86282,-596.62344,754.3633,-474.00763,118.3551],reachable:[.535,1]}},thinking2:{dark:{coefficients:[.57486,-.01765,-.58987,5.25227,-7.27175,3.25532],reachable:[0,.842]},light:{coefficients:[-59.89653,377.05024,-945.07843,1182.03145,-734.96375,181.68658],reachable:[.556,1]}},thinking3:{dark:{coefficients:[.59621,-62e-5,-.71148,5.53588,-7.6392,3.44606],reachable:[0,.827]},light:{coefficients:[-72.07122,445.84082,-1099.57352,1353.88793,-829.53392,202.26164],reachable:[.58,1]}},thinking4:{dark:{coefficients:[.61691,.01462,-.82288,5.80651,-8.00641,3.64333],reachable:[0,.811]},light:{coefficients:[-110.14338,674.21488,-1645.75941,2004.32367,-1215.15899,293.3183],reachable:[.6,1]}},thinking5:{dark:{coefficients:[.63702,.02826,-.92498,6.06465,-8.37246,3.84651],reachable:[0,.795]},light:{coefficients:[-175.47701,1063.54495,-2570.70594,3098.80776,-1860.15527,444.76392],reachable:[.62,1]}},thinking6:{dark:{coefficients:[.65658,.04044,-1.01835,6.30989,-8.73529,4.05439],reachable:[0,.779]},light:{coefficients:[-183.81712,1094.70055,-2602.68539,3088.71276,-1826.91131,430.75931],reachable:[.643,1]}},subtle:{dark:{coefficients:[.56762,-.02475,-.5383,5.12628,-7.10931,3.17324],reachable:[0,.848]},light:{coefficients:[-232.85459,1376.54473,-3249.11801,3827.91186,-2248.29472,526.55751],reachable:[.657,1]}},thumb:{dark:{coefficients:[.60323,.00278,-.73328,5.57157,-7.68067,3.46933],reachable:[0,.823]},light:{coefficients:[-82.89897,511.01355,-1255.98095,1540.76821,-940.68087,228.58523],reachable:[.586,1]}},readable:{dark:{coefficients:[.66937,.04704,-1.06871,6.43941,-8.9332,4.17229],reachable:[0,.77]},light:{coefficients:[-1554.52576,8733.56817,-19604.93507,21977.72696,-12300.99599,2749.81288],reachable:[.751,1]}},emphasis:{dark:{coefficients:[.7303,.07695,-1.31626,7.1681,-10.14436,4.92846],reachable:[0,.712]},light:{coefficients:[-4948.31942,26870.91986,-58334.48399,63280.17197,-34298.01053,7430.30146],reachable:[.811,1]}},textOnPanel:{dark:{coefficients:[.86713,.05232,-.89428,4.79014,-5.5432,1.75023],reachable:[0,.542]},light:{coefficients:[-8570.89457,43954.60805,-90084.00702,92220.6791,-47152.15802,9632.27113],reachable:[.867,1]}},text:{dark:{coefficients:[.89242,.02311,-.44862,2.34417,-.06084,-2.63844],reachable:[0,.5]},light:{coefficients:[-2004.67048,6664.47299,-6060.70202,-1792.61209,5133.82359,-1939.85583],reachable:[.894,1]}}},k=["toolPendingBg","toolSuccessBg","toolErrorBg"],L=["userMessageBg","customMessageBg"],H=["userMessageBg","toolPendingBg","toolSuccessBg","toolErrorBg","selectedBg","searchMatchBg","customMessageBg"],ae=["thinkingOff","thinkingMinimal","thinkingLow","thinkingMedium","thinkingHigh","thinkingXhigh","thinkingMax"],re=["thinking0","thinking1","thinking2","thinking3","thinking4","thinking5","thinking6"],T=r((e,n,t)=>e.map(o=>({token:o,on:n,level:t})),"each"),S=[...T(H,["background"],"panel"),{token:"text",on:["background"],level:"text"},{token:"text",on:["selectedBg"],level:"textOnPanel"},{token:"userMessageText",on:["userMessageBg"],level:"textOnPanel"},{token:"toolTitle",on:k,level:"textOnPanel"},...T(["accent","success","error","warning"],["background","selectedBg",...k],"readable"),{token:"muted",on:["background","selectedBg","customMessageBg",...k],level:"readable"},{token:"dim",on:["background","selectedBg","customMessageBg",...k],level:"subtle"},{token:"thinkingText",on:["background"],level:"readable"},{token:"customMessageText",on:["customMessageBg",...k],level:"readable"},{token:"customMessageLabel",on:["background","customMessageBg","selectedBg",...k],level:"readable"},{token:"toolOutput",on:["background",...k],level:"readable"},...T(["mdHeading","mdLink","mdLinkUrl","mdCode","mdQuote","mdCodeBlockBorder","mdListBullet"],["background",...L],"readable"),{token:"mdCodeBlock",on:["background",...L,...k],level:"readable"},...T(["toolDiffAdded","toolDiffRemoved","toolDiffContext"],["background",...k],"readable"),...T(["syntaxComment","syntaxKeyword","syntaxFunction","syntaxVariable","syntaxString","syntaxNumber","syntaxType","syntaxOperator","syntaxPunctuation"],["background",...L,...k],"readable"),{token:"searchMatchText",on:["searchMatchBg"],level:"readable"},...T(["bashMode","border","borderAccent"],["background"],"readable"),{token:"borderMuted",on:["background"],level:"subtle"},...T(["mdQuoteBorder","mdHr"],["background",...L,...k],"readable"),{token:"scrollbarTrack",on:["background"],level:"track"},{token:"scrollbarThumb",on:["scrollbarTrack"],level:"thumb"},...ae.map((e,n)=>({token:e,on:["background"],level:re[n]}))],ie={dark:"readable",light:"subtle"},se="emphasis",K=["text","userMessageText","toolTitle"],I=4.5,ce=(()=>{const e=[],n=r(t=>{if(!e.includes(t)){for(const o of S)if(o.token===t)for(const l of o.on)l!=="background"&&n(l);e.push(t)}},"visit");for(const t of S)n(t.token);return e})();function v(e){return A(P(e.r,e.g,e.b)).l}r(v,"oklabLightness");function U({r:e,g:n,b:t}){const o=r(l=>{const g=l/255;return g<=.04045?g/12.92:((g+.055)/1.055)**2.4},"linear");return .2126*o(e)+.7152*o(n)+.0722*o(t)}r(U,"relativeLuminance");function C(e,n){const t=U(e),o=U(n);return(Math.max(t,o)+.05)/(Math.min(t,o)+.05)}r(C,"wcagContrast");function le(e,n){const t={r:255,g:255,b:255},o={r:0,g:0,b:0},l=C(t,e),g=C(o,e);if(n){const h=v(n),f=v(e);if(Math.abs(h-f)>.05){const m=h>f?"dark":"light";if((m==="dark"?l:g)>=I)return m}}return l>=g?"dark":"light"}r(le,"terminalAppearance");const ue=r((e,n,t)=>Math.min(t,Math.max(n,e)),"clamp");function Q({r:e,g:n,b:t}){return`#${[e,n,t].map(o=>Math.round(o).toString(16).padStart(2,"0")).join("")}`}r(Q,"hexOf");function j(e){const n=r(t=>Math.exp(-((t-.5)**2)/.125),"gaussian");return(n(e)-n(0))/(1-n(0))}r(j,"bellWeight");function X({saturation:{min:e,max:n}},t){const o=n>0?e/n:1;return o+(1-o)*j(t)}r(X,"saturationCurve");function W(e,n,t){const o=oe[e][n];if(!(t<o.reachable[0]||t>o.reachable[1]))return o.coefficients.reduce((l,g,h)=>l+g*t**h,0)}r(W,"levelTarget");function be(e){const n=ue(e.saturation??1,0,1),{background:t,foreground:o}=e;if(!t)return he(n,e.appearanceHint);const l=e.palette?.length===16?e.palette.map($):void 0,g=le(t,o),h=g==="dark",f=h?1:0,m=v(t),b=r((s,a)=>{const c=V(a),u=R[D[s]];if(!l){const{min:i,max:d}=u.saturation;return _(u.hue,(i+(d-i)*j(c))*n,c)}return q(l[G[s]??u.slot],u,c,n)},"paint"),p=r((s,a,c)=>{const u=W(s,g,a);if(u===void 0&&c===0)return;const i=(u??f)-a,d=(W(ie[g],g,a)??f)-a,B=Math.abs(i)>Math.abs(d)?i-(i-d)*Math.min(c,1):i;return a+B*(1-Math.max(0,c-1))},"target"),x=h?{r:255,g:255,b:255}:{r:0,g:0,b:0},M=r(s=>C(x,s)>=I,"readable"),z=r((s,a)=>{const c=b(s,a);if(M(c))return c;let[u,i]=[m,a];for(let d=0;d<20;d++){const B=(u+i)/2;M(b(s,B))?u=B:i=B}return b(s,u)},"limitPanel"),w=r(s=>{const a=new Map([["background",t]]);for(const c of ce){const u=[];for(const d of S)if(d.token===c)for(const B of d.on){const O=p(d.level,v(a.get(B)??t),s);if(O===void 0||O<0||O>1)return;u.push(O)}const i=h?Math.max(...u):Math.min(...u);a.set(c,H.includes(c)?z(c,i):b(c,i))}return a},"solve");let F=0,E=w(0);if(!E){let[s,a]=[0,2];E=w(a);for(let c=0;c<20;c++){const u=(s+a)/2,i=w(u);i?[a,E]=[u,i]:s=u}F=a}const N=E??new Map,J=r(s=>S.filter(a=>a.token===s).flatMap(a=>a.on.map(c=>N.get(c)??t)),"surfacesOf"),y={};for(const s of Object.keys(D)){const a=N.get(s);y[s]=a?Q(a):""}for(const s of K){const a=J(s);let c=N.get(s);if(o){const u=a.map(i=>p(se,v(i),F));if(u.every(i=>i!==void 0&&i>=0&&i<=1)){const i=h?Math.max(...u):Math.min(...u),d=v(o);if(h?d>=i:d<=i){y[s]="";continue}c=q($(o),R.neutral,V(i),n)}}c&&(y[s]=Q(ge(c,a,h)))}return{colors:y,dim:[],appearance:g}}r(be,"generateSystemThemeColors");function Y({r:e,g:n,b:t}){return ee(P(e,n,t))}r(Y,"okhslOf");function $(e){return{...Y(e),chroma:A(P(e.r,e.g,e.b)).c}}r($,"sourceOf");function q(e,n,t,o){const l=X(n,e.l),g=l>0?Math.min(1,X(n,t)/l):1,h=_(e.h,e.s*g*o,t),f=e.chroma*g*o,{l:m,c:b}=A(h);return b<=f?h:te(ne(m,f,e.h))}r(q,"anchored");function ge(e,n,t){const o=r(x=>n.every(M=>C(x,M)>=I),"meets");if(o(e))return e;const{h:l,s:g,l:h}=Y(e),f=r(x=>_(l,g,x),"at"),m=t?1:0;if(!o(f(m)))return f(m);let[b,p]=[h,m];for(let x=0;x<20;x++){const M=(b+p)/2;o(f(M))?p=M:b=M}return f(p)}r(ge,"withTextContrast");function he(e,n){const t={},o=[];for(const[l,g]of Object.entries(D)){if(H.includes(l)){t[l]="";continue}const h=g==="neutral";t[l]=!h&&e>0?G[l]??R[g].slot:"",h&&!K.includes(l)&&o.push(l)}return{colors:t,dim:o,appearance:n}}r(he,"indexedColors");export{me as DEFAULT_THEME_SETTING,ke as SYSTEM_THEME_NAME,be as generateSystemThemeColors,U as relativeLuminance,le as terminalAppearance,C as wcagContrast};
|
|
1
|
+
var Z=Object.defineProperty;var r=(e,n)=>Z(e,"name",{value:n,configurable:!0});import{colorToOkhsl as ee,colorToOklch as N,colorToRgb as te,okhslColor as D,oklabToOkhslLightness as V,oklchColor as ne,rgbColor as R}from"@earendil-works/pi-tui";const me="system",ke="light/dark",_={neutral:{hue:231.49,saturation:{min:.02,max:.08},slot:8},blue:{hue:231.49,saturation:{min:.1,max:.68},slot:4},green:{hue:158.68,saturation:{min:.1,max:.76},slot:2},red:{hue:20,saturation:{min:.1,max:.92},slot:1},yellow:{hue:82.36,saturation:{min:.5,max:1},slot:3},orange:{hue:52,saturation:{min:.12,max:.85},slot:3},violet:{hue:295,saturation:{min:.2,max:.6},slot:5},calamine:{hue:202.43,saturation:{min:.1,max:.74},slot:6},thinkingSlate:{hue:231.49,saturation:{min:.08,max:.2},slot:4},thinkingBlue:{hue:231.49,saturation:{min:.2,max:.45},slot:4},thinkingPeriwinkle:{hue:263.25,saturation:{min:.3,max:.6},slot:6},thinkingViolet:{hue:295,saturation:{min:.4,max:.75},slot:5},thinkingMagenta:{hue:337.5,saturation:{min:.5,max:.85},slot:13},thinkingRed:{hue:20,saturation:{min:.95,max:1},slot:1}},P={selectedBg:"blue",searchMatchBg:"orange",userMessageBg:"blue",customMessageBg:"violet",toolPendingBg:"neutral",toolSuccessBg:"green",toolErrorBg:"red",toolDiffAddedBg:"green",toolDiffRemovedBg:"red",text:"neutral",userMessageText:"neutral",customMessageText:"neutral",toolTitle:"neutral",syntaxOperator:"neutral",syntaxPunctuation:"neutral",muted:"neutral",dim:"neutral",thinkingText:"neutral",toolOutput:"neutral",mdLinkUrl:"neutral",mdQuote:"neutral",mdQuoteBorder:"neutral",mdHr:"neutral",mdCodeBlockBorder:"neutral",toolDiffContext:"neutral",syntaxComment:"neutral",scrollbarTrack:"neutral",scrollbarThumb:"neutral",searchMatchText:"neutral",borderMuted:"neutral",accent:"violet",borderAccent:"violet",customMessageLabel:"violet",mdCode:"violet",mdListBullet:"violet",syntaxType:"violet",border:"blue",mdLink:"blue",syntaxKeyword:"blue",syntaxVariable:"calamine",success:"green",mdCodeBlock:"green",toolDiffAdded:"green",bashMode:"green",syntaxNumber:"green",error:"red",toolDiffRemoved:"red",warning:"yellow",mdHeading:"yellow",syntaxFunction:"yellow",syntaxString:"orange",thinkingOff:"neutral",thinkingMinimal:"thinkingSlate",thinkingLow:"thinkingBlue",thinkingMedium:"thinkingPeriwinkle",thinkingHigh:"thinkingViolet",thinkingXhigh:"thinkingMagenta",thinkingMax:"thinkingRed"},G={syntaxString:2,syntaxNumber:5,searchMatchBg:3},oe={panel:{dark:{coefficients:[.29131,-.39746,2.33185,-.85524,-1.2076,.86276],reachable:[0,.979]},light:{coefficients:[-3.74073,27.94549,-78.44258,112.6798,-79.60015,22.11277],reachable:[.348,1]}},track:{dark:{coefficients:[.39028,-.23015,.83573,2.43829,-4.38292,2.01582],reachable:[0,.946]},light:{coefficients:[-5.24921,38.37322,-107.28833,152.10005,-106.17127,29.18061],reachable:[.368,1]}},thinking0:{dark:{coefficients:[.52988,-.05809,-.30924,4.63567,-6.52933,2.89108],reachable:[0,.873]},light:{coefficients:[-28.27749,182.85284,-469.62416,603.15916,-384.59976,97.35147],reachable:[.51,1]}},thinking1:{dark:{coefficients:[.55278,-.03667,-.45659,4.95347,-6.90265,3.0706],reachable:[0,.858]},light:{coefficients:[-37.10484,235.86282,-596.62344,754.3633,-474.00763,118.3551],reachable:[.535,1]}},thinking2:{dark:{coefficients:[.57486,-.01765,-.58987,5.25227,-7.27175,3.25532],reachable:[0,.842]},light:{coefficients:[-59.89653,377.05024,-945.07843,1182.03145,-734.96375,181.68658],reachable:[.556,1]}},thinking3:{dark:{coefficients:[.59621,-62e-5,-.71148,5.53588,-7.6392,3.44606],reachable:[0,.827]},light:{coefficients:[-72.07122,445.84082,-1099.57352,1353.88793,-829.53392,202.26164],reachable:[.58,1]}},thinking4:{dark:{coefficients:[.61691,.01462,-.82288,5.80651,-8.00641,3.64333],reachable:[0,.811]},light:{coefficients:[-110.14338,674.21488,-1645.75941,2004.32367,-1215.15899,293.3183],reachable:[.6,1]}},thinking5:{dark:{coefficients:[.63702,.02826,-.92498,6.06465,-8.37246,3.84651],reachable:[0,.795]},light:{coefficients:[-175.47701,1063.54495,-2570.70594,3098.80776,-1860.15527,444.76392],reachable:[.62,1]}},thinking6:{dark:{coefficients:[.65658,.04044,-1.01835,6.30989,-8.73529,4.05439],reachable:[0,.779]},light:{coefficients:[-183.81712,1094.70055,-2602.68539,3088.71276,-1826.91131,430.75931],reachable:[.643,1]}},subtle:{dark:{coefficients:[.56762,-.02475,-.5383,5.12628,-7.10931,3.17324],reachable:[0,.848]},light:{coefficients:[-232.85459,1376.54473,-3249.11801,3827.91186,-2248.29472,526.55751],reachable:[.657,1]}},thumb:{dark:{coefficients:[.60323,.00278,-.73328,5.57157,-7.68067,3.46933],reachable:[0,.823]},light:{coefficients:[-82.89897,511.01355,-1255.98095,1540.76821,-940.68087,228.58523],reachable:[.586,1]}},readable:{dark:{coefficients:[.66937,.04704,-1.06871,6.43941,-8.9332,4.17229],reachable:[0,.77]},light:{coefficients:[-1554.52576,8733.56817,-19604.93507,21977.72696,-12300.99599,2749.81288],reachable:[.751,1]}},emphasis:{dark:{coefficients:[.7303,.07695,-1.31626,7.1681,-10.14436,4.92846],reachable:[0,.712]},light:{coefficients:[-4948.31942,26870.91986,-58334.48399,63280.17197,-34298.01053,7430.30146],reachable:[.811,1]}},textOnPanel:{dark:{coefficients:[.86713,.05232,-.89428,4.79014,-5.5432,1.75023],reachable:[0,.542]},light:{coefficients:[-8570.89457,43954.60805,-90084.00702,92220.6791,-47152.15802,9632.27113],reachable:[.867,1]}},text:{dark:{coefficients:[.89242,.02311,-.44862,2.34417,-.06084,-2.63844],reachable:[0,.5]},light:{coefficients:[-2004.67048,6664.47299,-6060.70202,-1792.61209,5133.82359,-1939.85583],reachable:[.894,1]}}},m=["toolPendingBg","toolSuccessBg","toolErrorBg"],L=["userMessageBg","customMessageBg"],H=["userMessageBg","toolPendingBg","toolSuccessBg","toolErrorBg","selectedBg","searchMatchBg","customMessageBg","toolDiffAddedBg","toolDiffRemovedBg"],ae=["thinkingOff","thinkingMinimal","thinkingLow","thinkingMedium","thinkingHigh","thinkingXhigh","thinkingMax"],re=["thinking0","thinking1","thinking2","thinking3","thinking4","thinking5","thinking6"],T=r((e,n,t)=>e.map(o=>({token:o,on:n,level:t})),"each"),S=[...T(H,["background"],"panel"),{token:"text",on:["background"],level:"text"},{token:"text",on:["selectedBg"],level:"textOnPanel"},{token:"userMessageText",on:["userMessageBg"],level:"textOnPanel"},{token:"toolTitle",on:m,level:"textOnPanel"},...T(["accent","success","error","warning"],["background","selectedBg",...m],"readable"),{token:"muted",on:["background","selectedBg","customMessageBg",...m],level:"readable"},{token:"dim",on:["background","selectedBg","customMessageBg",...m],level:"subtle"},{token:"thinkingText",on:["background"],level:"readable"},{token:"customMessageText",on:["customMessageBg",...m],level:"readable"},{token:"customMessageLabel",on:["background","customMessageBg","selectedBg",...m],level:"readable"},{token:"toolOutput",on:["background",...m],level:"readable"},...T(["mdHeading","mdLink","mdLinkUrl","mdCode","mdQuote","mdCodeBlockBorder","mdListBullet"],["background",...L],"readable"),{token:"mdCodeBlock",on:["background",...L,...m],level:"readable"},...T(["toolDiffAdded","toolDiffRemoved","toolDiffContext"],["background",...m],"readable"),{token:"toolDiffAdded",on:["toolDiffAddedBg"],level:"readable"},{token:"toolDiffRemoved",on:["toolDiffRemovedBg"],level:"readable"},...T(["syntaxComment","syntaxKeyword","syntaxFunction","syntaxVariable","syntaxString","syntaxNumber","syntaxType","syntaxOperator","syntaxPunctuation"],["background",...L,...m],"readable"),{token:"searchMatchText",on:["searchMatchBg"],level:"readable"},...T(["bashMode","border","borderAccent"],["background"],"readable"),{token:"borderMuted",on:["background"],level:"subtle"},...T(["mdQuoteBorder","mdHr"],["background",...L,...m],"readable"),{token:"scrollbarTrack",on:["background"],level:"track"},{token:"scrollbarThumb",on:["scrollbarTrack"],level:"thumb"},...ae.map((e,n)=>({token:e,on:["background"],level:re[n]}))],ie={dark:"readable",light:"subtle"},le="emphasis",K=["text","userMessageText","toolTitle"],I=4.5,se=(()=>{const e=[],n=r(t=>{if(!e.includes(t)){for(const o of S)if(o.token===t)for(const c of o.on)c!=="background"&&n(c);e.push(t)}},"visit");for(const t of S)n(t.token);return e})();function v(e){return N(R(e.r,e.g,e.b)).l}r(v,"oklabLightness");function U({r:e,g:n,b:t}){const o=r(c=>{const d=c/255;return d<=.04045?d/12.92:((d+.055)/1.055)**2.4},"linear");return .2126*o(e)+.7152*o(n)+.0722*o(t)}r(U,"relativeLuminance");function C(e,n){const t=U(e),o=U(n);return(Math.max(t,o)+.05)/(Math.min(t,o)+.05)}r(C,"wcagContrast");function ce(e,n){const t={r:255,g:255,b:255},o={r:0,g:0,b:0},c=C(t,e),d=C(o,e);if(n){const g=v(n),f=v(e);if(Math.abs(g-f)>.05){const k=g>f?"dark":"light";if((k==="dark"?c:d)>=I)return k}}return c>=d?"dark":"light"}r(ce,"terminalAppearance");const ue=r((e,n,t)=>Math.min(t,Math.max(n,e)),"clamp");function Q({r:e,g:n,b:t}){return`#${[e,n,t].map(o=>Math.round(o).toString(16).padStart(2,"0")).join("")}`}r(Q,"hexOf");function j(e){const n=r(t=>Math.exp(-((t-.5)**2)/.125),"gaussian");return(n(e)-n(0))/(1-n(0))}r(j,"bellWeight");function X({saturation:{min:e,max:n}},t){const o=n>0?e/n:1;return o+(1-o)*j(t)}r(X,"saturationCurve");function W(e,n,t){const o=oe[e][n];if(!(t<o.reachable[0]||t>o.reachable[1]))return o.coefficients.reduce((c,d,g)=>c+d*t**g,0)}r(W,"levelTarget");function be(e){const n=ue(e.saturation??1,0,1),{background:t,foreground:o}=e;if(!t)return ge(n,e.appearanceHint);const c=e.palette?.length===16?e.palette.map($):void 0,d=ce(t,o),g=d==="dark",f=g?1:0,k=v(t),b=r((l,a)=>{const s=V(a),u=_[P[l]];if(!c){const{min:i,max:h}=u.saturation;return D(u.hue,(i+(h-i)*j(s))*n,s)}return q(c[G[l]??u.slot],u,s,n)},"paint"),p=r((l,a,s)=>{const u=W(l,d,a);if(u===void 0&&s===0)return;const i=(u??f)-a,h=(W(ie[d],d,a)??f)-a,B=Math.abs(i)>Math.abs(h)?i-(i-h)*Math.min(s,1):i;return a+B*(1-Math.max(0,s-1))},"target"),x=g?{r:255,g:255,b:255}:{r:0,g:0,b:0},M=r(l=>C(x,l)>=I,"readable"),z=r((l,a)=>{const s=b(l,a);if(M(s))return s;let[u,i]=[k,a];for(let h=0;h<20;h++){const B=(u+i)/2;M(b(l,B))?u=B:i=B}return b(l,u)},"limitPanel"),w=r(l=>{const a=new Map([["background",t]]);for(const s of se){const u=[];for(const h of S)if(h.token===s)for(const B of h.on){const O=p(h.level,v(a.get(B)??t),l);if(O===void 0||O<0||O>1)return;u.push(O)}const i=g?Math.max(...u):Math.min(...u);a.set(s,H.includes(s)?z(s,i):b(s,i))}return a},"solve");let F=0,E=w(0);if(!E){let[l,a]=[0,2];E=w(a);for(let s=0;s<20;s++){const u=(l+a)/2,i=w(u);i?[a,E]=[u,i]:l=u}F=a}const A=E??new Map,J=r(l=>S.filter(a=>a.token===l).flatMap(a=>a.on.map(s=>A.get(s)??t)),"surfacesOf"),y={};for(const l of Object.keys(P)){const a=A.get(l);y[l]=a?Q(a):""}for(const l of K){const a=J(l);let s=A.get(l);if(o){const u=a.map(i=>p(le,v(i),F));if(u.every(i=>i!==void 0&&i>=0&&i<=1)){const i=g?Math.max(...u):Math.min(...u),h=v(o);if(g?h>=i:h<=i){y[l]="";continue}s=q($(o),_.neutral,V(i),n)}}s&&(y[l]=Q(de(s,a,g)))}return{colors:y,dim:[],appearance:d}}r(be,"generateSystemThemeColors");function Y({r:e,g:n,b:t}){return ee(R(e,n,t))}r(Y,"okhslOf");function $(e){return{...Y(e),chroma:N(R(e.r,e.g,e.b)).c}}r($,"sourceOf");function q(e,n,t,o){const c=X(n,e.l),d=c>0?Math.min(1,X(n,t)/c):1,g=D(e.h,e.s*d*o,t),f=e.chroma*d*o,{l:k,c:b}=N(g);return b<=f?g:te(ne(k,f,e.h))}r(q,"anchored");function de(e,n,t){const o=r(x=>n.every(M=>C(x,M)>=I),"meets");if(o(e))return e;const{h:c,s:d,l:g}=Y(e),f=r(x=>D(c,d,x),"at"),k=t?1:0;if(!o(f(k)))return f(k);let[b,p]=[g,k];for(let x=0;x<20;x++){const M=(b+p)/2;o(f(M))?p=M:b=M}return f(p)}r(de,"withTextContrast");function ge(e,n){const t={},o=[];for(const[c,d]of Object.entries(P)){if(H.includes(c)){t[c]="";continue}const g=d==="neutral";t[c]=!g&&e>0?G[c]??_[d].slot:"",g&&!K.includes(c)&&o.push(c)}return{colors:t,dim:o,appearance:n}}r(ge,"indexedColors");export{ke as DEFAULT_THEME_SETTING,me as SYSTEM_THEME_NAME,be as generateSystemThemeColors,U as relativeLuminance,ce as terminalAppearance,C as wcagContrast};
|
|
@@ -165,6 +165,16 @@ export declare const THEME_TOKENS: {
|
|
|
165
165
|
readonly slot: "foreground";
|
|
166
166
|
readonly description: "Context lines in tool diffs";
|
|
167
167
|
};
|
|
168
|
+
readonly toolDiffAddedBg: {
|
|
169
|
+
readonly slot: "background";
|
|
170
|
+
readonly description: "Whole-line background of added lines in tool diffs (falls back to toolSuccessBg when omitted)";
|
|
171
|
+
readonly fallback: "toolSuccessBg";
|
|
172
|
+
};
|
|
173
|
+
readonly toolDiffRemovedBg: {
|
|
174
|
+
readonly slot: "background";
|
|
175
|
+
readonly description: "Whole-line background of removed lines in tool diffs (falls back to toolErrorBg when omitted)";
|
|
176
|
+
readonly fallback: "toolErrorBg";
|
|
177
|
+
};
|
|
168
178
|
readonly syntaxComment: {
|
|
169
179
|
readonly slot: "foreground";
|
|
170
180
|
readonly description: "Syntax highlighting: comments";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var n=(o,t)=>i(o,"name",{value:t,configurable:!0});function s(o){for(const[t,e]of Object.entries(o)){if(e.fallback===void 0)continue;const r=o[e.fallback];if(r===void 0)throw new Error(`Theme token ${t} has unknown fallback ${e.fallback}`);if(r.slot!==e.slot)throw new Error(`Theme token ${t} has fallback ${e.fallback} in a different color slot`)}return o}n(s,"defineThemeTokens");const l=s({accent:{slot:"foreground",description:"Primary accent color (logo, selected items, cursor)"},border:{slot:"foreground",description:"Normal borders"},borderAccent:{slot:"foreground",description:"Highlighted borders"},borderMuted:{slot:"foreground",description:"Subtle borders"},success:{slot:"foreground",description:"Success states"},error:{slot:"foreground",description:"Error states"},warning:{slot:"foreground",description:"Warning states"},muted:{slot:"foreground",description:"Secondary/dimmed text"},dim:{slot:"foreground",description:"Very dimmed text (more subtle than muted)"},text:{slot:"foreground",description:"Default text color (usually empty string)"},thinkingText:{slot:"foreground",description:"Thinking block text color"},scrollbarTrack:{slot:"foreground",description:"Fullscreen scrollbar track foreground (falls back to muted when omitted)",fallback:"muted"},scrollbarThumb:{slot:"foreground",description:"Fullscreen scrollbar thumb foreground (falls back to text when omitted)",fallback:"text"},selectedBg:{slot:"background",description:"Selected item background"},searchMatchBg:{slot:"background",description:"Transcript search match background and current-match text (falls back to selectedBg when omitted)",fallback:"selectedBg"},searchMatchText:{slot:"foreground",description:"Transcript search match text and current-match background (falls back to text when omitted)",fallback:"text"},userMessageBg:{slot:"background",description:"User message background"},userMessageText:{slot:"foreground",description:"User message text color"},customMessageBg:{slot:"background",description:"Custom message background (hook-injected messages)"},customMessageText:{slot:"foreground",description:"Custom message text color"},customMessageLabel:{slot:"foreground",description:"Custom message type label color"},toolPendingBg:{slot:"background",description:"Tool execution box (pending state)"},toolSuccessBg:{slot:"background",description:"Tool execution box (success state)"},toolErrorBg:{slot:"background",description:"Tool execution box (error state)"},toolTitle:{slot:"foreground",description:"Tool execution box title color"},toolOutput:{slot:"foreground",description:"Tool execution box output text color"},mdHeading:{slot:"foreground",description:"Markdown heading text"},mdLink:{slot:"foreground",description:"Markdown link text"},mdLinkUrl:{slot:"foreground",description:"Markdown link URL"},mdCode:{slot:"foreground",description:"Markdown inline code"},mdCodeBlock:{slot:"foreground",description:"Markdown code block content"},mdCodeBlockBorder:{slot:"foreground",description:"Markdown code block fences"},mdQuote:{slot:"foreground",description:"Markdown blockquote text"},mdQuoteBorder:{slot:"foreground",description:"Markdown blockquote border"},mdHr:{slot:"foreground",description:"Markdown horizontal rule"},mdListBullet:{slot:"foreground",description:"Markdown list bullets/numbers"},toolDiffAdded:{slot:"foreground",description:"Added lines in tool diffs"},toolDiffRemoved:{slot:"foreground",description:"Removed lines in tool diffs"},toolDiffContext:{slot:"foreground",description:"Context lines in tool diffs"},syntaxComment:{slot:"foreground",description:"Syntax highlighting: comments"},syntaxKeyword:{slot:"foreground",description:"Syntax highlighting: keywords"},syntaxFunction:{slot:"foreground",description:"Syntax highlighting: function names"},syntaxVariable:{slot:"foreground",description:"Syntax highlighting: variable names"},syntaxString:{slot:"foreground",description:"Syntax highlighting: string literals"},syntaxNumber:{slot:"foreground",description:"Syntax highlighting: number literals"},syntaxType:{slot:"foreground",description:"Syntax highlighting: type names"},syntaxOperator:{slot:"foreground",description:"Syntax highlighting: operators"},syntaxPunctuation:{slot:"foreground",description:"Syntax highlighting: punctuation"},thinkingOff:{slot:"foreground",description:"Thinking level border: off"},thinkingMinimal:{slot:"foreground",description:"Thinking level border: minimal"},thinkingLow:{slot:"foreground",description:"Thinking level border: low"},thinkingMedium:{slot:"foreground",description:"Thinking level border: medium"},thinkingHigh:{slot:"foreground",description:"Thinking level border: high"},thinkingXhigh:{slot:"foreground",description:"Thinking level border: xhigh"},thinkingMax:{slot:"foreground",description:"Thinking level border: max (falls back to thinkingXhigh when omitted)",fallback:"thinkingXhigh"},bashMode:{slot:"foreground",description:"Editor border color in bash mode"}});export{l as THEME_TOKENS};
|
|
1
|
+
var i=Object.defineProperty;var n=(o,t)=>i(o,"name",{value:t,configurable:!0});function s(o){for(const[t,e]of Object.entries(o)){if(e.fallback===void 0)continue;const r=o[e.fallback];if(r===void 0)throw new Error(`Theme token ${t} has unknown fallback ${e.fallback}`);if(r.slot!==e.slot)throw new Error(`Theme token ${t} has fallback ${e.fallback} in a different color slot`)}return o}n(s,"defineThemeTokens");const l=s({accent:{slot:"foreground",description:"Primary accent color (logo, selected items, cursor)"},border:{slot:"foreground",description:"Normal borders"},borderAccent:{slot:"foreground",description:"Highlighted borders"},borderMuted:{slot:"foreground",description:"Subtle borders"},success:{slot:"foreground",description:"Success states"},error:{slot:"foreground",description:"Error states"},warning:{slot:"foreground",description:"Warning states"},muted:{slot:"foreground",description:"Secondary/dimmed text"},dim:{slot:"foreground",description:"Very dimmed text (more subtle than muted)"},text:{slot:"foreground",description:"Default text color (usually empty string)"},thinkingText:{slot:"foreground",description:"Thinking block text color"},scrollbarTrack:{slot:"foreground",description:"Fullscreen scrollbar track foreground (falls back to muted when omitted)",fallback:"muted"},scrollbarThumb:{slot:"foreground",description:"Fullscreen scrollbar thumb foreground (falls back to text when omitted)",fallback:"text"},selectedBg:{slot:"background",description:"Selected item background"},searchMatchBg:{slot:"background",description:"Transcript search match background and current-match text (falls back to selectedBg when omitted)",fallback:"selectedBg"},searchMatchText:{slot:"foreground",description:"Transcript search match text and current-match background (falls back to text when omitted)",fallback:"text"},userMessageBg:{slot:"background",description:"User message background"},userMessageText:{slot:"foreground",description:"User message text color"},customMessageBg:{slot:"background",description:"Custom message background (hook-injected messages)"},customMessageText:{slot:"foreground",description:"Custom message text color"},customMessageLabel:{slot:"foreground",description:"Custom message type label color"},toolPendingBg:{slot:"background",description:"Tool execution box (pending state)"},toolSuccessBg:{slot:"background",description:"Tool execution box (success state)"},toolErrorBg:{slot:"background",description:"Tool execution box (error state)"},toolTitle:{slot:"foreground",description:"Tool execution box title color"},toolOutput:{slot:"foreground",description:"Tool execution box output text color"},mdHeading:{slot:"foreground",description:"Markdown heading text"},mdLink:{slot:"foreground",description:"Markdown link text"},mdLinkUrl:{slot:"foreground",description:"Markdown link URL"},mdCode:{slot:"foreground",description:"Markdown inline code"},mdCodeBlock:{slot:"foreground",description:"Markdown code block content"},mdCodeBlockBorder:{slot:"foreground",description:"Markdown code block fences"},mdQuote:{slot:"foreground",description:"Markdown blockquote text"},mdQuoteBorder:{slot:"foreground",description:"Markdown blockquote border"},mdHr:{slot:"foreground",description:"Markdown horizontal rule"},mdListBullet:{slot:"foreground",description:"Markdown list bullets/numbers"},toolDiffAdded:{slot:"foreground",description:"Added lines in tool diffs"},toolDiffRemoved:{slot:"foreground",description:"Removed lines in tool diffs"},toolDiffContext:{slot:"foreground",description:"Context lines in tool diffs"},toolDiffAddedBg:{slot:"background",description:"Whole-line background of added lines in tool diffs (falls back to toolSuccessBg when omitted)",fallback:"toolSuccessBg"},toolDiffRemovedBg:{slot:"background",description:"Whole-line background of removed lines in tool diffs (falls back to toolErrorBg when omitted)",fallback:"toolErrorBg"},syntaxComment:{slot:"foreground",description:"Syntax highlighting: comments"},syntaxKeyword:{slot:"foreground",description:"Syntax highlighting: keywords"},syntaxFunction:{slot:"foreground",description:"Syntax highlighting: function names"},syntaxVariable:{slot:"foreground",description:"Syntax highlighting: variable names"},syntaxString:{slot:"foreground",description:"Syntax highlighting: string literals"},syntaxNumber:{slot:"foreground",description:"Syntax highlighting: number literals"},syntaxType:{slot:"foreground",description:"Syntax highlighting: type names"},syntaxOperator:{slot:"foreground",description:"Syntax highlighting: operators"},syntaxPunctuation:{slot:"foreground",description:"Syntax highlighting: punctuation"},thinkingOff:{slot:"foreground",description:"Thinking level border: off"},thinkingMinimal:{slot:"foreground",description:"Thinking level border: minimal"},thinkingLow:{slot:"foreground",description:"Thinking level border: low"},thinkingMedium:{slot:"foreground",description:"Thinking level border: medium"},thinkingHigh:{slot:"foreground",description:"Thinking level border: high"},thinkingXhigh:{slot:"foreground",description:"Thinking level border: xhigh"},thinkingMax:{slot:"foreground",description:"Thinking level border: max (falls back to thinkingXhigh when omitted)",fallback:"thinkingXhigh"},bashMode:{slot:"foreground",description:"Editor border color in bash mode"}});export{l as THEME_TOKENS};
|
|
@@ -4,7 +4,7 @@ import type { PromptDisposition, QueuedInputDisposition, SessionStats } from "..
|
|
|
4
4
|
import type { BackgroundProcessInfo } from "../../core/background-processes.ts";
|
|
5
5
|
import type { BashResult } from "../../core/bash-executor.ts";
|
|
6
6
|
import type { CompactionResult } from "../../core/compaction/index.ts";
|
|
7
|
-
import type { ApprovalOptionKind, ApprovalSource } from "../../core/extensions/types.ts";
|
|
7
|
+
import type { ApprovalOptionKind, ApprovalSource, ExtensionPanel } from "../../core/extensions/types.ts";
|
|
8
8
|
import type { HostCapability } from "../../core/host-capabilities.ts";
|
|
9
9
|
import type { SandboxStatus } from "../../core/sandbox/shell-sandbox.ts";
|
|
10
10
|
import type { SessionEntry, SessionTreeNode } from "../../core/session-manager.ts";
|
|
@@ -590,11 +590,7 @@ export type RpcExtensionUIRequest = {
|
|
|
590
590
|
id: string;
|
|
591
591
|
method: "setPanel";
|
|
592
592
|
panelId: string;
|
|
593
|
-
panel?:
|
|
594
|
-
title?: string;
|
|
595
|
-
lines?: string[];
|
|
596
|
-
placement?: "aux" | "status";
|
|
597
|
-
};
|
|
593
|
+
panel?: ExtensionPanel;
|
|
598
594
|
} | {
|
|
599
595
|
type: "extension_ui_request";
|
|
600
596
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-advisor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "advisor: the model asks another strong model to review its current plan and point out risks. Adapted from @juicesharp/rpiv-advisor 2.13.8 (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
24
|
-
"@dalcode/dal-router": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
24
|
+
"@dalcode/dal-router": "1.0.55",
|
|
25
25
|
"typebox": "1.3.27"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-awake",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Keeps the computer from going to sleep while a long agent run is in progress, and lets it sleep again when the run ends. Adapted from @narumitw/pi-caffeinate (MIT).",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.55"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-bridge",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
22
22
|
"typebox": "1.3.7"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-capabilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Capability center for DAL: switches on the reviewed MCP connectors, skills and engine packages a task needs (installed automatically from the signed DAL market), with /capabilities to list, disable and enable them.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@dalcode/dal-mcp": "1.0.
|
|
27
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
28
|
-
"@dalcode/deepailab": "1.0.
|
|
26
|
+
"@dalcode/dal-mcp": "1.0.55",
|
|
27
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
28
|
+
"@dalcode/deepailab": "1.0.55"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-codeindex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Code index: a persistent local symbol and reference index (tree-sitter WebAssembly grammars) the model queries to find definitions, callers, file outlines and related files without repeated grep.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
22
22
|
"@vscode/tree-sitter-wasm": "0.3.1",
|
|
23
23
|
"ignore": "7.0.8",
|
|
24
24
|
"typebox": "1.3.27"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-compat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Claude Code compatibility: the user's and project's .claude/rules/ and .claude/CLAUDE.md apply in DAL. Grown from the claude-rules extension example.",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
22
22
|
"minimatch": "11.0.3"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-dap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Debugger for DAL: breakpoints, stepping, call stacks and variables in Node.js and Python programs over the Debug Adapter Protocol, installing the adapter on first use. The DAP client is adapted from oh-my-pi's src/dap (MIT).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
27
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
28
28
|
"typebox": "1.3.27"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-gateway",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dalcode/deepailab": "1.0.
|
|
20
|
+
"@dalcode/deepailab": "1.0.55"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-goal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Goal mode for DAL: /goal keeps the agent working on one objective until it is verified complete, with token and continuation limits. Adapted from @narumitw/pi-goal 0.54.11 (MIT, narumiruna); the independent completion check adapts pi-goal-x 0.32.3 (MIT, Lucas).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/dal-subagent": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
25
|
+
"@dalcode/dal-subagent": "1.0.55",
|
|
26
26
|
"typebox": "1.3.27"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-guard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
25
|
-
"@dalcode/dal-bridge": "1.0.
|
|
26
|
-
"@dalcode/dal-halo": "1.0.
|
|
24
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
25
|
+
"@dalcode/dal-bridge": "1.0.55",
|
|
26
|
+
"@dalcode/dal-halo": "1.0.55"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-interactive",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Terminal-UI conveniences adopted from pi's example extensions: the questionnaire tool (the model asks you questions), /handoff (carry context into a new session) and interactive ! commands (vim, git rebase -i, htop). Active only in the TUI; stands down under DAL Code.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
23
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
24
24
|
"typebox": "1.3.7"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-lang",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
21
|
-
"@dalcode/dal-bridge": "1.0.
|
|
20
|
+
"@dalcode/dal-pi-kit": "1.0.55",
|
|
21
|
+
"@dalcode/dal-bridge": "1.0.55"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalcode/dal-learn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Self-evolution for DAL: lessons learned from earlier sessions (project and personal), a project map of verified commands and locations, effect tracking, and skill proposals for recurring procedures (/lessons).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@dalcode/dal-pi-kit": "1.0.
|
|
33
|
+
"@dalcode/dal-pi-kit": "1.0.55"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@earendil-works/pi-coding-agent": "^1.0.9"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var oe=Object.defineProperty;var k=(f,e)=>oe(f,"name",{value:e,configurable:!0});var re=Object.defineProperty,j=k((f,e)=>re(f,"name",{value:e,configurable:!0}),"y");import{existsSync as ie,readdirSync as ne,readFileSync as ae,realpathSync as ce}from"node:fs";import{join as x}from"node:path";import{t as y}from"@dalcode/dal-pi-kit";import{buildExtractPrompt as de,buildInducePrompt as ue,buildReflectPrompt as le,draftFromFix as pe,EXTRACT_SYSTEM_PROMPT as fe,INDUCE_SYSTEM_PROMPT as he,normalizeCommand as R,parseExtractAnswer as me,parseInduceAnswer as ke,parseReflectAnswer as ye,REFLECT_SYSTEM_PROMPT as ge,taskNoteSignature as U}from"./extract.js";import{applyFeedback as je,proposeLesson as Fe,readLessons as m,recordInjection as we,renderLessonsSection as xe,retireLessons as De,updateLessons as D}from"./lessons.js";import{desktopProjectsRoot as Ce,importDesktopRules as be}from"./migrate.js";import{procedureOf as Ee,proceduresPath as Ie,recordProcedure as Ae,updateProcedures as $}from"./procedures.js";import{identifyProject as Se}from"./project.js";import{learnFromRun as ve,readMap as Pe,renderMapSection as Re,updateMap as $e,viewMap as Me}from"./project-map.js";import{rejectLesson as Y,riskOf as M}from"./safety.js";import{analyzeRun as T,buildExcerpt as L,longSuccess as Te,needsModel as Le,needsReflection as _e,protectedChanges as q,runsChecks as X,verifiedOutcome as Be}from"./signals.js";import{acceptProposal as Ke}from"./skill-actions.js";import{applyPatches as z,decideScope as Oe,improvementFor as We,isEditable as Ne,lineDiff as b,MAX_SKILL_CHARS as Ue,matchSkill as Ye,restoreBefore as H,runOutcome as qe,skillKey as E,skillsLoaded as Xe,trackUse as ze}from"./skill-evolution.js";import{claimExtraction as He,claimPending as Ge,learnedRoot as Je,listPending as Qe,MAX_PENDING_ATTEMPTS as Ve,pendingDir as Ze,projectDir as I,recordExtractionTokens as et,removePending as tt,updateDoc as G,userDir as st,writePending as _}from"./store.js";const J=6,Q=4;function B(f,e){return e?.length?f.map(t=>t.tag==="helpful"?{...t,tag:"neutral",why:`${t.why} [not credited: the run changed ${e.join(", ")}]`.slice(0,200)}:t):f}k(B,"Je"),j(B,"capProtectedCredit");function A(f){return{signals:f,notices:[],proposed:[],taskNotes:[],feedback:0,modelCall:"none",reflection:"none",induction:"none"}}k(A,"_"),j(A,"emptyReport");function V(f,e){const t=[...f.list()],o=[...new Set((e.evidence??[]).flatMap(r=>r.skills))],s=[e.steps.join(" "),...o];for(const r of s)for(const i of f.search?.(r)??[])t.some(n=>n.name===i.name)||t.push(i);return t}k(V,"Qe"),j(V,"candidateSkills");class ot{static{k(this,"gt")}static{j(this,"Learner")}root;desktopRoot;dailyCap;reflectCap;autoAdoptInto;clock;inFlight=new Set;constructor(e={}){this.root=Je(e.root),this.desktopRoot=e.desktopRoot??Ce(),this.dailyCap=e.dailyCap??J,this.reflectCap=e.reflectCap??Math.min(Q,this.dailyCap),this.clock=e.now??Date.now,this.autoAdoptInto=e.autoAdoptInto}now(){return this.clock()}project(e){return Se(e)}projectDir(e){return I(this.root,e.key)}userDir(){return st(this.root)}recordProjectIdentity(e){const t=x(this.projectDir(e),"project.json");G(t,o=>({root:typeof o?.root=="string"?o.root:"",remote:o?.remote,roots:o?.roots}),o=>{const s=Array.isArray(o.roots)?o.roots:[];if(!(o.root===e.root&&s.includes(e.root)))return{root:e.root,remote:e.remote,roots:[...new Set([...s,e.root])].slice(-20)}})}startSession(e,t={}){const o=this.now(),s=this.project(e),r=this.projectDir(s);let i=0;const n=[];try{this.recordProjectIdentity(s)}catch{}try{D(r,
|
|
2
|
-
`),evidence:n,risk:M(P)}}else{const w=z(
|
|
1
|
+
var oe=Object.defineProperty;var k=(f,e)=>oe(f,"name",{value:e,configurable:!0});var re=Object.defineProperty,j=k((f,e)=>re(f,"name",{value:e,configurable:!0}),"y");import{existsSync as ie,readdirSync as ne,readFileSync as ae,realpathSync as ce}from"node:fs";import{join as x}from"node:path";import{t as y}from"@dalcode/dal-pi-kit";import{buildExtractPrompt as de,buildInducePrompt as ue,buildReflectPrompt as le,draftFromFix as pe,EXTRACT_SYSTEM_PROMPT as fe,INDUCE_SYSTEM_PROMPT as he,normalizeCommand as R,parseExtractAnswer as me,parseInduceAnswer as ke,parseReflectAnswer as ye,REFLECT_SYSTEM_PROMPT as ge,taskNoteSignature as U}from"./extract.js";import{applyFeedback as je,proposeLesson as Fe,readLessons as m,recordInjection as we,renderLessonsSection as xe,retireLessons as De,updateLessons as D}from"./lessons.js";import{desktopProjectsRoot as Ce,importDesktopRules as be}from"./migrate.js";import{procedureOf as Ee,proceduresPath as Ie,recordProcedure as Ae,updateProcedures as $}from"./procedures.js";import{identifyProject as Se}from"./project.js";import{learnFromRun as ve,readMap as Pe,renderMapSection as Re,updateMap as $e,viewMap as Me}from"./project-map.js";import{rejectLesson as Y,riskOf as M}from"./safety.js";import{analyzeRun as T,buildExcerpt as L,longSuccess as Te,needsModel as Le,needsReflection as _e,protectedChanges as q,runsChecks as X,verifiedOutcome as Be}from"./signals.js";import{acceptProposal as Ke}from"./skill-actions.js";import{applyPatches as z,decideScope as Oe,improvementFor as We,isEditable as Ne,lineDiff as b,MAX_SKILL_CHARS as Ue,matchSkill as Ye,restoreBefore as H,runOutcome as qe,skillKey as E,skillsLoaded as Xe,trackUse as ze}from"./skill-evolution.js";import{claimExtraction as He,claimPending as Ge,learnedRoot as Je,listPending as Qe,MAX_PENDING_ATTEMPTS as Ve,pendingDir as Ze,projectDir as I,recordExtractionTokens as et,removePending as tt,updateDoc as G,userDir as st,writePending as _}from"./store.js";const J=6,Q=4;function B(f,e){return e?.length?f.map(t=>t.tag==="helpful"?{...t,tag:"neutral",why:`${t.why} [not credited: the run changed ${e.join(", ")}]`.slice(0,200)}:t):f}k(B,"Je"),j(B,"capProtectedCredit");function A(f){return{signals:f,notices:[],proposed:[],taskNotes:[],feedback:0,modelCall:"none",reflection:"none",induction:"none"}}k(A,"_"),j(A,"emptyReport");function V(f,e){const t=[...f.list()],o=[...new Set((e.evidence??[]).flatMap(r=>r.skills))],s=[e.steps.join(" "),...o];for(const r of s)for(const i of f.search?.(r)??[])t.some(n=>n.name===i.name)||t.push(i);return t}k(V,"Qe"),j(V,"candidateSkills");class ot{static{k(this,"gt")}static{j(this,"Learner")}root;desktopRoot;dailyCap;reflectCap;autoAdoptInto;clock;inFlight=new Set;constructor(e={}){this.root=Je(e.root),this.desktopRoot=e.desktopRoot??Ce(),this.dailyCap=e.dailyCap??J,this.reflectCap=e.reflectCap??Math.min(Q,this.dailyCap),this.clock=e.now??Date.now,this.autoAdoptInto=e.autoAdoptInto}now(){return this.clock()}project(e){return Se(e)}projectDir(e){return I(this.root,e.key)}userDir(){return st(this.root)}recordProjectIdentity(e){const t=x(this.projectDir(e),"project.json");G(t,o=>({root:typeof o?.root=="string"?o.root:"",remote:o?.remote,roots:o?.roots}),o=>{const s=Array.isArray(o.roots)?o.roots:[];if(!(o.root===e.root&&s.includes(e.root)))return{root:e.root,remote:e.remote,roots:[...new Set([...s,e.root])].slice(-20)}})}startSession(e,t={}){const o=this.now(),s=this.project(e),r=this.projectDir(s);let i=0;const n=[];try{this.recordProjectIdentity(s)}catch{}try{D(r,u=>{const l=be(u,[s.root,e],this.desktopRoot,o);if(l)return i=l.added.length,l.doc})}catch{i=0}for(const u of[r,this.userDir()])try{D(u,l=>{const c=De(l,o);return n.push(...c.transitions),c.transitions.length>0?c.doc:void 0})}catch{}const a=this.render(s,o,t);for(const u of[r,this.userDir()])try{D(u,l=>{const c=we(l,a.lessonIds,a.eligible,o);return n.push(...c.transitions),c.doc===l?void 0:c.doc})}catch{}const{eligible:d,...p}=a;return{...p,imported:i,retired:n}}preview(e,t={}){const{eligible:o,...s}=this.render(this.project(e),this.now(),t);return{...s,imported:0,retired:[]}}render(e,t,o){const s=this.projectDir(e),r=m(s).lessons.filter(c=>!(o.hostHasLearnedSection&&c.origin?.kind==="desktop")),i=m(this.userDir()).lessons,n=Pe(s),a=xe([{label:"Your habits (every project)",lessons:i},{label:"This project",lessons:r}],{...o.request?{request:o.request}:{},paths:[...n.hotFiles.map(c=>c.path),...n.locations.map(c=>c.path)]}),d=new Set(a.ids),p=[...i,...r].filter(c=>d.has(c.id)&&c.fix),u=Me(n,e.root,t);u.pitfalls=u.pitfalls.filter(c=>!p.some(h=>h.fix?.bad.endsWith(c.bad)&&h.fix.good.endsWith(c.good)));const l=Re(u);return{project:e,...a.text?{lessons:a.text}:{},lessonIds:a.ids,eligible:a.eligible,lessonTokens:a.tokens,...l.text?{map:l.text}:{},mapTokens:l.tokens}}async onRunEnd(e,t){const o=this.now(),s=T(e,t.previousAssistant),r=A(s);let i;try{i=this.project(t.cwd)}catch{return r}const n=this.projectDir(i);let a=[];try{a=this.commandFeedback(s,t,n),a.length>0&&(r.feedback+=this.applyFeedback(n,a,t.sessionId,o))}catch{}try{$e(n,u=>ve(u,{root:i.root,cwd:te(t.cwd),sessionId:t.sessionId,steps:s.steps,fixes:s.fixes.filter(l=>l.proven),now:o}))}catch{}for(const u of s.fixes){let l=pe(u);Y({content:l.content})&&(l={...l,content:l.content.replace(/([^)]*)|\s\([^)]*\)/u,""),rootCause:""},Y({content:l.content}))||this.propose(n,l,t.sessionId,o,r)}const d=[...new Set([...Xe(s),...t.loadedSkills??[]])],p=qe(s);try{const u=p==="correction"?[...new Set([...d,...t.earlierSkills??[]])]:d;this.trackSkills(n,u,p,t,o,r)}catch{}try{const u=Ee(s.steps);if(u){let l;const c=s.fixes.map(h=>({bad:R(h.bad),good:R(h.good),reason:h.reason}));if($(n,h=>{const g=Ae(h,u,t.sessionId,o,{skills:d,fixes:c,outcome:p});return g.draft&&(l={draft:g.draft,procedure:g.procedure}),g.doc}),l){const h=await this.shapeProposal(n,i,l.procedure,l.draft,t,o);h&&r.notices.push(this.adoptOrPropose(n,i,h,o))}}}catch{}if(Le(s))await this.draftWithModel(s,t,i,o,r);else if(_e(s,t.injected)){const u=new Set(a.map(c=>c.id));for(const c of[...m(n).lessons,...m(this.userDir()).lessons])c.feedback.some(h=>h.sessionId===t.sessionId)&&u.add(c.id);const l=t.injected.filter(c=>!u.has(c));l.length>0&&await this.reflectWithModel(s,l,t,i,o,r)}return Te(s)&&await this.induceWithModel(s,t,i,o,r),r}adoptOrPropose(e,t,o,s){if(!this.autoAdoptInto||o.risk&&o.risk.length>0)return{kind:"skill_proposed",draft:o};const r=Ke({root:this.root,projectDir:e,projectKey:t.key,userSkillsDir:this.autoAdoptInto,id:o.id,now:s});return r.kind==="accepted"?{kind:"skill_adopted",draft:r.draft,paths:r.paths}:{kind:"skill_proposed",draft:o}}skillFeedback(e,t,o,s){const r=A(T([]));if(o.length===0)return[];try{const i=this.projectDir(this.project(e));this.trackSkills(i,o,"correction",{cwd:e,sessionId:t,injected:[],skills:s},this.now(),r)}catch{}return r.notices}trackSkills(e,t,o,s,r,i){if(t.length===0)return;const n=s.skills?.list()??[],a=t.flatMap(d=>{const p=n.filter(u=>u.name===d);return p.length>0?p.map(E):[E({origin:"cloud",name:d})]});for(const d of ze(this.root,a,s.sessionId,o,r)){if(H(this.root,d.key,d.proposalId,"revert",r).kind!=="restored")continue;let p;$(e,l=>{const c=l.drafts.findIndex(g=>g.id===d.proposalId);if(c<0)return;p={...l.drafts[c],status:"undone"};const h=[...l.drafts];return h[c]=p,{...l,drafts:h}});const u=p?.target;p?.kind==="split"&&u&&u.key!==d.key&&H(this.root,u.key,d.proposalId,"revert",r),i.notices.push({kind:"skill_reverted",skill:d.name,proposalId:d.proposalId,...p?{draft:p}:{},uses:{total:d.uses.length,bad:d.uses.filter(l=>l.outcome!=="success").length}})}}otherProjectsWith(e,t){let o=0,s=[];try{s=ne(x(this.root,"projects"))}catch{return 0}for(const r of s){const i=x(this.root,"projects",r);if(i!==t)try{ae(Ie(i),"utf8").includes(e)&&o++}catch{}}return o}async shapeProposal(e,t,o,s,r,i){const n=(o.evidence??[]).map(l=>({sessionId:l.sessionId,at:l.at,note:Z(l)})),a=Oe(o,t.root,this.otherProjectsWith(o.fingerprint,e));let d={...s,kind:"new",scope:a.scope,scopeReason:a.reason,diff:b("",s.content,`${s.name}/SKILL.md`),evidence:n,risk:M(s.content)};const p=r.skills?Ye(o,V(r.skills,o)):void 0,u=p?await r.skills?.text(p.ref).catch(()=>{}):void 0;if(p&&u!==void 0){const l=We(u,o,i,s.id),c=p.ref,h=E(c);if(!l)d=void 0;else{const g=c.origin==="learned-project"&&c.projectKey===t.key,C=a.scope==="project"&&!g,v=Ne(c)&&!C,K=C?{...l,projectKey:t.key}:l,O={key:h,name:c.name,origin:c.origin,editable:v,...c.filePath?{filePath:c.filePath}:{}},se=g||C||c.origin==="project"?"project":"user",W=p.why==="loaded"?F(y("\u8FD9\u4E9B\u4F1A\u8BDD\u91CC\u6709 {n} \u4E2A\u52A0\u8F7D\u8FC7\u6280\u80FD\u300C{name}\u300D"),{n:p.count,name:c.name}):F(y("\u6280\u80FD\u300C{name}\u300D\u7684\u540D\u79F0\u548C\u8BF4\u660E\u4E0E\u8FD9\u5957\u6B65\u9AA4\u76F8\u7B26"),{name:c.name});if(u.length+l.text.length>Ue){const w=`${c.name}-${s.name}`.slice(0,64).replace(/-+$/g,""),P=ee(w,c.name,o,l.text),N={id:`${s.id}p`,mode:"append",text:F(y("\u53E6\u89C1\u6280\u80FD\u300C{name}\u300D\uFF1A\u672C\u673A\u8865\u5145\u7684\u505A\u6CD5\u3002"),{name:w}),proposalId:s.id,created:l.created,...C?{projectKey:t.key}:{}};d={...s,name:w,content:P,kind:"split",scope:a.scope,scopeReason:`${W}\uFF1B${F(y("\u5B83\u5DF2\u7ECF\u5F88\u957F\uFF08{n} \u5B57\u7B26\uFF09\uFF0C\u8865\u5145\u53E6\u6210\u4E00\u4E2A\u6280\u80FD"),{n:u.length})}\uFF1B${a.reason}`,target:O,patch:N,diff:[b("",P,`${w}/SKILL.md`),b(u,z(u,[N],{marker:!v,projectKey:t.key}).text,`${c.name}`)].join(`
|
|
2
|
+
`),evidence:n,risk:M(P)}}else{const w=z(u,[K],{marker:!v,projectKey:t.key}).text;d={...s,name:c.name,content:"",kind:"improve",scope:se,scopeReason:`${W}\uFF1B${a.reason}`,target:O,patch:K,diff:b(u,w,c.name),evidence:n,risk:M(l.text)}}}}return $(e,l=>({...l,procedures:l.procedures.map(c=>c.fingerprint===o.fingerprint&&!d&&p?{...c,coveredBy:E(p.ref)}:c),drafts:d?l.drafts.map(c=>c.id===s.id?d:c):l.drafts.filter(c=>c.id!==s.id)})),d}seenInAnotherTask(e,t,o){const s=U(t.content);let r=!1;try{G(x(e,"task-notes.json"),i=>({signatures:i?.signatures&&typeof i.signatures=="object"&&!Array.isArray(i.signatures)?i.signatures:{}}),i=>{const n=Array.isArray(i.signatures[s])?i.signatures[s]:[];if(r=n.some(d=>d!==o),n.includes(o))return;const a=Object.entries({...i.signatures,[s]:[...n,o].slice(-4)});return{signatures:Object.fromEntries(a.slice(-200))}})}catch{return!1}return r}propose(e,t,o,s,r){const i=t.scope==="user"?this.userDir():e;try{D(i,n=>{const a=Fe(n,t,o,s);if(a.outcome.kind!=="suppressed"){if(a.outcome.kind==="created"&&r.proposed.push(a.outcome.lesson),a.transition){const d=a.transition.to;d==="active"&&r.notices.push({kind:"activated",lesson:a.transition.lesson}),d==="awaiting_user"&&r.notices.push({kind:"awaiting_user",lesson:a.transition.lesson})}return a.doc}})}catch{}}applyFeedback(e,t,o,s){let r=0;for(const i of[e,this.userDir()])D(i,n=>{const a=je(n,t,o,s);return r+=a.changed,a.changed>0?a.doc:void 0});return r}commandFeedback(e,t,o){if(t.injected.length===0)return[];const s=new Set(t.injected),r=[...m(o).lessons,...m(this.userDir()).lessons].filter(n=>s.has(n.id)&&n.fix),i=[];for(const n of r){const a=n.fix?.good;if(a)for(const d of e.steps){if(!d.command)continue;const p=R(d.cdDir?`cd ${d.cdDir} && ${d.command}`:d.command);if(!d.isError&&!d.unverifiedPass&&X(p,a)){i.push({id:n.id,tag:"helpful",why:`\`${a}\` passed`});break}if(d.isError&&X(p,a,!0)){i.push({id:n.id,tag:"harmful",why:`\`${a}\` failed`});break}}}return i}async draftWithModel(e,t,o,s,r){if(!t.complete){r.modelCall="unavailable";return}if(!this.claimCall(s,"draft")){r.modelCall="capped";return}const i={id:S(s),kind:"draft",createdAt:s,attempts:1,projectKey:o.key,projectRoot:o.root,sessionId:t.sessionId,excerpt:L(e,e.corrected?t.previousAssistant:void 0),reason:{corrected:e.corrected,detour:e.detour,denials:e.denials.length,fixes:e.fixes.length}};await this.draftFromExcerpt(i,t.complete,s,r)}async reflectWithModel(e,t,o,s,r,i){if(!o.complete){i.reflection="unavailable";return}if(!this.claimCall(r,"reflect")){i.reflection="capped";return}const n={id:S(r),kind:"reflect",injected:[...t],outcome:Be(e.steps)??"passed",...q(e.steps).length?{touched:q(e.steps)}:{},createdAt:r,attempts:1,projectKey:s.key,projectRoot:s.root,sessionId:o.sessionId,excerpt:L(e),reason:{corrected:!1,detour:!1,denials:0,fixes:e.fixes.length}};await this.draftFromExcerpt(n,o.complete,r,i)}async induceWithModel(e,t,o,s,r){if(!t.complete){r.induction="unavailable";return}if(!this.claimCall(s,"draft")){r.induction="capped";return}const i={id:S(s),kind:"induce",...t.injected.length>0?{injected:[...t.injected]}:{},createdAt:s,attempts:1,projectKey:o.key,projectRoot:o.root,sessionId:t.sessionId,excerpt:L(e),reason:{corrected:!1,detour:!1,denials:0,fixes:e.fixes.length}};await this.draftFromExcerpt(i,t.complete,s,r)}claimCall(e,t){try{return He(this.root,t==="reflect"?this.reflectCap:this.dailyCap,e,t)}catch{return!1}}async ask(e,t,o,s,r){const i={job:e,kept:!1,abort:new AbortController};this.inFlight.add(i);let n;try{n=await s(t,o,i.abort.signal)}catch{return{status:"failed"}}finally{this.inFlight.delete(i)}if(!n)return{status:"unavailable"};if(i.kept&&!tt(this.root,e.id))return{status:"none"};try{et(this.root,n.inputTokens??0,n.outputTokens??0,r)}catch{}return{status:"done",answer:n}}async draftFromExcerpt(e,t,o,s){if(e.kind==="reflect")return s.reflection=await this.reflectFromExcerpt(e,t,o,s),s.reflection;if(e.kind==="induce")return s.induction=await this.induceFromExcerpt(e,t,o,s),s.induction;const r=I(this.root,e.projectKey),i={corrected:e.reason.corrected,detour:e.reason.detour,denials:{length:e.reason.denials},fixes:{length:e.reason.fixes}},n=[...m(r).lessons,...m(this.userDir()).lessons],{status:a,answer:d}=await this.ask(e,fe,de(e.excerpt,i,n),t,o);if(s.modelCall=a,!d)return a;const p=me(d.text,i);for(const u of p.drafts)this.propose(r,u,e.sessionId,o,s);for(const u of p.taskNotes)s.taskNotes.push(u),this.seenInAnotherTask(r,u,e.sessionId)&&this.propose(r,{scope:"project",section:u.section,content:u.content,rootCause:u.rootCause,signal:u.signal,note:u.note,signature:`task:${U(u.content)}`},e.sessionId,o,s);return a}async induceFromExcerpt(e,t,o,s){const r=I(this.root,e.projectKey),i=[...m(r).lessons,...m(this.userDir()).lessons],{status:n,answer:a}=await this.ask(e,he,ue(e.excerpt,i,e.injected??[]),t,o);if(!a)return n;const d=/^\[user\] (.*)$/m.exec(e.excerpt)?.[1]??"";for(const p of ke(a.text,d).drafts)this.propose(r,p,e.sessionId,o,s);return n}async reflectFromExcerpt(e,t,o,s){const r=I(this.root,e.projectKey),i=new Set(e.injected??[]),n=[...m(r).lessons,...m(this.userDir()).lessons].filter(u=>i.has(u.id)&&(u.status==="active"||u.status==="candidate"));if(n.length===0)return"none";const{status:a,answer:d}=await this.ask(e,ge,le(e.excerpt,e.outcome??"passed",n),t,o);if(!d)return a;const p=B(ye(d.text,n.map(u=>u.id)),e.touched);if(p.length>0)try{s.feedback+=this.applyFeedback(r,p,e.sessionId,o)}catch{}return a}keepUnfinished(){let e=0;for(const t of this.inFlight)if(!t.kept){try{_(this.root,t.job),t.kept=!0,e++}catch{continue}t.abort.abort()}return e}async finishPending(e,t=2){const o=[];let s;try{s=Qe(this.root,this.now())}catch{return o}for(const r of s.slice(0,t)){const i=this.now(),n=Ge(this.root,r.id);if(!n)continue;if(!this.claimCall(i,n.kind==="reflect"?"reflect":"draft")){try{_(this.root,n)}catch{}continue}const a=A(T([])),d={...n,attempts:n.attempts+1},p=await this.draftFromExcerpt(d,e,i,a);if(p==="failed"||p==="unavailable")try{d.attempts<Ve&&!ie(x(Ze(this.root),`${n.id}.json`))&&_(this.root,d)}catch{}o.push({project:{key:n.projectKey,root:n.projectRoot},report:a})}return o}}function S(f){return`${f.toString(36)}-${Math.random().toString(36).slice(2,10)}`}k(S,"$"),j(S,"pendingId");function F(f,e){return f.replace(/\{(\w+)\}/g,(t,o)=>o in e?String(e[o]):t)}k(F,"S"),j(F,"fill");function Z(f){const e=[];f.outcome==="correction"&&e.push(y("\u4F60\u7EA0\u6B63\u4E86\u52A9\u624B")),f.outcome==="failure"&&e.push(y("\u68C0\u67E5\u5931\u8D25\u672A\u4FEE\u597D"));for(const t of f.fixes.slice(0,2))e.push(F(y("`{bad}` \u5931\u8D25\u540E\u6539\u7528 `{good}`"),t));return f.skills.length>0&&e.push(F(y("\u52A0\u8F7D\u4E86\u6280\u80FD {names}"),{names:f.skills.join("\u3001")})),e.length>0?e.join(y("\uFF1B")):y("\u987A\u5229\u5B8C\u6210")}k(Z,"Ve"),j(Z,"evidenceNote");function ee(f,e,t,o){const s=t.steps.join(" \u2192 "),r=F(y("\u300C{original}\u300D\u5728\u672C\u673A\u7684\u8865\u5145\u505A\u6CD5\uFF08{flow}\uFF09\u3002\u548C\u300C{original}\u300D\u4E00\u8D77\u4F7F\u7528\u3002"),{original:e,flow:s});return`---
|
|
3
3
|
name: ${f}
|
|
4
4
|
description: ${JSON.stringify(r)}
|
|
5
5
|
---
|