chainlesschain 0.162.67 → 0.162.68

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.
Files changed (152) hide show
  1. package/package.json +2 -2
  2. package/src/assets/web-panel/assets/{AIOps-DUdh61OE.js → AIOps-CApwTDcj.js} +1 -1
  3. package/src/assets/web-panel/assets/{ActionButton-DkIwLnBD.js → ActionButton-CtMR0gsY.js} +1 -1
  4. package/src/assets/web-panel/assets/{Analytics-D-iPmzfz.js → Analytics-B6ngoWF7.js} +3 -3
  5. package/src/assets/web-panel/assets/{AppLayout-kHttiFUZ.js → AppLayout-CCk3WRLN.js} +3 -3
  6. package/src/assets/web-panel/assets/{Audit-DstzaQFj.js → Audit-B49GzvpF.js} +1 -1
  7. package/src/assets/web-panel/assets/{Backup-COQb9n1n.js → Backup-D4dLmWM5.js} +1 -1
  8. package/src/assets/web-panel/assets/{BaseInput-BzOSEUx9.js → BaseInput-DqGU7qH5.js} +1 -1
  9. package/src/assets/web-panel/assets/{Chat-CCnsErT6.js → Chat-MG4oaTOn.js} +6 -6
  10. package/src/assets/web-panel/assets/{ChatBubbleRenderer-DVQnqmLx.js → ChatBubbleRenderer-BkLcuLPv.js} +1 -1
  11. package/src/assets/web-panel/assets/{Checkbox-CGEGTeL3.js → Checkbox-B1CMPVQB.js} +1 -1
  12. package/src/assets/web-panel/assets/{Codegen-DhdKOsrH.js → Codegen-BX3hEYU8.js} +1 -1
  13. package/src/assets/web-panel/assets/{Col-DTaHrzPc.js → Col-D0VUufle.js} +1 -1
  14. package/src/assets/web-panel/assets/{Community-hmabC5TC.js → Community-Cy3Cizoy.js} +1 -1
  15. package/src/assets/web-panel/assets/{Compact-DF1kuYEV.js → Compact-DL4ZSw4Z.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compliance-gGsJ0l1f.js → Compliance-Blt8ZI7v.js} +1 -1
  17. package/src/assets/web-panel/assets/{Cowork-xzH66HkJ.js → Cowork-DokGYduK.js} +2 -2
  18. package/src/assets/web-panel/assets/{Cron-D-E1fiyr.js → Cron-Dk_lb1HS.js} +2 -2
  19. package/src/assets/web-panel/assets/{Crosschain-CAxzKuw_.js → Crosschain-BC7Wj5Kq.js} +1 -1
  20. package/src/assets/web-panel/assets/{DID-CG3AoeWL.js → DID-DZ-cDPN2.js} +2 -2
  21. package/src/assets/web-panel/assets/{Dashboard-Dd5371Pn.js → Dashboard-C5tdbMF4.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dropdown-CniUpxUk.js → Dropdown-CLPQyHyQ.js} +1 -1
  23. package/src/assets/web-panel/assets/{EmailListRenderer-CqkhyNVa.js → EmailListRenderer-Bv6Z0Nk2.js} +1 -1
  24. package/src/assets/web-panel/assets/{FamilyGuardDashboard-D8PGYrZS.js → FamilyGuardDashboard-BDVY8wtE.js} +1 -1
  25. package/src/assets/web-panel/assets/{Federation-C6PQ0D0v.js → Federation-DNJuBFV1.js} +1 -1
  26. package/src/assets/web-panel/assets/{FormItemContext-Ce0Kjapm.js → FormItemContext-DKCDLMCe.js} +1 -1
  27. package/src/assets/web-panel/assets/{GenericCardRenderer-DTSx1uxu.js → GenericCardRenderer-C6OyPrgk.js} +1 -1
  28. package/src/assets/web-panel/assets/{Git-CjIKQPwh.js → Git--cbE8s6l.js} +2 -2
  29. package/src/assets/web-panel/assets/{Governance-CQ6ensk6.js → Governance-CzdLQYDi.js} +1 -1
  30. package/src/assets/web-panel/assets/{Inference-ZhEZeJBX.js → Inference-DrTy9Le1.js} +1 -1
  31. package/src/assets/web-panel/assets/{KnowledgeGraph-ClRD7Ny9.js → KnowledgeGraph-Cazt91QG.js} +1 -1
  32. package/src/assets/web-panel/assets/{Logs-BRxYBrqs.js → Logs-DWWblaB0.js} +2 -2
  33. package/src/assets/web-panel/assets/{Marketplace-wC7vePL2.js → Marketplace-CCpr9ebp.js} +1 -1
  34. package/src/assets/web-panel/assets/{McpTools-CbZ7EZCS.js → McpTools-UWHpdNX4.js} +5 -5
  35. package/src/assets/web-panel/assets/{Memory-DX48TSrr.js → Memory-CmilJS9l.js} +2 -2
  36. package/src/assets/web-panel/assets/{MobileBridge-C8YXsY-I.js → MobileBridge-DvE3xx-e.js} +2 -2
  37. package/src/assets/web-panel/assets/{MobileProjects-D42PKdIA.js → MobileProjects-DUt1Ha1c.js} +1 -1
  38. package/src/assets/web-panel/assets/{Mtc-Bq73thQS.js → Mtc-Ca7Ez9Mi.js} +2 -2
  39. package/src/assets/web-panel/assets/{MtcAudit-CgxcxR8Q.js → MtcAudit-ZEM6--zW.js} +6 -6
  40. package/src/assets/web-panel/assets/{Multisig-C7KNb6_o.js → Multisig-HKpJRSKW.js} +3 -3
  41. package/src/assets/web-panel/assets/{NLProgramming-CVzm6Kax.js → NLProgramming-DtSLCAXG.js} +1 -1
  42. package/src/assets/web-panel/assets/{Notes-E962LwaY.js → Notes-E8JnuQ6J.js} +4 -4
  43. package/src/assets/web-panel/assets/{NotificationSettings-r5gwao_d.js → NotificationSettings-CuoxqSOD.js} +1 -1
  44. package/src/assets/web-panel/assets/{OrderTableRenderer-5RHLJQ7W.js → OrderTableRenderer-CK17A3_q.js} +1 -1
  45. package/src/assets/web-panel/assets/{Organization-518E-wDo.js → Organization-CBZyGRSg.js} +4 -4
  46. package/src/assets/web-panel/assets/{Overflow-C6IG4Y8V.js → Overflow-B31NFhf6.js} +1 -1
  47. package/src/assets/web-panel/assets/{P2P-BmrkH4JM.js → P2P-DEAcmiRk.js} +2 -2
  48. package/src/assets/web-panel/assets/{PdhVaultBrowser-BmTXbyXR.js → PdhVaultBrowser-g-Ku0SEN.js} +5 -5
  49. package/src/assets/web-panel/assets/{Permissions-DqtYyQ_n.js → Permissions-CeKGgKJi.js} +4 -4
  50. package/src/assets/web-panel/assets/{PersonalDataHub-CrBAGe6w.js → PersonalDataHub-DYhpWo9h.js} +3 -3
  51. package/src/assets/web-panel/assets/{Pipeline-Cq9nvUtI.js → Pipeline-YQjAb7F4.js} +1 -1
  52. package/src/assets/web-panel/assets/{Privacy-BHS8ULGU.js → Privacy-qmfqtTNX.js} +1 -1
  53. package/src/assets/web-panel/assets/{ProjectInit-B5GZXX6Z.js → ProjectInit-BOFTObgw.js} +2 -2
  54. package/src/assets/web-panel/assets/{ProjectSettings-Bgq9qhzU.js → ProjectSettings-jqcpjFH3.js} +2 -2
  55. package/src/assets/web-panel/assets/{Projects-DQtd5Z3I.js → Projects-hOmFJa-l.js} +1 -1
  56. package/src/assets/web-panel/assets/{Providers-BC1YU1b4.js → Providers-CXgQOsCM.js} +1 -1
  57. package/src/assets/web-panel/assets/{QuickAsk-9v1Sc4sD.js → QuickAsk-DSGQPyia.js} +1 -1
  58. package/src/assets/web-panel/assets/{Recommend-BJ1Mk9tH.js → Recommend-B0kKkubw.js} +1 -1
  59. package/src/assets/web-panel/assets/{Reputation-D_6Q_ApA.js → Reputation-CYlRlVwa.js} +1 -1
  60. package/src/assets/web-panel/assets/{Row-B9q6bn8K.js → Row-Dmkf2Pfb.js} +1 -1
  61. package/src/assets/web-panel/assets/{RssFeed-OBUMDtGN.js → RssFeed-u9HvfzST.js} +3 -3
  62. package/src/assets/web-panel/assets/{Search-CduYF1wK.js → Search-ZLFCC8kC.js} +1 -1
  63. package/src/assets/web-panel/assets/{Security-Cr-I8Oz7.js → Security-CAX3xui6.js} +3 -3
  64. package/src/assets/web-panel/assets/{Services-C1qVm4kB.js → Services-BdEnptrx.js} +2 -2
  65. package/src/assets/web-panel/assets/{Skeleton-Ww1MhByn.js → Skeleton-DKFU7h7V.js} +1 -1
  66. package/src/assets/web-panel/assets/{Skills-MdBisytD.js → Skills-DM6WoOSK.js} +1 -1
  67. package/src/assets/web-panel/assets/{Sla-B_y_VqaO.js → Sla-CDwATjD8.js} +1 -1
  68. package/src/assets/web-panel/assets/{SpeechSettings-BFTJeQjg.js → SpeechSettings-K9F2viwl.js} +1 -1
  69. package/src/assets/web-panel/assets/{SyncSettings-D6OUnG6a.js → SyncSettings-H0CfLyXE.js} +2 -2
  70. package/src/assets/web-panel/assets/{Tasks-CIFAHI0I.js → Tasks-0l7Ay6uq.js} +1 -1
  71. package/src/assets/web-panel/assets/{Templates-Chm6LnIA.js → Templates-C5Rmnn1N.js} +1 -1
  72. package/src/assets/web-panel/assets/{Tenant-C8uT7TxF.js → Tenant-Df7yzfCv.js} +1 -1
  73. package/src/assets/web-panel/assets/{Terminal-CgMzHdbj.js → Terminal-B0km8CuU.js} +2 -2
  74. package/src/assets/web-panel/assets/{TimelineRenderer-DCv-s6ME.js → TimelineRenderer-Dce5dLeJ.js} +1 -1
  75. package/src/assets/web-panel/assets/{Tokens-Dbp_wE8i.js → Tokens-Bf0pcRGd.js} +1 -1
  76. package/src/assets/web-panel/assets/{Trigger-Bcm94QVz.js → Trigger-DErKfj9v.js} +1 -1
  77. package/src/assets/web-panel/assets/{Trust-DWUByLU4.js → Trust-DKLPdi5i.js} +1 -1
  78. package/src/assets/web-panel/assets/{UkeySign-gadPtraM.js → UkeySign-2vWM_q6f.js} +1 -1
  79. package/src/assets/web-panel/assets/{VideoEditing-BWAd8rH5.js → VideoEditing-izmq-rIg.js} +1 -1
  80. package/src/assets/web-panel/assets/{Wallet-O10l9J3d.js → Wallet-BzH2r84N.js} +4 -4
  81. package/src/assets/web-panel/assets/{WebAuthn-BL59D-AQ.js → WebAuthn-BYXN-4fR.js} +4 -4
  82. package/src/assets/web-panel/assets/{WorkflowEditor-B0GK1YYA.js → WorkflowEditor-CTfG1m0p.js} +1 -1
  83. package/src/assets/web-panel/assets/{chat-rxMjzdi6.js → chat-DIscY014.js} +1 -1
  84. package/src/assets/web-panel/assets/{colors-MGsVs63X.js → colors-BTSAqkhm.js} +1 -1
  85. package/src/assets/web-panel/assets/{compact-item-B99MX2Sj.js → compact-item-BkZTp1pv.js} +1 -1
  86. package/src/assets/web-panel/assets/{createContext-D-UE372V.js → createContext-czQ3keC8.js} +1 -1
  87. package/src/assets/web-panel/assets/devWarning-BxhS9wdg.js +1 -0
  88. package/src/assets/web-panel/assets/{hasIn-BTwO4423.js → hasIn-Cx21Tli1.js} +1 -1
  89. package/src/assets/web-panel/assets/{index-C1V4w_cy.js → index-7PELo9qW.js} +1 -1
  90. package/src/assets/web-panel/assets/{index-CtBHvTvK.js → index-B3-Icl2w.js} +1 -1
  91. package/src/assets/web-panel/assets/{index-C-wDGsps.js → index-B3rGXNqN.js} +1 -1
  92. package/src/assets/web-panel/assets/{index--o4IljwP.js → index-B44yybO9.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-DvMa-5Zw.js → index-BBQKpUFP.js} +1 -1
  94. package/src/assets/web-panel/assets/{index-BC5oUiWa.js → index-BLDMAGix.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-BITfpivm.js → index-BP6NGhpO.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-C1M9EJTY.js → index-BUs2S31i.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-Bq8J_BJr.js → index-Bcv2bcqO.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-Ds58gvvD.js → index-Bhvi43YP.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-Cqf3vqmJ.js → index-C-lxMPwJ.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-eMKPU-8h.js → index-C4CTBSn-.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-DGd9fYgP.js → index-C5mhOewe.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-CNVDW7m4.js → index-C7C2gUbB.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-DOA-2IBx.js → index-C8deq1To.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-DGBEzFa6.js → index-CBM1EcQw.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-DdweEw7u.js → index-CBsq6rTx.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-DfQrgIGE.js → index-CIwjPjd3.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-qHtF3rlV.js → index-CKFayADQ.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-BDDFilGb.js → index-CKjWdCSF.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-Bw7OfNf0.js → index-CPKGGHgC.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-BCo1fFG4.js → index-CSLpoiX4.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-CJh-sOln.js → index-CU_EAi82.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-DyaKy5hU.js → index-Ci4fCjWb.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-CgLTxhj8.js → index-CmpV_oBb.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-DkQN4c_n.js → index-CsH5Fc75.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-C7AbKc5A.js → index-CwVjTNeG.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-DlHo7h2D.js → index-D-8aJLjD.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-COL6Py19.js → index-D0_N5MZy.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-BhXE09CC.js → index-D2GmS5y3.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-fwIj9Ew1.js → index-D8bkVyVW.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-CO-buu4K.js → index-DAjPPlbu.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-YDbokOUC.js → index-DNMU0cD_.js} +1 -1
  122. package/src/assets/web-panel/assets/index-Da7OR8jW.js +1 -0
  123. package/src/assets/web-panel/assets/index-DmLCHW8Z.js +1 -0
  124. package/src/assets/web-panel/assets/{index-mJP_zO6_.js → index-DqzJwfDB.js} +3 -3
  125. package/src/assets/web-panel/assets/{index-DSWGJvOb.js → index-HSkZzLbE.js} +1 -1
  126. package/src/assets/web-panel/assets/{index-CnPf5EHZ.js → index-MBrRYlLn.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-C-104k0S.js → index-nY8NiKxg.js} +1 -1
  128. package/src/assets/web-panel/assets/{initDefaultProps-DT6c9bjH.js → initDefaultProps-DxuSpodx.js} +1 -1
  129. package/src/assets/web-panel/assets/{motion-Bd91G2kX.js → motion-BImWXoYv.js} +1 -1
  130. package/src/assets/web-panel/assets/{move-B8frVtgu.js → move-BNY1E5gC.js} +1 -1
  131. package/src/assets/web-panel/assets/{omit-Df9R5myu.js → omit-CI9QiCXQ.js} +1 -1
  132. package/src/assets/web-panel/assets/{pickAttrs-C-XUO3g1.js → pickAttrs-16SUcQqr.js} +1 -1
  133. package/src/assets/web-panel/assets/{placementArrow-BbgfnB12.js → placementArrow-BPgRPulw.js} +1 -1
  134. package/src/assets/web-panel/assets/{responsiveObserve-CjuJL75b.js → responsiveObserve-CM11ueYV.js} +1 -1
  135. package/src/assets/web-panel/assets/{slide-_AVhS93T.js → slide-Di01Nz7_.js} +1 -1
  136. package/src/assets/web-panel/assets/{statusUtils-CexyzTkp.js → statusUtils-D9OQF_po.js} +1 -1
  137. package/src/assets/web-panel/assets/{styleChecker-BQGZefM3.js → styleChecker-BonAxSfp.js} +1 -1
  138. package/src/assets/web-panel/assets/{useFlexGapSupport-DheJEFqe.js → useFlexGapSupport-Co57fE02.js} +1 -1
  139. package/src/assets/web-panel/assets/{useFs-2PJHnfsw.js → useFs-BR6CNpTm.js} +1 -1
  140. package/src/assets/web-panel/assets/{usePersonalDataHub-eHN-CciG.js → usePersonalDataHub-kPYU5lyY.js} +1 -1
  141. package/src/assets/web-panel/assets/{vnode-BFGaUmOy.js → vnode-5w3ermM7.js} +1 -1
  142. package/src/assets/web-panel/assets/{zoom-BtGezWHW.js → zoom-BAtSz7RS.js} +1 -1
  143. package/src/assets/web-panel/index.html +1 -1
  144. package/src/lib/ide-context.js +60 -7
  145. package/src/lib/personal-data-hub-wiring.js +0 -16
  146. package/src/repl/agent-repl.js +167 -1
  147. package/src/repl/clipboard-copy.js +119 -0
  148. package/src/repl/repl-theme.js +77 -0
  149. package/src/repl/review-args.js +90 -0
  150. package/src/assets/web-panel/assets/devWarning-yudSIew_.js +0 -1
  151. package/src/assets/web-panel/assets/index-BsuHZ7he.js +0 -1
  152. package/src/assets/web-panel/assets/index-C5yXj1wd.js +0 -1
@@ -778,6 +778,34 @@ export async function startAgentRepl(options = {}) {
778
778
  options.vimMode === true || process.env.CC_VIM === "1" ? true : false;
779
779
  let _vim = null;
780
780
 
781
+ // Color theme (Claude-Code `/theme` parity). Capture chalk's auto-detected
782
+ // level BEFORE any theme touches it so `mono`→level 0 stays reversible, then
783
+ // apply the persisted theme (config `cli.theme`). `mono` strips all color;
784
+ // `light` uses a blue prompt accent. Switchable at runtime via `/theme`.
785
+ const {
786
+ DEFAULT_THEME,
787
+ resolveTheme,
788
+ promptAccent,
789
+ applyThemeChalk,
790
+ renderThemeList,
791
+ listThemeNames,
792
+ } = await import("./repl-theme.js");
793
+ const _chalkBaselineLevel = chalk.level;
794
+ let _theme = DEFAULT_THEME;
795
+ try {
796
+ const { getConfigValue } = await import("../lib/config-manager.js");
797
+ _theme = resolveTheme(getConfigValue("cli.theme")) || DEFAULT_THEME;
798
+ } catch (_e) {
799
+ /* config optional — keep default */
800
+ }
801
+ applyThemeChalk(_theme, chalk, _chalkBaselineLevel);
802
+ const themedPrompt = (text) => {
803
+ const a = promptAccent(_theme);
804
+ if (a === "blue") return chalk.blue(text);
805
+ if (a === "green") return chalk.green(text);
806
+ return text;
807
+ };
808
+
781
809
  const getPrompt = () => {
782
810
  // Mode indicator first so it survives the plan-mode prompt variants.
783
811
  const vim = _vimEnabled
@@ -793,7 +821,7 @@ export async function startAgentRepl(options = {}) {
793
821
  }
794
822
  return vim + chalk.yellow("[plan] > ");
795
823
  }
796
- return vim + chalk.green("> ");
824
+ return vim + themedPrompt("> ");
797
825
  };
798
826
 
799
827
  // `@` tab-completion (Claude-Code @-mention parity): filesystem paths +
@@ -810,6 +838,7 @@ export async function startAgentRepl(options = {}) {
810
838
  "/compact",
811
839
  "/config",
812
840
  "/context",
841
+ "/copy",
813
842
  "/cost",
814
843
  "/cowork",
815
844
  "/doctor",
@@ -828,6 +857,7 @@ export async function startAgentRepl(options = {}) {
828
857
  "/quit",
829
858
  "/reindex",
830
859
  "/reload-skills",
860
+ "/review",
831
861
  "/rewind",
832
862
  "/search",
833
863
  "/session",
@@ -838,6 +868,7 @@ export async function startAgentRepl(options = {}) {
838
868
  "/task",
839
869
  "/tasks",
840
870
  "/terminal-setup",
871
+ "/theme",
841
872
  "/vim",
842
873
  ],
843
874
  getIdeOpenFiles: async () => {
@@ -1187,6 +1218,9 @@ export async function startAgentRepl(options = {}) {
1187
1218
  logger.log(
1188
1219
  ` ${chalk.cyan("/statusline")} Context-usage line on/off (/statusline [on|off])`,
1189
1220
  );
1221
+ logger.log(
1222
+ ` ${chalk.cyan("/theme")} Color theme (/theme <auto|dark|light|mono>; mono = no color)`,
1223
+ );
1190
1224
  logger.log(
1191
1225
  ` ${chalk.cyan("/config")} Effective config (provider/model, keys masked)`,
1192
1226
  );
@@ -1199,6 +1233,9 @@ export async function startAgentRepl(options = {}) {
1199
1233
  logger.log(
1200
1234
  ` ${chalk.cyan("/context")} Live context-window usage by role`,
1201
1235
  );
1236
+ logger.log(
1237
+ ` ${chalk.cyan("/copy")} Copy last response to clipboard (/copy code → last code block)`,
1238
+ );
1202
1239
  logger.log(
1203
1240
  ` ${chalk.cyan("/cost")} Session token spend + estimated $ (per model & category)`,
1204
1241
  );
@@ -1217,6 +1254,9 @@ export async function startAgentRepl(options = {}) {
1217
1254
  logger.log(
1218
1255
  ` ${chalk.cyan("/reload-skills")} Re-scan skill layers without restarting`,
1219
1256
  );
1257
+ logger.log(
1258
+ ` ${chalk.cyan("/review")} Diff-first code review (/review [high] [--security|--simplify] [--fix])`,
1259
+ );
1220
1260
  logger.log(
1221
1261
  ` ${chalk.cyan("/compact")} Smart compact (importance-based)`,
1222
1262
  );
@@ -1439,6 +1479,39 @@ export async function startAgentRepl(options = {}) {
1439
1479
  return;
1440
1480
  }
1441
1481
 
1482
+ // `/theme` — color theme (Claude-Code parity). `mono` strips all color;
1483
+ // `light` uses a blue prompt accent. Persisted to config `cli.theme`.
1484
+ if (trimmed === "/theme" || trimmed.startsWith("/theme ")) {
1485
+ const arg = trimmed.slice("/theme".length).trim();
1486
+ if (!arg) {
1487
+ logger.log("\n" + renderThemeList(_theme) + "\n");
1488
+ prompt();
1489
+ return;
1490
+ }
1491
+ const next = resolveTheme(arg);
1492
+ if (!next) {
1493
+ logger.error(
1494
+ chalk.red(
1495
+ `Unknown theme "${arg}". Available: ${listThemeNames().join(", ")}`,
1496
+ ),
1497
+ );
1498
+ prompt();
1499
+ return;
1500
+ }
1501
+ _theme = next;
1502
+ applyThemeChalk(_theme, chalk, _chalkBaselineLevel);
1503
+ try {
1504
+ const { setConfigValue } = await import("../lib/config-manager.js");
1505
+ setConfigValue("cli.theme", _theme);
1506
+ } catch (_e) {
1507
+ /* persistence is best-effort */
1508
+ }
1509
+ rl.setPrompt(getPrompt());
1510
+ logger.log(chalk.gray(`Theme set to ${_theme}.`));
1511
+ prompt();
1512
+ return;
1513
+ }
1514
+
1442
1515
  if (trimmed === "/vim" || trimmed.startsWith("/vim ")) {
1443
1516
  const arg = trimmed.slice("/vim".length).trim().toLowerCase();
1444
1517
  const turnOn = arg === "on" || (arg === "" && !_vimEnabled);
@@ -1793,6 +1866,50 @@ export async function startAgentRepl(options = {}) {
1793
1866
  return;
1794
1867
  }
1795
1868
 
1869
+ // `/review` — diff-first code review of your changes (Claude-Code
1870
+ // /code-review parity). Reuses the `cc review` machinery: collects the git
1871
+ // diff and runs ONE focused agent turn. Read-only by default; `--fix`
1872
+ // applies reversible (auto-checkpointed) edits. Runs against the current
1873
+ // cwd so it follows `/cd`, using this session's provider/model.
1874
+ if (trimmed === "/review" || trimmed.startsWith("/review ")) {
1875
+ const rest = trimmed.slice("/review".length).trim();
1876
+ const { parseReviewReplArgs, describeReviewArgs } =
1877
+ await import("./review-args.js");
1878
+ const { opts: reviewOpts, errors } = parseReviewReplArgs(rest);
1879
+ if (errors.length) {
1880
+ for (const e of errors) logger.error(chalk.red(`/review: ${e}`));
1881
+ logger.log(
1882
+ chalk.gray(
1883
+ "Usage: /review [low|medium|high] [--security|--simplify] " +
1884
+ "[--fix] [--staged|--base <ref>|--range <A..B>]",
1885
+ ),
1886
+ );
1887
+ prompt();
1888
+ return;
1889
+ }
1890
+ try {
1891
+ const { runReview } = await import("../commands/review.js");
1892
+ logger.info(chalk.gray(`Reviewing ${describeReviewArgs(reviewOpts)}`));
1893
+ const result = await runReview(
1894
+ {
1895
+ ...reviewOpts,
1896
+ provider,
1897
+ model,
1898
+ cwd: process.cwd(),
1899
+ outputFormat: "text",
1900
+ },
1901
+ {},
1902
+ );
1903
+ if (result && result.empty) {
1904
+ logger.log(chalk.gray("No changes to review."));
1905
+ }
1906
+ } catch (err) {
1907
+ logger.error(chalk.red(`/review failed: ${err.message}`));
1908
+ }
1909
+ prompt();
1910
+ return;
1911
+ }
1912
+
1796
1913
  if (trimmed === "/reindex") {
1797
1914
  if (contextEngine) {
1798
1915
  contextEngine.reindexNotes();
@@ -2573,6 +2690,55 @@ export async function startAgentRepl(options = {}) {
2573
2690
  return;
2574
2691
  }
2575
2692
 
2693
+ // `/copy` — copy the last assistant response to the system clipboard
2694
+ // (Claude-Code /copy parity). `/copy code` copies the last fenced code block.
2695
+ if (trimmed === "/copy" || trimmed.startsWith("/copy ")) {
2696
+ const arg = trimmed.slice("/copy".length).trim().toLowerCase();
2697
+ const { lastAssistantText, lastCodeBlock, copyToClipboard } =
2698
+ await import("./clipboard-copy.js");
2699
+ const full = lastAssistantText(messages);
2700
+ if (!full) {
2701
+ logger.log(
2702
+ chalk.gray(
2703
+ "Nothing to copy yet — no assistant response in this session.",
2704
+ ),
2705
+ );
2706
+ prompt();
2707
+ return;
2708
+ }
2709
+ let payload = full;
2710
+ let what = "last response";
2711
+ if (arg === "code") {
2712
+ const block = lastCodeBlock(full);
2713
+ if (!block) {
2714
+ logger.log(
2715
+ chalk.gray("No fenced code block in the last response."),
2716
+ );
2717
+ prompt();
2718
+ return;
2719
+ }
2720
+ payload = block;
2721
+ what = "last code block";
2722
+ }
2723
+ const res = copyToClipboard(payload);
2724
+ if (res.ok) {
2725
+ logger.log(
2726
+ chalk.gray(
2727
+ `Copied ${what} to clipboard (${payload.length} chars, ${res.tool}).`,
2728
+ ),
2729
+ );
2730
+ } else {
2731
+ logger.error(chalk.red(`/copy failed: ${res.error}`));
2732
+ logger.log(
2733
+ chalk.gray(
2734
+ "Install a clipboard tool (Linux: wl-copy / xclip / xsel).",
2735
+ ),
2736
+ );
2737
+ }
2738
+ prompt();
2739
+ return;
2740
+ }
2741
+
2576
2742
  // `/ide` — IDE bridge connection status (Claude-Code parity): which editor
2577
2743
  // is connected, its tools, or why discovery came up empty.
2578
2744
  if (trimmed === "/ide" || trimmed === "/ide ") {
@@ -0,0 +1,119 @@
1
+ /**
2
+ * REPL `/copy` — copy the last assistant response to the system clipboard
3
+ * (Claude-Code `/copy` parity). Pure text extraction + a thin, cross-platform
4
+ * spawn wrapper. The pure parts are unit-tested; real clipboard I/O is
5
+ * environment-dependent and exercised through an injected spawnSync.
6
+ */
7
+ import { spawnSync as _spawnSync } from "node:child_process";
8
+
9
+ /** Flatten a message's content (string | content-parts[]) to plain text. Pure. */
10
+ export function messageText(content) {
11
+ if (typeof content === "string") return content;
12
+ if (Array.isArray(content)) {
13
+ return content
14
+ .map((p) => (p && typeof p.text === "string" ? p.text : ""))
15
+ .join("");
16
+ }
17
+ return "";
18
+ }
19
+
20
+ /**
21
+ * Find the last assistant message that has non-empty text. Pure.
22
+ * @returns {string|null}
23
+ */
24
+ export function lastAssistantText(messages) {
25
+ if (!Array.isArray(messages)) return null;
26
+ for (let i = messages.length - 1; i >= 0; i--) {
27
+ const m = messages[i];
28
+ if (!m || m.role !== "assistant") continue;
29
+ const t = messageText(m.content).trim();
30
+ if (t) return t;
31
+ }
32
+ return null;
33
+ }
34
+
35
+ /**
36
+ * Extract the body of the LAST fenced code block in markdown text. Pure.
37
+ * @returns {string|null}
38
+ */
39
+ export function lastCodeBlock(text) {
40
+ if (!text) return null;
41
+ const re = /```[^\n]*\n([\s\S]*?)```/g;
42
+ let m;
43
+ let last = null;
44
+ while ((m = re.exec(text)) !== null) last = m[1];
45
+ return last != null ? last.replace(/\n$/, "") : null;
46
+ }
47
+
48
+ /**
49
+ * Ordered list of clipboard-write commands to try for a platform. Pure.
50
+ * All read the payload from stdin. On Windows we force UTF-8 input decoding so
51
+ * non-ASCII content is not mangled by the console code page (clip.exe is the
52
+ * ASCII-safe fallback).
53
+ * @returns {{cmd:string,args:string[]}[]}
54
+ */
55
+ export function clipboardCommands(platform = process.platform) {
56
+ if (platform === "win32") {
57
+ return [
58
+ {
59
+ cmd: "powershell",
60
+ args: [
61
+ "-NoProfile",
62
+ "-Command",
63
+ "[Console]::InputEncoding=[Text.Encoding]::UTF8; " +
64
+ "Set-Clipboard -Value ([Console]::In.ReadToEnd())",
65
+ ],
66
+ },
67
+ { cmd: "clip", args: [] },
68
+ ];
69
+ }
70
+ if (platform === "darwin") {
71
+ return [{ cmd: "pbcopy", args: [] }];
72
+ }
73
+ // Linux / other Unix — Wayland first, then X selections.
74
+ return [
75
+ { cmd: "wl-copy", args: [] },
76
+ { cmd: "xclip", args: ["-selection", "clipboard"] },
77
+ { cmd: "xsel", args: ["--clipboard", "--input"] },
78
+ ];
79
+ }
80
+
81
+ const _deps = { spawnSync: _spawnSync };
82
+
83
+ /**
84
+ * Write text to the system clipboard, trying each platform candidate in order
85
+ * until one succeeds. Deps injected for tests.
86
+ * @returns {{ok:boolean, tool?:string, error?:string}}
87
+ */
88
+ export function copyToClipboard(text, { platform, spawnSync } = {}) {
89
+ const spawn = spawnSync || _deps.spawnSync;
90
+ const cmds = clipboardCommands(platform || process.platform);
91
+ let lastErr = "no clipboard tool available";
92
+ for (const { cmd, args } of cmds) {
93
+ let res;
94
+ try {
95
+ res = spawn(cmd, args, {
96
+ input: text,
97
+ encoding: "utf-8",
98
+ windowsHide: true,
99
+ });
100
+ } catch (e) {
101
+ lastErr = e.message;
102
+ continue;
103
+ }
104
+ if (!res) {
105
+ lastErr = `${cmd}: no result`;
106
+ continue;
107
+ }
108
+ if (res.error) {
109
+ lastErr = res.error.message;
110
+ continue;
111
+ }
112
+ if (res.status === 0) return { ok: true, tool: cmd };
113
+ lastErr =
114
+ (res.stderr || "").toString().trim() || `${cmd} exited ${res.status}`;
115
+ }
116
+ return { ok: false, error: lastErr };
117
+ }
118
+
119
+ export { _deps };
@@ -0,0 +1,77 @@
1
+ /**
2
+ * REPL `/theme` — color theme selection for the agent REPL (Claude-Code
3
+ * `/theme` parity). cc's REPL paints with chalk directly rather than a
4
+ * full-screen TUI, so a theme controls two observable things:
5
+ * (a) whether color is emitted at all — `mono` strips ALL color by dropping
6
+ * chalk's level to 0 (useful on terminals where the palette is unreadable
7
+ * or when capturing plain output);
8
+ * (b) the accent color of the prompt — `light` uses blue (green is hard to
9
+ * read on light backgrounds), `dark`/`auto` use green.
10
+ *
11
+ * Pure helpers (theme table, resolver, renderer, accent lookup) + a thin chalk
12
+ * applier that mutates the injected chalk instance's level. Persistence is the
13
+ * caller's job (config `cli.theme`).
14
+ */
15
+
16
+ export const THEMES = Object.freeze({
17
+ auto: {
18
+ color: true,
19
+ prompt: "green",
20
+ desc: "terminal-detected color, green prompt (default)",
21
+ },
22
+ dark: { color: true, prompt: "green", desc: "for dark terminals" },
23
+ light: {
24
+ color: true,
25
+ prompt: "blue",
26
+ desc: "for light terminals (blue prompt accent)",
27
+ },
28
+ mono: { color: false, prompt: "none", desc: "no color — plain text" },
29
+ });
30
+
31
+ export const DEFAULT_THEME = "auto";
32
+
33
+ /** Available theme names, in display order. Pure. */
34
+ export function listThemeNames() {
35
+ return Object.keys(THEMES);
36
+ }
37
+
38
+ /** Normalize/validate a theme name; returns the canonical name or null. Pure. */
39
+ export function resolveTheme(name) {
40
+ const n = String(name || "")
41
+ .toLowerCase()
42
+ .trim();
43
+ return Object.prototype.hasOwnProperty.call(THEMES, n) ? n : null;
44
+ }
45
+
46
+ /** The prompt accent style for a theme: "green" | "blue" | "none". Pure. */
47
+ export function promptAccent(themeName) {
48
+ const t = THEMES[themeName] || THEMES[DEFAULT_THEME];
49
+ return t.prompt;
50
+ }
51
+
52
+ /**
53
+ * Apply a theme's color level to a chalk instance (side effect on `chalk`).
54
+ * `baseline` is chalk's auto-detected level captured before any theme was
55
+ * applied, so switching back to a colored theme restores real color depth.
56
+ * @returns {number} the resulting chalk level
57
+ */
58
+ export function applyThemeChalk(themeName, chalk, baseline) {
59
+ const t = THEMES[themeName] || THEMES[DEFAULT_THEME];
60
+ if (!t.color) {
61
+ chalk.level = 0;
62
+ } else if (baseline != null) {
63
+ chalk.level = baseline;
64
+ }
65
+ return chalk.level;
66
+ }
67
+
68
+ /** Render the theme list with the active one marked. Pure. */
69
+ export function renderThemeList(active) {
70
+ const lines = ["Themes:"];
71
+ for (const [name, t] of Object.entries(THEMES)) {
72
+ const mark = name === active ? "*" : " ";
73
+ lines.push(` ${mark} ${name.padEnd(6)} ${t.desc}`);
74
+ }
75
+ lines.push("Usage: /theme <auto|dark|light|mono>");
76
+ return lines.join("\n");
77
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Parse the inline arguments of the REPL `/review` slash command into the
3
+ * option shape that `runReview` (commands/review.js) expects. Pure — no I/O —
4
+ * so it is fully unit-testable.
5
+ *
6
+ * Supported forms (a small, useful subset of `cc review`):
7
+ * /review working tree vs HEAD, bugs + cleanup, medium
8
+ * /review high | low | medium effort tier
9
+ * /review --security security-focused lens (/security-review)
10
+ * /review --simplify cleanup-only lens (no bug hunt)
11
+ * /review --fix apply fixes (auto-checkpointed, reversible)
12
+ * /review --staged review staged changes (git diff --cached)
13
+ * /review --base <ref> review this branch vs <ref> (<ref>...HEAD)
14
+ * /review --range <A..B> review an explicit revision range
15
+ *
16
+ * @param {string} rest the text after "/review"
17
+ * @returns {{ opts: object, errors: string[] }}
18
+ */
19
+ export function parseReviewReplArgs(rest) {
20
+ const tokens = String(rest || "")
21
+ .trim()
22
+ .split(/\s+/)
23
+ .filter(Boolean);
24
+
25
+ const opts = {
26
+ effort: undefined,
27
+ security: false,
28
+ simplify: false,
29
+ fix: false,
30
+ staged: false,
31
+ base: null,
32
+ range: null,
33
+ };
34
+ const errors = [];
35
+
36
+ for (let i = 0; i < tokens.length; i++) {
37
+ const t = tokens[i];
38
+ const lower = t.toLowerCase();
39
+ if (lower === "low" || lower === "medium" || lower === "high") {
40
+ opts.effort = lower;
41
+ } else if (t === "--security") {
42
+ opts.security = true;
43
+ } else if (t === "--simplify") {
44
+ opts.simplify = true;
45
+ } else if (t === "--fix") {
46
+ opts.fix = true;
47
+ } else if (t === "--staged") {
48
+ opts.staged = true;
49
+ } else if (t === "--base") {
50
+ const v = tokens[++i];
51
+ if (!v) errors.push("--base needs a ref (e.g. /review --base main)");
52
+ else opts.base = v;
53
+ } else if (t === "--range") {
54
+ const v = tokens[++i];
55
+ if (!v) errors.push("--range needs a range (e.g. /review --range A..B)");
56
+ else opts.range = v;
57
+ } else if (t === "-e" || t === "--effort") {
58
+ const v = tokens[++i];
59
+ const vl = v ? v.toLowerCase() : "";
60
+ if (vl === "low" || vl === "medium" || vl === "high") opts.effort = vl;
61
+ else errors.push(`invalid effort "${v}" (expected low|medium|high)`);
62
+ } else {
63
+ errors.push(`unknown argument "${t}"`);
64
+ }
65
+ }
66
+
67
+ if (opts.security && opts.simplify) {
68
+ errors.push("--security and --simplify are mutually exclusive");
69
+ }
70
+
71
+ return { opts, errors };
72
+ }
73
+
74
+ /** Short one-line description of the configured review, for a status line. Pure. */
75
+ export function describeReviewArgs(opts = {}) {
76
+ const lens = opts.security
77
+ ? "security"
78
+ : opts.simplify
79
+ ? "cleanup-only"
80
+ : "bugs + cleanup";
81
+ const scope = opts.range
82
+ ? `range ${opts.range}`
83
+ : opts.base
84
+ ? `${opts.base}...HEAD`
85
+ : opts.staged
86
+ ? "staged changes"
87
+ : "working tree vs HEAD";
88
+ const action = opts.fix ? "applying fixes" : "read-only";
89
+ return `${scope} · ${opts.effort || "medium"} effort · ${lens} · ${action}`;
90
+ }
@@ -1 +0,0 @@
1
- import{O as r}from"./index-mJP_zO6_.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
@@ -1 +0,0 @@
1
- import{C as o}from"./Col-DTaHrzPc.js";import{U as t}from"./index-mJP_zO6_.js";import"./vendor-BvqAck49.js";import"./index-C-104k0S.js";import"./icons-DP3uiYxy.js";const s=t(o);export{s as default};
@@ -1 +0,0 @@
1
- import{A as o}from"./Row-B9q6bn8K.js";import{U as t}from"./index-mJP_zO6_.js";import"./vendor-BvqAck49.js";import"./responsiveObserve-CjuJL75b.js";import"./useFlexGapSupport-DheJEFqe.js";import"./styleChecker-BQGZefM3.js";import"./index-C-104k0S.js";import"./icons-DP3uiYxy.js";const l=t(o);export{l as default};