@humain/humain-code 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +152 -0
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-42CGJCSR.js +82 -0
- package/dist/bundle/chunks/ask-VH7GNX75.js +97 -0
- package/dist/bundle/chunks/azure-openai-responses-DOKKMBUN.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +200 -179
- package/dist/bundle/chunks/bowser-UX7KDMIY.js +92 -0
- package/dist/bundle/chunks/{chunk-46C6D7UC.js → chunk-2CYGUEQO.js} +1 -1
- package/dist/bundle/chunks/chunk-3RXT35Y3.js +3 -0
- package/dist/bundle/chunks/chunk-4BNDLR6C.js +177 -0
- package/dist/bundle/chunks/{chunk-MPRAQ6ZI.js → chunk-4LGBXPUD.js} +1 -1
- package/dist/bundle/chunks/chunk-4SL6URR3.js +90 -0
- package/dist/bundle/chunks/{chunk-PJXBU6CR.js → chunk-52642TYH.js} +394 -204
- package/dist/bundle/chunks/{chunk-LSRXA7OS.js → chunk-5C5K4EVJ.js} +3 -3
- package/dist/bundle/chunks/{chunk-2JNJJ6SZ.js → chunk-5KUCY54O.js} +3 -3
- package/dist/bundle/chunks/{chunk-4TDNOR36.js → chunk-625QJSFJ.js} +1 -1
- package/dist/bundle/chunks/chunk-73YX5XGR.js +2461 -0
- package/dist/bundle/chunks/chunk-7DIRHF4H.js +17 -0
- package/dist/bundle/chunks/{chunk-QJB5YI3I.js → chunk-7PAXKU7M.js} +1 -1
- package/dist/bundle/chunks/{chunk-R2KD2HFT.js → chunk-7YB3HRRN.js} +83 -196
- package/dist/bundle/chunks/{chunk-DCXHRP6C.js → chunk-A2UZYK23.js} +13 -13
- package/dist/bundle/chunks/chunk-A5ZMBTTM.js +12 -0
- package/dist/bundle/chunks/{chunk-JKX5EGOT.js → chunk-AER66CNP.js} +13 -13
- package/dist/bundle/chunks/chunk-ARTF7ZMQ.js +5 -0
- package/dist/bundle/chunks/chunk-B3FT6L6S.js +131 -0
- package/dist/bundle/chunks/chunk-BIC5BSNX.js +13 -0
- package/dist/bundle/chunks/{chunk-JSHKS7VH.js → chunk-BNZZJ4LO.js} +1 -1
- package/dist/bundle/chunks/{chunk-4MKATHT2.js → chunk-CG43CMFH.js} +1 -1
- package/dist/bundle/chunks/{chunk-EFY2QPVP.js → chunk-CIAXW64K.js} +16 -16
- package/dist/bundle/chunks/{chunk-VFLVWPLZ.js → chunk-CKFLQGJN.js} +20 -16
- package/dist/bundle/chunks/chunk-D4UCXXDP.js +115 -0
- package/dist/bundle/chunks/{chunk-HQMUDHC3.js → chunk-D6ZWWDW5.js} +6 -5
- package/dist/bundle/chunks/{chunk-U4EAJPMO.js → chunk-EVDQRT3I.js} +252 -371
- package/dist/bundle/chunks/{chunk-FJIISX5W.js → chunk-F74XLJPC.js} +195 -192
- package/dist/bundle/chunks/chunk-FDRBTGFJ.js +4 -0
- package/dist/bundle/chunks/{chunk-E4VUW4RI.js → chunk-FLWO3H5J.js} +12 -12
- package/dist/bundle/chunks/{chunk-KLSRGGOH.js → chunk-G2PFPQX7.js} +2 -2
- package/dist/bundle/chunks/chunk-GMPJWLZS.js +57 -0
- package/dist/bundle/chunks/{chunk-M5TVWJ5T.js → chunk-H35P7ROY.js} +462 -441
- package/dist/bundle/chunks/chunk-HCHCYBNK.js +2 -0
- package/dist/bundle/chunks/{chunk-7WE77IE3.js → chunk-HRNYDRL7.js} +1 -1
- package/dist/bundle/chunks/chunk-HWFAAGYK.js +23 -0
- package/dist/bundle/chunks/{chunk-G2QMON4O.js → chunk-HWXQCJDP.js} +408 -392
- package/dist/bundle/chunks/{chunk-PVNXN2TC.js → chunk-II5C7G67.js} +1 -1
- package/dist/bundle/chunks/{chunk-F2H47FRF.js → chunk-IMRZP5SC.js} +182 -137
- package/dist/bundle/chunks/{chunk-H2B3WLIM.js → chunk-J5YFXMTM.js} +4 -4
- package/dist/bundle/chunks/chunk-J64VNQ6D.js +13 -0
- package/dist/bundle/chunks/{chunk-65FLSKDA.js → chunk-K5EFEIFP.js} +5 -4
- package/dist/bundle/chunks/{chunk-KI7CHPWC.js → chunk-KJ3QRSSY.js} +46 -43
- package/dist/bundle/chunks/{cli-6DJO467D.js → chunk-KSEO2LRK.js} +12 -10
- package/dist/bundle/chunks/{chunk-HHWVVNGG.js → chunk-MA2WCMSN.js} +2 -2
- package/dist/bundle/chunks/{chunk-L4J7SMJB.js → chunk-MAEKQSFU.js} +1 -1
- package/dist/bundle/chunks/chunk-MHQNLTZR.js +8 -0
- package/dist/bundle/chunks/chunk-MLOUZAVZ.js +122 -0
- package/dist/bundle/chunks/chunk-MQYR4Q6X.js +5 -0
- package/dist/bundle/chunks/chunk-MXF3KYLZ.js +4 -0
- package/dist/bundle/chunks/{chunk-GY663MNP.js → chunk-MZRTVX7F.js} +1 -1
- package/dist/bundle/chunks/chunk-MZYHSWHX.js +59 -0
- package/dist/bundle/chunks/{chunk-6HTHDVJC.js → chunk-NPVRWPGX.js} +1 -1
- package/dist/bundle/chunks/{chunk-BRSLXHED.js → chunk-O44A4E4K.js} +1 -1
- package/dist/bundle/chunks/{chunk-T2ZGMEMV.js → chunk-OADQOW67.js} +175 -260
- package/dist/bundle/chunks/chunk-OTVHRZ67.js +17 -0
- package/dist/bundle/chunks/{chunk-J4GII2EE.js → chunk-P7SLTLSZ.js} +51 -46
- package/dist/bundle/chunks/{chunk-7OZNMWAJ.js → chunk-PPGSQZZF.js} +1 -1
- package/dist/bundle/chunks/chunk-PYX6ZCC7.js +29 -0
- package/dist/bundle/chunks/chunk-PZ7NYBHJ.js +8 -0
- package/dist/bundle/chunks/{chunk-VCMXBP5S.js → chunk-QESIDBMW.js} +1 -7
- package/dist/bundle/chunks/chunk-QUWVILLB.js +3 -0
- package/dist/bundle/chunks/chunk-QZWUXGY7.js +99 -0
- package/dist/bundle/chunks/{chunk-MIAXMK5F.js → chunk-QZXLTW7V.js} +8 -7
- package/dist/bundle/chunks/chunk-RP6MWUAP.js +4 -0
- package/dist/bundle/chunks/chunk-S2US54IU.js +37 -0
- package/dist/bundle/chunks/{chunk-H7UPU2SH.js → chunk-SOE25WIS.js} +1218 -1239
- package/dist/bundle/chunks/{chunk-JSZBTGI6.js → chunk-SZZ5PNP6.js} +2 -2
- package/dist/bundle/chunks/chunk-T5WECB2D.js +7 -0
- package/dist/bundle/chunks/{chunk-2NVGOSBN.js → chunk-T7F2TEIS.js} +37 -13
- package/dist/bundle/chunks/{chunk-ZSWU5KKA.js → chunk-UOSJTMCL.js} +7 -3
- package/dist/bundle/chunks/{chunk-6P6MMQUH.js → chunk-UTRUALFN.js} +3 -3
- package/dist/bundle/chunks/{chunk-PWFM6AQQ.js → chunk-V2HTCZRF.js} +70 -67
- package/dist/bundle/chunks/{chunk-JX6YIPNK.js → chunk-WCKS2DPT.js} +1 -1
- package/dist/bundle/chunks/chunk-XGOJCV6Z.js +2 -0
- package/dist/bundle/chunks/chunk-XGSJX23G.js +1151 -0
- package/dist/bundle/chunks/{chunk-7WETECIB.js → chunk-Z7BWHPJ2.js} +1 -1
- package/dist/bundle/chunks/chunk-ZFFDBTG3.js +17 -0
- package/dist/bundle/chunks/cli-NJLV3XDZ.js +3 -0
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-JEZVYITT.js → cloudflare-workers-ai-system-one-ZAZW4M4B.js} +1 -1
- package/dist/bundle/chunks/{compat-ELBUCH6U.js → compat-7UJJAO4E.js} +12 -12
- package/dist/bundle/chunks/{curator-server-QB4GITGS.js → curator-server-MW645JI3.js} +2 -2
- package/dist/bundle/chunks/{dist-NERIS6SW.js → dist-7PCCEUQF.js} +2 -2
- package/dist/bundle/chunks/{dist-QSYDYE3Y.js → dist-I53JI67E.js} +9 -9
- package/dist/bundle/chunks/{dist-35STTNYA.js → dist-NI2PTSLH.js} +1 -1
- package/dist/bundle/chunks/{dist-CBODG4CA.js → dist-VXQT3DQY.js} +6 -6
- package/dist/bundle/chunks/{dist-cjs-EROMDUKS.js → dist-cjs-4JQA6W3S.js} +31 -31
- package/dist/bundle/chunks/doctor-KJVAYG3F.js +83 -0
- package/dist/bundle/chunks/{easter-egg-3d-VZC5WOYV.js → easter-egg-3d-Z24JLXD4.js} +1 -1
- package/dist/bundle/chunks/entry-3EL6GOWK.js +2 -0
- package/dist/bundle/chunks/{entry-SRYLSS5P.js → entry-4IMREZBD.js} +80 -79
- package/dist/bundle/chunks/{execute-6MEJJF2T.js → execute-C4BZQRPQ.js} +23 -22
- package/dist/bundle/chunks/{extract-L373D6O7.js → extract-XVQCIS7D.js} +5 -5
- package/dist/bundle/chunks/{flow-implementer-3P3BHQ7E.js → flow-implementer-GE2ARQKR.js} +5 -5
- package/dist/bundle/chunks/github-copilot.js +57 -56
- package/dist/bundle/chunks/google-generative-ai-P2P45MYP.js +22 -0
- package/dist/bundle/chunks/google-vertex-SHY4IS5F.js +26 -0
- package/dist/bundle/chunks/{host-WOLZCWQQ.js → host-YESS2VAB.js} +1 -1
- package/dist/bundle/chunks/{index.bundle-HONF3PUD.js → index.bundle-TZT64KLH.js} +102 -89
- package/dist/bundle/chunks/{inprocess-3PDJKE5F.js → inprocess-MGMVI6HN.js} +6 -6
- package/dist/bundle/chunks/interactive-mode-HHWOE4FD.js +5 -0
- package/dist/bundle/chunks/{llama-cpp-classify-KYZT532X.js → llama-cpp-classify-RSRH4KV2.js} +5 -5
- package/dist/bundle/chunks/mistral-conversations-YTMJKHHI.js +42 -0
- package/dist/bundle/chunks/{node-N7TPBUJB.js → node-FF6QQQLH.js} +1 -1
- package/dist/bundle/chunks/openai-codex-responses-NUCJOJSZ.js +97 -0
- package/dist/bundle/chunks/openai-completions-E5NRJUHA.js +91 -0
- package/dist/bundle/chunks/{openai-decisions-JMSDGR7K.js → openai-decisions-342J5ZYG.js} +1 -1
- package/dist/bundle/chunks/openai-responses-BN5Z4HFI.js +26 -0
- package/dist/bundle/chunks/openrouter-images-7RNG3JVF.js +12 -0
- package/dist/bundle/chunks/{pdfjs-FE3L72A6.js → pdfjs-LSTLRXQW.js} +1415 -1416
- package/dist/bundle/chunks/pi-messages-2L7FV5OK.js +22 -0
- package/dist/bundle/chunks/questionnaire-session-XEVAK7JS.js +123 -0
- package/dist/bundle/chunks/runtime-2FSZRUG5.js +2 -0
- package/dist/bundle/chunks/session-picker-666KJIVM.js +4 -0
- package/dist/bundle/chunks/startup-ui-INEVSNGK.js +3 -0
- package/dist/bundle/chunks/{trace-command-VM7FBWPE.js → trace-command-BCVMZ5ZD.js} +4 -4
- package/dist/bundle/chunks/typesafe-system-one-UJUNSZG4.js +3 -0
- package/dist/bundle/chunks/{undici-WVNE45GY.js → undici-7IGAYA4S.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-UXSSFNV5.js +29 -0
- package/dist/bundle/cli-runtime.js +5 -5
- package/dist/bundle/flow/package.json +3 -3
- package/dist/bundle/index.js +13 -13
- package/dist/bundle/orchestrate/package.json +1 -1
- package/dist/bundle/rpc-entry.js +5 -4
- package/dist/cli/agent-dir-arg.d.ts +12 -0
- package/dist/cli/agent-dir-arg.d.ts.map +1 -0
- package/dist/cli/agent-dir-arg.js +15 -0
- package/dist/cli/agent-dir-arg.js.map +1 -0
- package/dist/cli/args.d.ts +9 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +19 -5
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +1 -1
- package/dist/cli/auth-check.d.ts.map +1 -1
- package/dist/cli/auth-check.js +4 -2
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/doctor-config.d.ts +14 -0
- package/dist/cli/doctor-config.d.ts.map +1 -0
- package/dist/cli/doctor-config.js +92 -0
- package/dist/cli/doctor-config.js.map +1 -0
- package/dist/cli/doctor-system.d.ts +12 -0
- package/dist/cli/doctor-system.d.ts.map +1 -0
- package/dist/cli/doctor-system.js +109 -0
- package/dist/cli/doctor-system.js.map +1 -0
- package/dist/cli/doctor.d.ts +11 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +323 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/doctor.lazy.d.ts +3 -0
- package/dist/cli/doctor.lazy.d.ts.map +1 -0
- package/dist/cli/doctor.lazy.js +3 -0
- package/dist/cli/doctor.lazy.js.map +1 -0
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +0 -4
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js +6 -6
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +3 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +23 -10
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/config.d.ts +5 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -3
- package/dist/config.js.map +1 -1
- package/dist/coordination/adapter/delivery.d.ts +27 -0
- package/dist/coordination/adapter/delivery.d.ts.map +1 -1
- package/dist/coordination/adapter/delivery.js +164 -4
- package/dist/coordination/adapter/delivery.js.map +1 -1
- package/dist/coordination/adapter/index.d.ts.map +1 -1
- package/dist/coordination/adapter/index.js +31 -5
- package/dist/coordination/adapter/index.js.map +1 -1
- package/dist/coordination/adapter/presence.d.ts +5 -0
- package/dist/coordination/adapter/presence.d.ts.map +1 -1
- package/dist/coordination/adapter/presence.js +25 -3
- package/dist/coordination/adapter/presence.js.map +1 -1
- package/dist/coordination/adapter/question-routing.d.ts +7 -0
- package/dist/coordination/adapter/question-routing.d.ts.map +1 -0
- package/dist/coordination/adapter/question-routing.js +40 -0
- package/dist/coordination/adapter/question-routing.js.map +1 -0
- package/dist/coordination/adapter/receipts.d.ts +7 -0
- package/dist/coordination/adapter/receipts.d.ts.map +1 -1
- package/dist/coordination/adapter/receipts.js +25 -2
- package/dist/coordination/adapter/receipts.js.map +1 -1
- package/dist/coordination/adapter/tool.d.ts +19 -3
- package/dist/coordination/adapter/tool.d.ts.map +1 -1
- package/dist/coordination/adapter/tool.js +93 -19
- package/dist/coordination/adapter/tool.js.map +1 -1
- package/dist/coordination/broker/broker.d.ts +3 -3
- package/dist/coordination/broker/broker.d.ts.map +1 -1
- package/dist/coordination/broker/broker.js +15 -7
- package/dist/coordination/broker/broker.js.map +1 -1
- package/dist/coordination/client/client.d.ts +2 -2
- package/dist/coordination/client/client.d.ts.map +1 -1
- package/dist/coordination/client/client.js +4 -0
- package/dist/coordination/client/client.js.map +1 -1
- package/dist/coordination/transport/protocol.d.ts.map +1 -1
- package/dist/coordination/transport/protocol.js +23 -0
- package/dist/coordination/transport/protocol.js.map +1 -1
- package/dist/coordination/transport/types.d.ts +11 -1
- package/dist/coordination/transport/types.d.ts.map +1 -1
- package/dist/coordination/transport/types.js.map +1 -1
- package/dist/core/acceptance-command.d.ts +6 -3
- package/dist/core/acceptance-command.d.ts.map +1 -1
- package/dist/core/acceptance-command.js +43 -12
- package/dist/core/acceptance-command.js.map +1 -1
- package/dist/core/acceptance-ledger.d.ts +2 -0
- package/dist/core/acceptance-ledger.d.ts.map +1 -1
- package/dist/core/acceptance-ledger.js +14 -3
- package/dist/core/acceptance-ledger.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +11 -4
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +13 -4
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +19 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +131 -36
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +7 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +3 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +18 -8
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +9 -15
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +3 -0
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +12 -10
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.js +23 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +13 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +9 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +2 -4
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts +5 -2
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +6 -3
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +20 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +29 -0
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +63 -17
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/messages.d.ts +4 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +10 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +36 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +20 -10
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +6 -5
- package/dist/core/nested-tool-calls.d.ts.map +1 -1
- package/dist/core/nested-tool-calls.js +1 -3
- package/dist/core/nested-tool-calls.js.map +1 -1
- package/dist/core/oauth-account-pool.d.ts +14 -0
- package/dist/core/oauth-account-pool.d.ts.map +1 -1
- package/dist/core/oauth-account-pool.js +166 -14
- package/dist/core/oauth-account-pool.js.map +1 -1
- package/dist/core/os-secret-store.js +1 -1
- package/dist/core/os-secret-store.js.map +1 -1
- package/dist/core/package-manager.d.ts +3 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +25 -4
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-ai-schemas.d.ts +4 -0
- package/dist/core/pi-ai-schemas.d.ts.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +1 -0
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +1 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +4 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +14 -3
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +40 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/run-outcome.d.ts +1 -1
- package/dist/core/run-outcome.d.ts.map +1 -1
- package/dist/core/run-outcome.js +2 -2
- package/dist/core/run-outcome.js.map +1 -1
- package/dist/core/run-preflight.d.ts.map +1 -1
- package/dist/core/run-preflight.js +15 -8
- package/dist/core/run-preflight.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +11 -7
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +8 -4
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +22 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +227 -37
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +10 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +7 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +14 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +48 -15
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +20 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +27 -4
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/bash-jobs.js +2 -2
- package/dist/core/tools/bash-jobs.js.map +1 -1
- package/dist/core/tools/bash.d.ts +3 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +78 -46
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +7 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +139 -75
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +4 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +21 -6
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +90 -76
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +7 -2
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +14 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +9 -3
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +16 -7
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts +2 -0
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +5 -4
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +3 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +64 -20
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +8 -3
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +5 -0
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +3 -13
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +2 -1
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +7 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +35 -8
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts +33 -0
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +11 -2
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts +8 -0
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +16 -0
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +4 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +1 -1
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +15 -14
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +1 -24
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +10 -163
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/humain/ask-user-question/index.d.ts +4 -0
- package/dist/humain/ask-user-question/index.d.ts.map +1 -0
- package/dist/humain/ask-user-question/index.js +18 -0
- package/dist/humain/ask-user-question/index.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/answer-channel.d.ts +38 -0
- package/dist/humain/ask-user-question/vendor/ask/answer-channel.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/answer-channel.js +97 -0
- package/dist/humain/ask-user-question/vendor/ask/answer-channel.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/ask-user-question.d.ts +41 -0
- package/dist/humain/ask-user-question/vendor/ask/ask-user-question.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/ask-user-question.js +441 -0
- package/dist/humain/ask-user-question/vendor/ask/ask-user-question.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/config.d.ts +39 -0
- package/dist/humain/ask-user-question/vendor/ask/config.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/config.js +95 -0
- package/dist/humain/ask-user-question/vendor/ask/config.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/events.d.ts +132 -0
- package/dist/humain/ask-user-question/vendor/ask/events.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/events.js +50 -0
- package/dist/humain/ask-user-question/vendor/ask/events.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/index.d.ts +5 -0
- package/dist/humain/ask-user-question/vendor/ask/index.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/index.js +15 -0
- package/dist/humain/ask-user-question/vendor/ask/index.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/presentation.d.ts +81 -0
- package/dist/humain/ask-user-question/vendor/ask/presentation.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/presentation.js +105 -0
- package/dist/humain/ask-user-question/vendor/ask/presentation.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/reconcile.d.ts +28 -0
- package/dist/humain/ask-user-question/vendor/ask/reconcile.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/reconcile.js +45 -0
- package/dist/humain/ask-user-question/vendor/ask/reconcile.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.d.ts +41 -0
- package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.js +166 -0
- package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.d.ts +46 -0
- package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.js +247 -0
- package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/external-editor.d.ts +11 -0
- package/dist/humain/ask-user-question/vendor/ask/state/external-editor.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/external-editor.js +56 -0
- package/dist/humain/ask-user-question/vendor/ask/state/external-editor.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.d.ts +6 -0
- package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.js +10 -0
- package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/key-router.d.ts +57 -0
- package/dist/humain/ask-user-question/vendor/ask/state/key-router.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/key-router.js +357 -0
- package/dist/humain/ask-user-question/vendor/ask/state/key-router.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.d.ts +112 -0
- package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.js +240 -0
- package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/row-intent.d.ts +87 -0
- package/dist/humain/ask-user-question/vendor/ask/state/row-intent.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/row-intent.js +79 -0
- package/dist/humain/ask-user-question/vendor/ask/state/row-intent.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.d.ts +22 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.js +2 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.d.ts +27 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.js +48 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.d.ts +13 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.js +15 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.d.ts +14 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.js +96 -0
- package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.d.ts +58 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.js +310 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state.d.ts +68 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state.js +2 -0
- package/dist/humain/ask-user-question/vendor/ask/state/state.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.d.ts +24 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.js +114 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.d.ts +18 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.js +29 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.d.ts +41 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.js +99 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.d.ts +37 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.js +70 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/types.d.ts +129 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/types.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/types.js +76 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/types.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.d.ts +21 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.js +49 -0
- package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/component-binding.d.ts +23 -0
- package/dist/humain/ask-user-question/vendor/ask/view/component-binding.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/component-binding.js +16 -0
- package/dist/humain/ask-user-question/vendor/ask/view/component-binding.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.d.ts +21 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.js +49 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.d.ts +43 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.js +130 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.d.ts +45 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.js +39 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.d.ts +36 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.js +72 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.d.ts +61 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.js +108 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.d.ts +39 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.js +76 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.d.ts +123 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.js +180 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.d.ts +108 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.js +235 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.d.ts +37 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.js +47 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.d.ts +31 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.js +35 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.d.ts +124 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.js +205 -0
- package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.d.ts +83 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.js +186 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.d.ts +47 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.js +48 -0
- package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.d.ts +58 -0
- package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.js +84 -0
- package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.d.ts +20 -0
- package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.js +55 -0
- package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.d.ts +23 -0
- package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.js +2 -0
- package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-components.d.ts +15 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-components.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-components.js +2 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-components.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.d.ts +98 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.js +248 -0
- package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/transcript.d.ts +23 -0
- package/dist/humain/ask-user-question/vendor/ask/view/transcript.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/ask/view/transcript.js +131 -0
- package/dist/humain/ask-user-question/vendor/ask/view/transcript.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/config/config.d.ts +132 -0
- package/dist/humain/ask-user-question/vendor/config/config.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/config/config.js +286 -0
- package/dist/humain/ask-user-question/vendor/config/config.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/config/index.d.ts +2 -0
- package/dist/humain/ask-user-question/vendor/config/index.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/config/index.js +2 -0
- package/dist/humain/ask-user-question/vendor/config/index.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/i18n/i18n.d.ts +64 -0
- package/dist/humain/ask-user-question/vendor/i18n/i18n.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/i18n/i18n.js +185 -0
- package/dist/humain/ask-user-question/vendor/i18n/i18n.js.map +1 -0
- package/dist/humain/ask-user-question/vendor/i18n/loader.d.ts +44 -0
- package/dist/humain/ask-user-question/vendor/i18n/loader.d.ts.map +1 -0
- package/dist/humain/ask-user-question/vendor/i18n/loader.js +55 -0
- package/dist/humain/ask-user-question/vendor/i18n/loader.js.map +1 -0
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +26 -16
- package/dist/humain/brand-logo.d.ts +2 -0
- package/dist/humain/brand-logo.d.ts.map +1 -1
- package/dist/humain/brand-logo.js +4 -0
- package/dist/humain/brand-logo.js.map +1 -1
- package/dist/humain/bundled-extension-names.d.ts +1 -0
- package/dist/humain/bundled-extension-names.d.ts.map +1 -1
- package/dist/humain/bundled-extension-names.js +1 -0
- package/dist/humain/bundled-extension-names.js.map +1 -1
- package/dist/humain/checklist/footer-progress.d.ts +7 -0
- package/dist/humain/checklist/footer-progress.d.ts.map +1 -0
- package/dist/humain/checklist/footer-progress.js +15 -0
- package/dist/humain/checklist/footer-progress.js.map +1 -0
- package/dist/humain/checklist/glyphs.d.ts +7 -0
- package/dist/humain/checklist/glyphs.d.ts.map +1 -0
- package/dist/humain/checklist/glyphs.js +8 -0
- package/dist/humain/checklist/glyphs.js.map +1 -0
- package/dist/humain/checklist/index.d.ts +6 -0
- package/dist/humain/checklist/index.d.ts.map +1 -0
- package/dist/humain/checklist/index.js +37 -0
- package/dist/humain/checklist/index.js.map +1 -0
- package/dist/humain/checklist/progress.d.ts +37 -0
- package/dist/humain/checklist/progress.d.ts.map +1 -0
- package/dist/humain/checklist/progress.js +234 -0
- package/dist/humain/checklist/progress.js.map +1 -0
- package/dist/humain/checklist/projector.d.ts +53 -0
- package/dist/humain/checklist/projector.d.ts.map +1 -0
- package/dist/humain/checklist/projector.js +198 -0
- package/dist/humain/checklist/projector.js.map +1 -0
- package/dist/humain/checklist/sidebar.d.ts +18 -0
- package/dist/humain/checklist/sidebar.d.ts.map +1 -0
- package/dist/humain/checklist/sidebar.js +38 -0
- package/dist/humain/checklist/sidebar.js.map +1 -0
- package/dist/humain/checklist/status-segment.d.ts +19 -0
- package/dist/humain/checklist/status-segment.d.ts.map +1 -0
- package/dist/humain/checklist/status-segment.js +59 -0
- package/dist/humain/checklist/status-segment.js.map +1 -0
- package/dist/humain/checklist/vendor/add-task-dialog.d.ts +54 -0
- package/dist/humain/checklist/vendor/add-task-dialog.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/add-task-dialog.js +238 -0
- package/dist/humain/checklist/vendor/add-task-dialog.js.map +1 -0
- package/dist/humain/checklist/vendor/commands.d.ts +38 -0
- package/dist/humain/checklist/vendor/commands.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/commands.js +193 -0
- package/dist/humain/checklist/vendor/commands.js.map +1 -0
- package/dist/humain/checklist/vendor/index.d.ts +3 -0
- package/dist/humain/checklist/vendor/index.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/index.js +276 -0
- package/dist/humain/checklist/vendor/index.js.map +1 -0
- package/dist/humain/checklist/vendor/render.d.ts +97 -0
- package/dist/humain/checklist/vendor/render.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/render.js +354 -0
- package/dist/humain/checklist/vendor/render.js.map +1 -0
- package/dist/humain/checklist/vendor/settings.d.ts +11 -0
- package/dist/humain/checklist/vendor/settings.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/settings.js +8 -0
- package/dist/humain/checklist/vendor/settings.js.map +1 -0
- package/dist/humain/checklist/vendor/store.d.ts +120 -0
- package/dist/humain/checklist/vendor/store.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/store.js +990 -0
- package/dist/humain/checklist/vendor/store.js.map +1 -0
- package/dist/humain/checklist/vendor/tools.d.ts +21 -0
- package/dist/humain/checklist/vendor/tools.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/tools.js +162 -0
- package/dist/humain/checklist/vendor/tools.js.map +1 -0
- package/dist/humain/checklist/vendor/types.d.ts +188 -0
- package/dist/humain/checklist/vendor/types.d.ts.map +1 -0
- package/dist/humain/checklist/vendor/types.js +32 -0
- package/dist/humain/checklist/vendor/types.js.map +1 -0
- package/dist/humain/gateway/catalog.d.ts +1 -0
- package/dist/humain/gateway/catalog.d.ts.map +1 -1
- package/dist/humain/gateway/catalog.js +1 -0
- package/dist/humain/gateway/catalog.js.map +1 -1
- package/dist/humain/gateway/client.d.ts +1 -0
- package/dist/humain/gateway/client.d.ts.map +1 -1
- package/dist/humain/gateway/client.js +8 -1
- package/dist/humain/gateway/client.js.map +1 -1
- package/dist/humain/gateway/http.d.ts.map +1 -1
- package/dist/humain/gateway/http.js +11 -3
- package/dist/humain/gateway/http.js.map +1 -1
- package/dist/humain/gateway/images.d.ts +3 -0
- package/dist/humain/gateway/images.d.ts.map +1 -0
- package/dist/humain/gateway/images.js +73 -0
- package/dist/humain/gateway/images.js.map +1 -0
- package/dist/humain/gateway/provider.js +1 -1
- package/dist/humain/gateway/provider.js.map +1 -1
- package/dist/humain/hcode/account-store.d.ts.map +1 -1
- package/dist/humain/hcode/account-store.js +3 -1
- package/dist/humain/hcode/account-store.js.map +1 -1
- package/dist/humain/hcode/account.d.ts.map +1 -1
- package/dist/humain/hcode/account.js +23 -13
- package/dist/humain/hcode/account.js.map +1 -1
- package/dist/humain/hcode/images.d.ts.map +1 -1
- package/dist/humain/hcode/images.js +19 -13
- package/dist/humain/hcode/images.js.map +1 -1
- package/dist/humain/hcode/login-failure.d.ts +1 -0
- package/dist/humain/hcode/login-failure.d.ts.map +1 -1
- package/dist/humain/hcode/login-failure.js +1 -0
- package/dist/humain/hcode/login-failure.js.map +1 -1
- package/dist/humain/hcode/provider.d.ts.map +1 -1
- package/dist/humain/hcode/provider.js +2 -1
- package/dist/humain/hcode/provider.js.map +1 -1
- package/dist/humain/hcode/run-credential.d.ts +1 -0
- package/dist/humain/hcode/run-credential.d.ts.map +1 -1
- package/dist/humain/hcode/run-credential.js +12 -4
- package/dist/humain/hcode/run-credential.js.map +1 -1
- package/dist/humain/index.d.ts.map +1 -1
- package/dist/humain/index.js +4 -0
- package/dist/humain/index.js.map +1 -1
- package/dist/humain/node-provider.d.ts.map +1 -1
- package/dist/humain/node-provider.js +37 -8
- package/dist/humain/node-provider.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +38 -26
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/chat-viewport.js +1 -1
- package/dist/modes/interactive/chat-viewport.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +2 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +7 -4
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +2 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +20 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
- package/dist/modes/interactive/components/extension-editor.js +2 -2
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +74 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +11 -4
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +56 -8
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +13 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +10 -9
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +3 -3
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +83 -37
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +3 -3
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +18 -7
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +70 -24
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/status-line.d.ts +16 -0
- package/dist/modes/interactive/components/status-line.d.ts.map +1 -0
- package/dist/modes/interactive/components/status-line.js +51 -0
- package/dist/modes/interactive/components/status-line.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +8 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +11 -3
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +13 -3
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +17 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +232 -108
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
- package/dist/modes/interactive/program-status-reporter.js +4 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js +9 -1
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +34 -7
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.js +6 -5
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +2 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +9 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +2 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +113 -13
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +22 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/uncaught-errors.d.ts +20 -0
- package/dist/modes/uncaught-errors.d.ts.map +1 -0
- package/dist/modes/uncaught-errors.js +56 -0
- package/dist/modes/uncaught-errors.js.map +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +10 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/clipboard-image.js +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.js +2 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/image-process.d.ts +5 -0
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js +22 -4
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/output-files.d.ts +44 -7
- package/dist/utils/output-files.d.ts.map +1 -1
- package/dist/utils/output-files.js +206 -12
- package/dist/utils/output-files.js.map +1 -1
- package/dist/utils/piped-stdin.d.ts +21 -0
- package/dist/utils/piped-stdin.d.ts.map +1 -0
- package/dist/utils/piped-stdin.js +60 -0
- package/dist/utils/piped-stdin.js.map +1 -0
- package/dist/utils/shell.d.ts +5 -2
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +77 -8
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +33 -2
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +77 -10
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +9 -8
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/wsl.d.ts +8 -2
- package/dist/utils/wsl.d.ts.map +1 -1
- package/dist/utils/wsl.js +12 -3
- package/dist/utils/wsl.js.map +1 -1
- package/docs/cli.md +45 -3
- package/docs/codemode.md +7 -3
- package/docs/compaction.md +1 -1
- package/docs/coordination.md +16 -4
- package/docs/development.md +6 -0
- package/docs/environment-variables.md +5 -3
- package/docs/extensions.md +19 -5
- package/docs/keybindings.md +2 -0
- package/docs/llama-cpp.md +2 -2
- package/docs/message-types.md +1 -0
- package/docs/models-configuration.md +14 -3
- package/docs/models.md +29 -7
- package/docs/providers.md +25 -3
- package/docs/rpc-commands.md +25 -2
- package/docs/rpc.md +20 -0
- package/docs/run-preflight.md +2 -2
- package/docs/session-format.md +9 -0
- package/docs/settings.md +35 -5
- package/docs/shell-aliases.md +1 -1
- package/docs/slash-commands.md +3 -1
- package/docs/terminal-setup.md +25 -0
- package/docs/windows.md +2 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/rpc-extension-ui.ts +8 -7
- package/npm-shrinkwrap.json +209 -180
- package/package.json +26 -20
- package/schemas/keybindings.schema.json +12 -0
- package/schemas/models.schema.json +20 -7
- package/schemas/settings.schema.json +43 -5
- package/src/coordination/UPSTREAM.md +27 -1
- package/src/coordination/upstream.json +3 -3
- package/src/humain/ask-user-question/UPSTREAM.md +31 -0
- package/src/humain/ask-user-question/upstream.json +258 -0
- package/src/humain/ask-user-question/vendor/ask/LICENSE +21 -0
- package/src/humain/ask-user-question/vendor/ask/locales/de.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/en.json +41 -0
- package/src/humain/ask-user-question/vendor/ask/locales/es.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/fr.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/pt-BR.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/pt.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/ru.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/uk.json +38 -0
- package/src/humain/ask-user-question/vendor/ask/locales/zh.json +40 -0
- package/src/humain/ask-user-question/vendor/config/LICENSE +21 -0
- package/src/humain/ask-user-question/vendor/i18n/LICENSE +21 -0
- package/src/humain/caveman/UPSTREAM.md +44 -11
- package/src/humain/caveman/upstream.json +3 -3
- package/src/humain/caveman/vendor/NOTICE +4 -0
- package/dist/bundle/chunks/anthropic-messages-XFCDMGD6.js +0 -77
- package/dist/bundle/chunks/azure-openai-responses-F4KQM3NK.js +0 -15
- package/dist/bundle/chunks/bowser-DXKSTXFQ.js +0 -89
- package/dist/bundle/chunks/chunk-3E37CJCE.js +0 -34
- package/dist/bundle/chunks/chunk-3HVHETMU.js +0 -18
- package/dist/bundle/chunks/chunk-3PJ7NPWN.js +0 -80
- package/dist/bundle/chunks/chunk-6JTCRCNF.js +0 -74
- package/dist/bundle/chunks/chunk-F77J5EQZ.js +0 -3
- package/dist/bundle/chunks/chunk-GPLWWO5Q.js +0 -121
- package/dist/bundle/chunks/chunk-GV5OVRKK.js +0 -4
- package/dist/bundle/chunks/chunk-JBSWWCT5.js +0 -12
- package/dist/bundle/chunks/chunk-JQBZUFH7.js +0 -3580
- package/dist/bundle/chunks/chunk-JWOPWHVH.js +0 -51
- package/dist/bundle/chunks/chunk-KRBELWQH.js +0 -7
- package/dist/bundle/chunks/chunk-PFBAIRCY.js +0 -56
- package/dist/bundle/chunks/chunk-Q5RKNQ2T.js +0 -73
- package/dist/bundle/chunks/chunk-QFDZEUFU.js +0 -12
- package/dist/bundle/chunks/chunk-SKCJ25SX.js +0 -24
- package/dist/bundle/chunks/chunk-UEW6TUSP.js +0 -36
- package/dist/bundle/chunks/chunk-UZOIHLNU.js +0 -23
- package/dist/bundle/chunks/chunk-YSWDFV2L.js +0 -11
- package/dist/bundle/chunks/chunk-YZMQXAJM.js +0 -8
- package/dist/bundle/chunks/entry-2GZ3PTWQ.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-WIASMWS3.js +0 -22
- package/dist/bundle/chunks/google-vertex-WSPHRZIZ.js +0 -25
- package/dist/bundle/chunks/interactive-mode-SDUO5OLD.js +0 -5
- package/dist/bundle/chunks/mistral-conversations-7JYDDRUT.js +0 -43
- package/dist/bundle/chunks/openai-codex-responses-7PAML4NF.js +0 -102
- package/dist/bundle/chunks/openai-completions-UJDAIGTK.js +0 -87
- package/dist/bundle/chunks/openai-responses-2WNCE6AY.js +0 -26
- package/dist/bundle/chunks/openrouter-images-V3UCCO6X.js +0 -8
- package/dist/bundle/chunks/pi-messages-TQ7LJUNQ.js +0 -28
- package/dist/bundle/chunks/runtime-H7LYNKCZ.js +0 -2
- package/dist/bundle/chunks/session-picker-EYKCMFQR.js +0 -4
- package/dist/bundle/chunks/startup-ui-7ODOR34R.js +0 -3
- package/dist/bundle/chunks/typesafe-system-one-YP7GGN4C.js +0 -3
- package/dist/bundle/chunks/virtual-modules-IU5KWB2C.js +0 -28
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-window.d.ts","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/scroll-window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAY7E,4GAA4G;AAC5G,wBAAgB,kBAAkB,CACjC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACvC,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,GAChB,MAAM,CAOR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,gBAAgB,EAAE,MAAM,EAAE,EAC1B,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAClD,IAAI,CAcN;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACnC,KAAK,EAAE,KAAK,GACV;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;CAAE,CAO1D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll-window row math shared by `DialogView` (the dialog's middle region) and
|
|
3
|
+
* `PreviewPane` (an options column fitted to the row allowance the dialog gives it) —
|
|
4
|
+
* one implementation, so both windows centre, clamp and mark overflow identically.
|
|
5
|
+
*/
|
|
6
|
+
const OVERFLOW_UP = "↑";
|
|
7
|
+
const OVERFLOW_DOWN = "↓";
|
|
8
|
+
const OVERFLOW_BOTH = "↕";
|
|
9
|
+
/** Scroll window start, centered on the focused option; top-anchored when there is no interactive focus. */
|
|
10
|
+
export function computeScrollStart(bodyRange, rowsBeforeBody, availableMiddle, middleRows) {
|
|
11
|
+
if (!bodyRange)
|
|
12
|
+
return 0;
|
|
13
|
+
const focusedRowInMiddle = rowsBeforeBody + bodyRange[0];
|
|
14
|
+
const focusedHeight = bodyRange[1] - bodyRange[0];
|
|
15
|
+
// Center the focused item vertically in the available middle space.
|
|
16
|
+
const idealStart = focusedRowInMiddle - Math.floor(Math.max(0, availableMiddle - focusedHeight) / 2);
|
|
17
|
+
return Math.max(0, Math.min(idealStart, middleRows - availableMiddle));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Mark the scroll window edges with overflow arrows; combined ↕ on a single-row middle.
|
|
21
|
+
* An arrow replaces the row it lands on, so rows inside `protectedRows` (the focused item,
|
|
22
|
+
* in window coordinates, end-exclusive) are never drawn over — losing the affordance beats
|
|
23
|
+
* losing the row the user is on (#261).
|
|
24
|
+
*/
|
|
25
|
+
export function decorateOverflow(scrollableMiddle, hasUp, hasDown, theme, protectedRows) {
|
|
26
|
+
const drawable = (row) => !protectedRows || row < protectedRows[0] || row >= protectedRows[1];
|
|
27
|
+
if (hasUp && hasDown && scrollableMiddle.length === 1) {
|
|
28
|
+
// Single-row middle: combined ↕ avoids the prior collision where ↓ overwrote ↑.
|
|
29
|
+
if (drawable(0))
|
|
30
|
+
scrollableMiddle[0] = theme.fg("dim", OVERFLOW_BOTH);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (hasUp && scrollableMiddle.length > 0 && drawable(0)) {
|
|
34
|
+
scrollableMiddle[0] = theme.fg("dim", OVERFLOW_UP);
|
|
35
|
+
}
|
|
36
|
+
const last = scrollableMiddle.length - 1;
|
|
37
|
+
if (hasDown && last > 0 && drawable(last)) {
|
|
38
|
+
scrollableMiddle[last] = theme.fg("dim", OVERFLOW_DOWN);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Window `lines` to at most `rows` rows, centred on `focus` (end-exclusive row range),
|
|
43
|
+
* with overflow arrows that never cover the focused rows. Returns the visible lines and
|
|
44
|
+
* the focus range in window coordinates. Lines that already fit are returned unchanged.
|
|
45
|
+
*/
|
|
46
|
+
export function windowLines(lines, rows, focus, theme) {
|
|
47
|
+
if (lines.length <= rows)
|
|
48
|
+
return { lines: [...lines], focus };
|
|
49
|
+
const start = computeScrollStart(focus, 0, rows, lines.length);
|
|
50
|
+
const visible = lines.slice(start, start + rows);
|
|
51
|
+
const inWindow = focus && [focus[0] - start, focus[1] - start];
|
|
52
|
+
decorateOverflow(visible, start > 0, start + rows < lines.length, theme, inWindow);
|
|
53
|
+
return { lines: visible, focus: inWindow };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=scroll-window.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-window.js","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/scroll-window.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,4GAA4G;AAC5G,MAAM,UAAU,kBAAkB,CACjC,SAAuC,EACvC,cAAsB,EACtB,eAAuB,EACvB,UAAkB;IAElB,IAAI,CAAC,SAAS;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,kBAAkB,GAAG,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC,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AC,EAAE,CAAC;QAC3C,gBAAgB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAC1B,KAAwB,EACxB,IAAY,EACZ,KAAmC,EACnC,KAAY;IAEZ,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;IAC9D,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAiC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7F,gBAAgB,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["import type { Theme } from \"../../../../../modes/interactive/theme/theme.ts\";\n\n/**\n * Scroll-window row math shared by `DialogView` (the dialog's middle region) and\n * `PreviewPane` (an options column fitted to the row allowance the dialog gives it) —\n * one implementation, so both windows centre, clamp and mark overflow identically.\n */\n\nconst OVERFLOW_UP = \"↑\";\nconst OVERFLOW_DOWN = \"↓\";\nconst OVERFLOW_BOTH = \"↕\";\n\n/** Scroll window start, centered on the focused option; top-anchored when there is no interactive focus. */\nexport function computeScrollStart(\n\tbodyRange: [number, number] | undefined,\n\trowsBeforeBody: number,\n\tavailableMiddle: number,\n\tmiddleRows: number,\n): number {\n\tif (!bodyRange) return 0;\n\tconst focusedRowInMiddle = rowsBeforeBody + bodyRange[0];\n\tconst focusedHeight = bodyRange[1] - bodyRange[0];\n\t// Center the focused item vertically in the available middle space.\n\tconst idealStart = focusedRowInMiddle - Math.floor(Math.max(0, availableMiddle - focusedHeight) / 2);\n\treturn Math.max(0, Math.min(idealStart, middleRows - availableMiddle));\n}\n\n/**\n * Mark the scroll window edges with overflow arrows; combined ↕ on a single-row middle.\n * An arrow replaces the row it lands on, so rows inside `protectedRows` (the focused item,\n * in window coordinates, end-exclusive) are never drawn over — losing the affordance beats\n * losing the row the user is on (#261).\n */\nexport function decorateOverflow(\n\tscrollableMiddle: string[],\n\thasUp: boolean,\n\thasDown: boolean,\n\ttheme: Theme,\n\tprotectedRows: readonly [number, number] | undefined,\n): void {\n\tconst drawable = (row: number) => !protectedRows || row < protectedRows[0] || row >= protectedRows[1];\n\tif (hasUp && hasDown && scrollableMiddle.length === 1) {\n\t\t// Single-row middle: combined ↕ avoids the prior collision where ↓ overwrote ↑.\n\t\tif (drawable(0)) scrollableMiddle[0] = theme.fg(\"dim\", OVERFLOW_BOTH);\n\t\treturn;\n\t}\n\tif (hasUp && scrollableMiddle.length > 0 && drawable(0)) {\n\t\tscrollableMiddle[0] = theme.fg(\"dim\", OVERFLOW_UP);\n\t}\n\tconst last = scrollableMiddle.length - 1;\n\tif (hasDown && last > 0 && drawable(last)) {\n\t\tscrollableMiddle[last] = theme.fg(\"dim\", OVERFLOW_DOWN);\n\t}\n}\n\n/**\n * Window `lines` to at most `rows` rows, centred on `focus` (end-exclusive row range),\n * with overflow arrows that never cover the focused rows. Returns the visible lines and\n * the focus range in window coordinates. Lines that already fit are returned unchanged.\n */\nexport function windowLines(\n\tlines: readonly string[],\n\trows: number,\n\tfocus: [number, number] | undefined,\n\ttheme: Theme,\n): { lines: string[]; focus: [number, number] | undefined } {\n\tif (lines.length <= rows) return { lines: [...lines], focus };\n\tconst start = computeScrollStart(focus, 0, rows, lines.length);\n\tconst visible = lines.slice(start, start + rows);\n\tconst inWindow: [number, number] | undefined = focus && [focus[0] - start, focus[1] - start];\n\tdecorateOverflow(visible, start > 0, start + rows < lines.length, theme, inWindow);\n\treturn { lines: visible, focus: inWindow };\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Component } from "@earendil-works/pi-tui";
|
|
2
|
+
/**
|
|
3
|
+
* Generic prop-driven component contract. Every renderable owns its own `P` shape;
|
|
4
|
+
* the adapter computes `P` from canonical state via per-component selectors and
|
|
5
|
+
* pushes it via `setProps`. `focused: boolean` is a field on `P` only where the
|
|
6
|
+
* component needs it.
|
|
7
|
+
*/
|
|
8
|
+
export interface StatefulView<P> extends Component {
|
|
9
|
+
setProps(props: P): void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Discriminated focus union — encodes the three-cell focus invariant
|
|
13
|
+
* (`notesVisible`, submit-tab, options). Dispatcher cascade (`key-router.ts`)
|
|
14
|
+
* and reducer's defensive clears (`state-reducer.ts`) enforce mutual exclusion;
|
|
15
|
+
* this type makes it explicit so per-component `focused: boolean` flags
|
|
16
|
+
* derive from one equality check against this discriminant rather than
|
|
17
|
+
* parallel boolean reads.
|
|
18
|
+
*
|
|
19
|
+
* Priority order: notes > submit > options. Matches the dispatcher
|
|
20
|
+
* cascade exactly so the union is observably equivalent to today's reads.
|
|
21
|
+
*/
|
|
22
|
+
export type ActiveView = "notes" | "options" | "submit";
|
|
23
|
+
//# sourceMappingURL=stateful-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful-view.d.ts","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/stateful-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,SAAS;IACjD,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful-view.js","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/stateful-view.ts"],"names":[],"mappings":"","sourcesContent":["import type { Component } from \"@earendil-works/pi-tui\";\n\n/**\n * Generic prop-driven component contract. Every renderable owns its own `P` shape;\n * the adapter computes `P` from canonical state via per-component selectors and\n * pushes it via `setProps`. `focused: boolean` is a field on `P` only where the\n * component needs it.\n */\nexport interface StatefulView<P> extends Component {\n\tsetProps(props: P): void;\n}\n\n/**\n * Discriminated focus union — encodes the three-cell focus invariant\n * (`notesVisible`, submit-tab, options). Dispatcher cascade (`key-router.ts`)\n * and reducer's defensive clears (`state-reducer.ts`) enforce mutual exclusion;\n * this type makes it explicit so per-component `focused: boolean` flags\n * derive from one equality check against this discriminant rather than\n * parallel boolean reads.\n *\n * Priority order: notes > submit > options. Matches the dispatcher\n * cascade exactly so the union is observably equivalent to today's reads.\n */\nexport type ActiveView = \"notes\" | \"options\" | \"submit\";\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MultiSelectView } from "./components/multi-select-view.ts";
|
|
2
|
+
import type { OptionListViewProps } from "./components/option-list-view.ts";
|
|
3
|
+
import type { PreviewPane } from "./components/preview/preview-pane.ts";
|
|
4
|
+
import type { StatefulView } from "./stateful-view.ts";
|
|
5
|
+
export interface TabBodyHeights {
|
|
6
|
+
current: number;
|
|
7
|
+
max: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TabComponents {
|
|
10
|
+
optionList: StatefulView<OptionListViewProps>;
|
|
11
|
+
preview: PreviewPane;
|
|
12
|
+
multiSelect?: MultiSelectView;
|
|
13
|
+
bodyHeights: (width: number) => TabBodyHeights;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tab-components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-components.d.ts","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/tab-components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC7B,UAAU,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAC9C,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,cAAc,CAAC;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-components.js","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/tab-components.ts"],"names":[],"mappings":"","sourcesContent":["import type { MultiSelectView } from \"./components/multi-select-view.ts\";\nimport type { OptionListViewProps } from \"./components/option-list-view.ts\";\nimport type { PreviewPane } from \"./components/preview/preview-pane.ts\";\nimport type { StatefulView } from \"./stateful-view.ts\";\n\nexport interface TabBodyHeights {\n\tcurrent: number;\n\tmax: number;\n}\n\nexport interface TabComponents {\n\toptionList: StatefulView<OptionListViewProps>;\n\tpreview: PreviewPane;\n\tmultiSelect?: MultiSelectView;\n\tbodyHeights: (width: number) => TabBodyHeights;\n}\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type Component, type Editor } from "@earendil-works/pi-tui";
|
|
2
|
+
import type { Theme } from "../../../../../modes/interactive/theme/theme.ts";
|
|
3
|
+
import type { QuestionData } from "../tool/types.ts";
|
|
4
|
+
import type { PreviewPaneProps } from "./components/preview/preview-pane.ts";
|
|
5
|
+
import type { DialogState } from "./dialog-builder.ts";
|
|
6
|
+
import type { StatefulView } from "./stateful-view.ts";
|
|
7
|
+
import type { TabComponents } from "./tab-components.ts";
|
|
8
|
+
/**
|
|
9
|
+
* Per-tab content provider. Pure functional — closes over construction-time
|
|
10
|
+
* config; per-tick state threads through method args. The chrome wrapper
|
|
11
|
+
* enforces height equality across tabs via `bodyHeight + footerRowCount`.
|
|
12
|
+
*/
|
|
13
|
+
export interface TabContentStrategy {
|
|
14
|
+
/** Total RENDERED footer rows — MUST equal what `footerRows()` actually emits. Drives residual math. */
|
|
15
|
+
readonly footerRowCount: number;
|
|
16
|
+
/** Variable rows above the body, after top chrome (border + tabBar + Spacer). */
|
|
17
|
+
headingRows(state: DialogState): Component[];
|
|
18
|
+
/** Body Component placed at the body slot. */
|
|
19
|
+
bodyComponent(state: DialogState): Component;
|
|
20
|
+
/** Natural rendered height of `bodyComponent(state)` at given width. */
|
|
21
|
+
bodyHeight(width: number, state: DialogState): number;
|
|
22
|
+
/** Optional rows between body's trailing Spacer and the bottom border. */
|
|
23
|
+
midRows(state: DialogState): Component[];
|
|
24
|
+
/** Footer rows below the bottom border. Rendered row count MUST equal `footerRowCount`. */
|
|
25
|
+
footerRows(state: DialogState): Component[];
|
|
26
|
+
/** Row range of the focused item within the body's rendered output, or undefined if no interactive focus. */
|
|
27
|
+
focusedItemRowRange(width: number, state: DialogState): [number, number] | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface QuestionTabStrategyConfig {
|
|
30
|
+
theme: Theme;
|
|
31
|
+
questions: readonly QuestionData[];
|
|
32
|
+
getPreviewPane: () => StatefulView<PreviewPaneProps>;
|
|
33
|
+
tabsByIndex: ReadonlyArray<TabComponents>;
|
|
34
|
+
notesInput: Editor;
|
|
35
|
+
isMulti: boolean;
|
|
36
|
+
getCurrentBodyHeight: (width: number) => number;
|
|
37
|
+
/** Resolved collapse key spec (`"ctrl+]"`, `"alt+o"`, or `"off"`). Drives the footer's collapse hint. */
|
|
38
|
+
collapseKey: string;
|
|
39
|
+
/** Resolved notes key (`resolveNotesKey` output). Named by the footer's notes hint. */
|
|
40
|
+
notesKey: string;
|
|
41
|
+
}
|
|
42
|
+
export declare class QuestionTabStrategy implements TabContentStrategy {
|
|
43
|
+
/** Spacer(1) + OneLineClippedText(hint, 1) = 2 rendered rows. */
|
|
44
|
+
readonly footerRowCount = 2;
|
|
45
|
+
private readonly config;
|
|
46
|
+
constructor(config: QuestionTabStrategyConfig);
|
|
47
|
+
headingRows(state: DialogState): Component[];
|
|
48
|
+
bodyComponent(state: DialogState): Component;
|
|
49
|
+
bodyHeight(width: number, _state: DialogState): number;
|
|
50
|
+
midRows(state: DialogState): Component[];
|
|
51
|
+
footerRows(state: DialogState): Component[];
|
|
52
|
+
focusedItemRowRange(width: number, state: DialogState): [number, number] | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface SubmitTabStrategyConfig {
|
|
55
|
+
theme: Theme;
|
|
56
|
+
questions: readonly QuestionData[];
|
|
57
|
+
submitPicker: Component | undefined;
|
|
58
|
+
/** Shared notes Editor — mounted into midRows while the global-note editor is open on this tab. */
|
|
59
|
+
notesInput: Editor;
|
|
60
|
+
/** Resolved notes key (`resolveNotesKey` output). Named by the global-note hint. */
|
|
61
|
+
notesKey: string;
|
|
62
|
+
}
|
|
63
|
+
export declare class SubmitTabStrategy implements TabContentStrategy {
|
|
64
|
+
/** Spacer(1) + Text(prompt, 1) + submitPicker(2) + OneLineClippedText(hint, 1) = 5 rendered rows. Fallback path lands at 5 via 2 Spacer(1)s in the picker slot. */
|
|
65
|
+
readonly footerRowCount = 5;
|
|
66
|
+
private readonly config;
|
|
67
|
+
constructor(config: SubmitTabStrategyConfig);
|
|
68
|
+
headingRows(_state: DialogState): Component[];
|
|
69
|
+
bodyComponent(state: DialogState): Component;
|
|
70
|
+
bodyHeight(width: number, state: DialogState): number;
|
|
71
|
+
midRows(state: DialogState): Component[];
|
|
72
|
+
footerRows(state: DialogState): Component[];
|
|
73
|
+
focusedItemRowRange(_width: number, _state: DialogState): [number, number] | undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Build the controls hint line. Order:
|
|
77
|
+
* Enter · ↑/↓ [· Space toggle] [· n notes] [· Tab switch] · Esc [· <key> collapse]
|
|
78
|
+
* [· Shift+Enter newline] [· Ctrl+U clear]
|
|
79
|
+
*
|
|
80
|
+
* `NOTES` is part of the resting (notes-closed) core — it drops while the notes
|
|
81
|
+
* editor or custom-answer input has the keyboard. Ctrl+G is Pi's global external-
|
|
82
|
+
* editor shortcut and needs no local hint; the context-specific clear shortcut is
|
|
83
|
+
* appended at the far right while input mode is active.
|
|
84
|
+
*
|
|
85
|
+
* The collapse part interpolates the configured `collapseKey` (display-cased)
|
|
86
|
+
* and is omitted entirely when the shortcut is `"off"` — `routeKey` and the raw
|
|
87
|
+
* terminal listener both refuse to collapse in that case, so advertising a key
|
|
88
|
+
* would be a lie.
|
|
89
|
+
*/
|
|
90
|
+
export declare function buildHintText(question: QuestionData | undefined, isMulti: boolean, state: DialogState, collapseKey: string, notesKey: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* Submit-tab counterpart of `buildHintText` — the same `·`-joined bottom-row idiom.
|
|
93
|
+
* Resting: Enter · ↑/↓ · `n to add a note` · Esc. While the global-note editor is
|
|
94
|
+
* open the note part drops (the editor is the affordance then) and the Shift+Enter
|
|
95
|
+
* newline hint is appended after cancel, mirroring the question tabs' notes-open shape.
|
|
96
|
+
*/
|
|
97
|
+
export declare function buildSubmitHintText(state: DialogState, notesKey: string): string;
|
|
98
|
+
//# sourceMappingURL=tab-content-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-content-strategy.d.ts","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/tab-content-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,MAAM,EAAiC,MAAM,wBAAwB,CAAC;AAC/G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAK7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAgBvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAsCzD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,wGAAwG;IACxG,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAEhC,iFAAiF;IACjF,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CAAC;IAE7C,8CAA8C;IAC9C,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAE7C,wEAAwE;IACxE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAEtD,0EAA0E;IAC1E,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CAAC;IAEzC,2FAA2F;IAC3F,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CAAC;IAE5C,6GAA6G;IAC7G,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CACrF;AAED,MAAM,WAAW,yBAAyB;IACzC,KAAK,EAAE,KAAK,CAAC;IACb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kB;IAC3D,mKAAmK;IACnK,QAAQ,CAAC,cAAc,KAAK;IAE5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IAEjD,YAAY,MAAM,EAAE,uBAAuB,EAE1C;IAED,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,CAK5C;IAED,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAmC3C;IAED,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,MAAM,CAEpD;IAED,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CAWvC;IAED,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAAE,CAkC1C;IAED,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAErF;CACD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC5B,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,EAClB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACd,MAAM,CAeR;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMhF"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { Container, Spacer, Text, truncateToWidth } from "@earendil-works/pi-tui";
|
|
2
|
+
import { COLLAPSE_KEY_OFF, formatKeySpecForDisplay, formatNotesKeyForDisplay } from "../config.js";
|
|
3
|
+
import { t } from "../state/i18n-bridge.js";
|
|
4
|
+
import { selectSavedNote } from "../state/selectors/derivations.js";
|
|
5
|
+
import { formatAnswerScalar } from "../tool/format-answer.js";
|
|
6
|
+
import { HINT_PART_CANCEL, HINT_PART_CLEAR, HINT_PART_COLLAPSE_TEMPLATE, HINT_PART_ENTER, HINT_PART_NAV, HINT_PART_NEW_LINE, HINT_PART_NOTES_TEMPLATE, HINT_PART_TAB, HINT_PART_TOGGLE, INCOMPLETE_WARNING_PREFIX, KEY_PLACEHOLDER, READY_PROMPT, REVIEW_HEADING, } from "./dialog-copy.js";
|
|
7
|
+
const NOTES_HEADER = "Notes:";
|
|
8
|
+
const GLOBAL_NOTES_HEADER = "Global note:";
|
|
9
|
+
const REVIEW_GLOBAL_HINT_TEMPLATE = `${KEY_PLACEHOLDER} to add a note`;
|
|
10
|
+
const REVIEW_NOTE_LABEL = "Note";
|
|
11
|
+
/** Label for a question's saved note — the question tab's resting row and the review entry (#197). */
|
|
12
|
+
const SAVED_NOTE_LABEL = "Note for this answer:";
|
|
13
|
+
/**
|
|
14
|
+
* Single-row, width-clipped chrome cell. The footer row count is invariant
|
|
15
|
+
* (`QuestionTabStrategy.footerRowCount = 2`) — pi-tui's `Text` word-wraps when
|
|
16
|
+
* the styled hint exceeds `width`, inflating that row count and desyncing the
|
|
17
|
+
* `bodyHeight + footerRowCount` math in `DialogView.render`. Clipping with
|
|
18
|
+
* `truncateToWidth` (ANSI-aware, matches `multi-select-view.ts` usage) keeps
|
|
19
|
+
* the hint on one line; the collapse affordance falls off the right edge with
|
|
20
|
+
* `…` on terminals too narrow to advertise it.
|
|
21
|
+
*/
|
|
22
|
+
class OneLineClippedText {
|
|
23
|
+
text;
|
|
24
|
+
paddingLeft;
|
|
25
|
+
constructor(text, paddingLeft = 0) {
|
|
26
|
+
this.text = text;
|
|
27
|
+
this.paddingLeft = paddingLeft;
|
|
28
|
+
}
|
|
29
|
+
render(width) {
|
|
30
|
+
const pad = " ".repeat(this.paddingLeft);
|
|
31
|
+
const avail = Math.max(0, width - this.paddingLeft);
|
|
32
|
+
return [pad + truncateToWidth(this.text, avail, "…", false)];
|
|
33
|
+
}
|
|
34
|
+
invalidate() { }
|
|
35
|
+
handleInput(_data) { }
|
|
36
|
+
}
|
|
37
|
+
export class QuestionTabStrategy {
|
|
38
|
+
/** Spacer(1) + OneLineClippedText(hint, 1) = 2 rendered rows. */
|
|
39
|
+
footerRowCount = 2;
|
|
40
|
+
config;
|
|
41
|
+
constructor(config) {
|
|
42
|
+
this.config = config;
|
|
43
|
+
}
|
|
44
|
+
headingRows(state) {
|
|
45
|
+
const out = [];
|
|
46
|
+
const question = this.config.questions[state.currentTab];
|
|
47
|
+
// In multi-question mode the tab bar already shows the header; suppress the inline badge.
|
|
48
|
+
if (!this.config.isMulti && question?.header && question.header.length > 0) {
|
|
49
|
+
out.push(new Text(this.config.theme.bg("selectedBg", ` ${question.header} `), 1, 0));
|
|
50
|
+
out.push(new Spacer(1));
|
|
51
|
+
}
|
|
52
|
+
if (question) {
|
|
53
|
+
out.push(new Text(this.config.theme.bold(question.question), 1, 0));
|
|
54
|
+
out.push(new Spacer(1));
|
|
55
|
+
}
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
bodyComponent(state) {
|
|
59
|
+
const question = this.config.questions[state.currentTab];
|
|
60
|
+
const mso = this.config.tabsByIndex[state.currentTab]?.multiSelect;
|
|
61
|
+
if (question?.multiSelect === true && mso)
|
|
62
|
+
return mso;
|
|
63
|
+
return this.config.getPreviewPane();
|
|
64
|
+
}
|
|
65
|
+
bodyHeight(width, _state) {
|
|
66
|
+
return this.config.getCurrentBodyHeight(width);
|
|
67
|
+
}
|
|
68
|
+
midRows(state) {
|
|
69
|
+
if (state.notesVisible) {
|
|
70
|
+
return [
|
|
71
|
+
new Text(this.config.theme.fg("muted", t("notes.header", NOTES_HEADER)), 1, 0),
|
|
72
|
+
this.config.notesInput,
|
|
73
|
+
new Spacer(1),
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
// A saved note stays visible once its editor closes (#197): one clipped row, so a long
|
|
77
|
+
// or multi-line note cannot crowd the options — `n` reopens it in full. Mid rows are
|
|
78
|
+
// subtracted from the body allowance (`DialogView.rowsAroundBody`), so the row is
|
|
79
|
+
// height-safe.
|
|
80
|
+
const note = selectSavedNote(state.notesByTab, state.answers, state.currentTab);
|
|
81
|
+
if (note === undefined)
|
|
82
|
+
return [];
|
|
83
|
+
const [firstLine = "", ...rest] = note.split("\n");
|
|
84
|
+
const text = `${t("notes.saved_label", SAVED_NOTE_LABEL)} ${firstLine}${rest.length > 0 ? " …" : ""}`;
|
|
85
|
+
return [new OneLineClippedText(this.config.theme.fg("dim", text), 1)];
|
|
86
|
+
}
|
|
87
|
+
footerRows(state) {
|
|
88
|
+
const question = this.config.questions[state.currentTab];
|
|
89
|
+
// OneLineClippedText (not pi-tui `Text`) — `buildHintText` includes the collapse
|
|
90
|
+
// affordance, pushing the rendered string past 80 columns; `Text` would wrap and
|
|
91
|
+
// break the strategy's `footerRowCount = 2` invariant. Clipping on narrow terminals
|
|
92
|
+
// drops the trailing parts (collapse hint first, then cancel) with `…`.
|
|
93
|
+
return [
|
|
94
|
+
new Spacer(1),
|
|
95
|
+
new OneLineClippedText(this.config.theme.fg("dim", buildHintText(question, this.config.isMulti, state, this.config.collapseKey, this.config.notesKey)), 1),
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
focusedItemRowRange(width, state) {
|
|
99
|
+
const question = this.config.questions[state.currentTab];
|
|
100
|
+
const mso = this.config.tabsByIndex[state.currentTab]?.multiSelect;
|
|
101
|
+
if (question?.multiSelect === true && mso)
|
|
102
|
+
return mso.focusedItemRowRange(width);
|
|
103
|
+
return this.config.getPreviewPane().focusedItemRowRange(width);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export class SubmitTabStrategy {
|
|
107
|
+
/** Spacer(1) + Text(prompt, 1) + submitPicker(2) + OneLineClippedText(hint, 1) = 5 rendered rows. Fallback path lands at 5 via 2 Spacer(1)s in the picker slot. */
|
|
108
|
+
footerRowCount = 5;
|
|
109
|
+
config;
|
|
110
|
+
constructor(config) {
|
|
111
|
+
this.config = config;
|
|
112
|
+
}
|
|
113
|
+
headingRows(_state) {
|
|
114
|
+
return [
|
|
115
|
+
new Text(this.config.theme.bold(this.config.theme.fg("accent", t("review.heading", REVIEW_HEADING))), 1, 0),
|
|
116
|
+
new Spacer(1),
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
bodyComponent(state) {
|
|
120
|
+
const c = new Container();
|
|
121
|
+
for (let i = 0; i < this.config.questions.length; i++) {
|
|
122
|
+
const q = this.config.questions[i];
|
|
123
|
+
const a = state.answers.get(i);
|
|
124
|
+
if (!a)
|
|
125
|
+
continue;
|
|
126
|
+
const label = q.header && q.header.length > 0 ? q.header : `Q${i + 1}`;
|
|
127
|
+
const answerText = formatAnswerScalar(a, "summary");
|
|
128
|
+
c.addChild(new Text(this.config.theme.fg("muted", ` ● ${label}`), 1, 0));
|
|
129
|
+
c.addChild(new Text(` ${this.config.theme.fg("muted", "→")} ${this.config.theme.fg("text", answerText)}`, 1, 0));
|
|
130
|
+
if (a.notes && a.notes.length > 0) {
|
|
131
|
+
c.addChild(new Text(this.config.theme.fg("dim", ` ${t("notes.saved_label", SAVED_NOTE_LABEL)} ${a.notes}`), 1, 0));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Committed global note (#182) as a review entry — pressing `n` gets visible
|
|
135
|
+
// feedback and the note is reviewable before submit. Same presence predicate as
|
|
136
|
+
// the reducer's doneFor lift. Hidden while the editor is open: the midRows editor
|
|
137
|
+
// (seeded with this text) is the live surface then, and a stale copy above it
|
|
138
|
+
// would read as a second note.
|
|
139
|
+
const globalNote = state.notesByTab.get(this.config.questions.length);
|
|
140
|
+
if (!state.notesVisible && globalNote && globalNote.length > 0) {
|
|
141
|
+
c.addChild(new Text(this.config.theme.fg("muted", ` ● ${t("review.note_label", REVIEW_NOTE_LABEL)}`), 1, 0));
|
|
142
|
+
c.addChild(new Text(` ${this.config.theme.fg("muted", "→")} ${this.config.theme.fg("text", globalNote)}`, 1, 0));
|
|
143
|
+
}
|
|
144
|
+
return c;
|
|
145
|
+
}
|
|
146
|
+
bodyHeight(width, state) {
|
|
147
|
+
return this.bodyComponent(state).render(width).length;
|
|
148
|
+
}
|
|
149
|
+
midRows(state) {
|
|
150
|
+
// notesVisible-gated mirror of QuestionTabStrategy.midRows: while the global-note
|
|
151
|
+
// editor is open, the shared notesInput mounts below the answer summary under its
|
|
152
|
+
// own header. The pseudo-index draft (notesByTab[questions.length]) is reducer-owned
|
|
153
|
+
// state; the strategy only renders.
|
|
154
|
+
if (!state.notesVisible)
|
|
155
|
+
return [];
|
|
156
|
+
return [
|
|
157
|
+
new Text(this.config.theme.fg("muted", t("notes.global_header", GLOBAL_NOTES_HEADER)), 1, 0),
|
|
158
|
+
this.config.notesInput,
|
|
159
|
+
new Spacer(1),
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
footerRows(state) {
|
|
163
|
+
const missing = [];
|
|
164
|
+
for (let i = 0; i < this.config.questions.length; i++) {
|
|
165
|
+
const q = this.config.questions[i];
|
|
166
|
+
if (!state.answers.has(i)) {
|
|
167
|
+
missing.push(q.header && q.header.length > 0 ? q.header : `Q${i + 1}`);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const promptText = missing.length === 0
|
|
171
|
+
? this.config.theme.fg("muted", t("review.ready", READY_PROMPT))
|
|
172
|
+
: this.config.theme.fg("warning", `${t("review.incomplete", INCOMPLETE_WARNING_PREFIX)} ${missing.join(", ")}`);
|
|
173
|
+
// One row, never wrapped: `footerRowCount` counts it as one, and a wrapped prompt
|
|
174
|
+
// (long list of unanswered headers) would desync the chrome's row math (#261).
|
|
175
|
+
const out = [new Spacer(1), new OneLineClippedText(promptText, 1)];
|
|
176
|
+
if (this.config.submitPicker) {
|
|
177
|
+
out.push(this.config.submitPicker);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
// Padding when the picker isn't wired — keeps rendered row count at footerRowCount=5.
|
|
181
|
+
out.push(new Spacer(1));
|
|
182
|
+
out.push(new Spacer(1));
|
|
183
|
+
}
|
|
184
|
+
// Bottom key-hint row, mirroring QuestionTabStrategy's footer idiom (one dim
|
|
185
|
+
// `·`-joined line below everything) — the prompt reads straight into its picker
|
|
186
|
+
// with no hint wedged between them. Always present so footerRowCount stays
|
|
187
|
+
// exactly 5. OneLineClippedText (not pi-tui Text) — a wrapped hint would inflate
|
|
188
|
+
// the footer past footerRowCount and desync the chrome's cross-tab height math.
|
|
189
|
+
out.push(new OneLineClippedText(this.config.theme.fg("dim", buildSubmitHintText(state, this.config.notesKey)), 1));
|
|
190
|
+
return out;
|
|
191
|
+
}
|
|
192
|
+
focusedItemRowRange(_width, _state) {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Build the controls hint line. Order:
|
|
198
|
+
* Enter · ↑/↓ [· Space toggle] [· n notes] [· Tab switch] · Esc [· <key> collapse]
|
|
199
|
+
* [· Shift+Enter newline] [· Ctrl+U clear]
|
|
200
|
+
*
|
|
201
|
+
* `NOTES` is part of the resting (notes-closed) core — it drops while the notes
|
|
202
|
+
* editor or custom-answer input has the keyboard. Ctrl+G is Pi's global external-
|
|
203
|
+
* editor shortcut and needs no local hint; the context-specific clear shortcut is
|
|
204
|
+
* appended at the far right while input mode is active.
|
|
205
|
+
*
|
|
206
|
+
* The collapse part interpolates the configured `collapseKey` (display-cased)
|
|
207
|
+
* and is omitted entirely when the shortcut is `"off"` — `routeKey` and the raw
|
|
208
|
+
* terminal listener both refuse to collapse in that case, so advertising a key
|
|
209
|
+
* would be a lie.
|
|
210
|
+
*/
|
|
211
|
+
export function buildHintText(question, isMulti, state, collapseKey, notesKey) {
|
|
212
|
+
const parts = [t("hint.enter", HINT_PART_ENTER), t("hint.navigate", HINT_PART_NAV)];
|
|
213
|
+
if (question?.multiSelect === true)
|
|
214
|
+
parts.push(t("hint.toggle", HINT_PART_TOGGLE));
|
|
215
|
+
if (question && !state.notesVisible && !state.inputMode)
|
|
216
|
+
parts.push(notesHint("hint.notes", HINT_PART_NOTES_TEMPLATE, notesKey));
|
|
217
|
+
if (isMulti)
|
|
218
|
+
parts.push(t("hint.tab", HINT_PART_TAB));
|
|
219
|
+
parts.push(t("hint.cancel", HINT_PART_CANCEL));
|
|
220
|
+
if (collapseKey !== COLLAPSE_KEY_OFF) {
|
|
221
|
+
parts.push(t("hint.collapse", HINT_PART_COLLAPSE_TEMPLATE).replace(KEY_PLACEHOLDER, formatKeySpecForDisplay(collapseKey)));
|
|
222
|
+
}
|
|
223
|
+
if (state.notesVisible || state.inputMode)
|
|
224
|
+
parts.push(t("hint.newline", HINT_PART_NEW_LINE));
|
|
225
|
+
if (state.inputMode)
|
|
226
|
+
parts.push(t("hint.clear", HINT_PART_CLEAR));
|
|
227
|
+
return parts.join(" · ");
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Submit-tab counterpart of `buildHintText` — the same `·`-joined bottom-row idiom.
|
|
231
|
+
* Resting: Enter · ↑/↓ · `n to add a note` · Esc. While the global-note editor is
|
|
232
|
+
* open the note part drops (the editor is the affordance then) and the Shift+Enter
|
|
233
|
+
* newline hint is appended after cancel, mirroring the question tabs' notes-open shape.
|
|
234
|
+
*/
|
|
235
|
+
export function buildSubmitHintText(state, notesKey) {
|
|
236
|
+
const parts = [t("hint.enter", HINT_PART_ENTER), t("hint.navigate", HINT_PART_NAV)];
|
|
237
|
+
if (!state.notesVisible)
|
|
238
|
+
parts.push(notesHint("review.global_hint", REVIEW_GLOBAL_HINT_TEMPLATE, notesKey));
|
|
239
|
+
parts.push(t("hint.cancel", HINT_PART_CANCEL));
|
|
240
|
+
if (state.notesVisible)
|
|
241
|
+
parts.push(t("hint.newline", HINT_PART_NEW_LINE));
|
|
242
|
+
return parts.join(" · ");
|
|
243
|
+
}
|
|
244
|
+
/** A notes hint with the configured key in place of `{key}`. */
|
|
245
|
+
function notesHint(key, template, notesKey) {
|
|
246
|
+
return t(key, template).replace(KEY_PLACEHOLDER, formatNotesKeyForDisplay(notesKey));
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=tab-content-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-content-strategy.js","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/tab-content-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAe,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE/G,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,CAAC,EAAE,MAAM,yBAAyB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,YAAY,EACZ,cAAc,GACd,MAAM,kBAAkB,CAAC;AAI1B,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC3C,MAAM,2BAA2B,GAAG,GAAG,eAAe,gBAAgB,CAAC;AACvE,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,sGAAsG;AACtG,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,kBAAkB;IACN,IAAI,CAAS;IACb,WAAW,CAAS;IAErC,YAAY,IAAY,EAAE,WAAW,GAAW,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED,MAAM,CAAC,KAAa;QACnB,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzC,MA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,IAAI,KAAK,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;IAClE,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAkB,EAAE,QAAgB;IACvE,MAAM,KAAK,GAAa,CAAC,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC;IAC9F,IAAI,CAAC,KAAK,CAAC,YAAY;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5G,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC/C,IAAI,KAAK,CAAC,YAAY;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,gEAAgE;AAChE,SAAS,SAAS,CAAC,GAAW,EAAE,QAAgB,EAAE,QAAgB;IACjE,OAAO,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtF,CAAC","sourcesContent":["import { type Component, Container, type Editor, Spacer, Text, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport type { Theme } from \"../../../../../modes/interactive/theme/theme.ts\";\nimport { COLLAPSE_KEY_OFF, formatKeySpecForDisplay, formatNotesKeyForDisplay } from \"../config.ts\";\nimport { t } from \"../state/i18n-bridge.ts\";\nimport { selectSavedNote } from \"../state/selectors/derivations.ts\";\nimport { formatAnswerScalar } from \"../tool/format-answer.ts\";\nimport type { QuestionData } from \"../tool/types.ts\";\nimport type { PreviewPane, PreviewPaneProps } from \"./components/preview/preview-pane.ts\";\nimport type { DialogState } from \"./dialog-builder.ts\";\nimport {\n\tHINT_PART_CANCEL,\n\tHINT_PART_CLEAR,\n\tHINT_PART_COLLAPSE_TEMPLATE,\n\tHINT_PART_ENTER,\n\tHINT_PART_NAV,\n\tHINT_PART_NEW_LINE,\n\tHINT_PART_NOTES_TEMPLATE,\n\tHINT_PART_TAB,\n\tHINT_PART_TOGGLE,\n\tINCOMPLETE_WARNING_PREFIX,\n\tKEY_PLACEHOLDER,\n\tREADY_PROMPT,\n\tREVIEW_HEADING,\n} from \"./dialog-copy.ts\";\nimport type { StatefulView } from \"./stateful-view.ts\";\nimport type { TabComponents } from \"./tab-components.ts\";\n\nconst NOTES_HEADER = \"Notes:\";\nconst GLOBAL_NOTES_HEADER = \"Global note:\";\nconst REVIEW_GLOBAL_HINT_TEMPLATE = `${KEY_PLACEHOLDER} to add a note`;\nconst REVIEW_NOTE_LABEL = \"Note\";\n/** Label for a question's saved note — the question tab's resting row and the review entry (#197). */\nconst SAVED_NOTE_LABEL = \"Note for this answer:\";\n\n/**\n * Single-row, width-clipped chrome cell. The footer row count is invariant\n * (`QuestionTabStrategy.footerRowCount = 2`) — pi-tui's `Text` word-wraps when\n * the styled hint exceeds `width`, inflating that row count and desyncing the\n * `bodyHeight + footerRowCount` math in `DialogView.render`. Clipping with\n * `truncateToWidth` (ANSI-aware, matches `multi-select-view.ts` usage) keeps\n * the hint on one line; the collapse affordance falls off the right edge with\n * `…` on terminals too narrow to advertise it.\n */\nclass OneLineClippedText implements Component {\n\tprivate readonly text: string;\n\tprivate readonly paddingLeft: number;\n\n\tconstructor(text: string, paddingLeft: number = 0) {\n\t\tthis.text = text;\n\t\tthis.paddingLeft = paddingLeft;\n\t}\n\n\trender(width: number): string[] {\n\t\tconst pad = \" \".repeat(this.paddingLeft);\n\t\tconst avail = Math.max(0, width - this.paddingLeft);\n\t\treturn [pad + truncateToWidth(this.text, avail, \"…\", false)];\n\t}\n\n\tinvalidate(): void {}\n\n\thandleInput(_data: string): void {}\n}\n\n/**\n * Per-tab content provider. Pure functional — closes over construction-time\n * config; per-tick state threads through method args. The chrome wrapper\n * enforces height equality across tabs via `bodyHeight + footerRowCount`.\n */\nexport interface TabContentStrategy {\n\t/** Total RENDERED footer rows — MUST equal what `footerRows()` actually emits. Drives residual math. */\n\treadonly footerRowCount: number;\n\n\t/** Variable rows above the body, after top chrome (border + tabBar + Spacer). */\n\theadingRows(state: DialogState): Component[];\n\n\t/** Body Component placed at the body slot. */\n\tbodyComponent(state: DialogState): Component;\n\n\t/** Natural rendered height of `bodyComponent(state)` at given width. */\n\tbodyHeight(width: number, state: DialogState): number;\n\n\t/** Optional rows between body's trailing Spacer and the bottom border. */\n\tmidRows(state: DialogState): Component[];\n\n\t/** Footer rows below the bottom border. Rendered row count MUST equal `footerRowCount`. */\n\tfooterRows(state: DialogState): Component[];\n\n\t/** Row range of the focused item within the body's rendered output, or undefined if no interactive focus. */\n\tfocusedItemRowRange(width: number, state: DialogState): [number, number] | undefined;\n}\n\nexport interface QuestionTabStrategyConfig {\n\ttheme: Theme;\n\tquestions: readonly QuestionData[];\n\tgetPreviewPane: () => StatefulView<PreviewPaneProps>;\n\ttabsByIndex: ReadonlyArray<TabComponents>;\n\tnotesInput: Editor;\n\tisMulti: boolean;\n\tgetCurrentBodyHeight: (width: number) => number;\n\t/** Resolved collapse key spec (`\"ctrl+]\"`, `\"alt+o\"`, or `\"off\"`). Drives the footer's collapse hint. */\n\tcollapseKey: string;\n\t/** Resolved notes key (`resolveNotesKey` output). Named by the footer's notes hint. */\n\tnotesKey: string;\n}\n\nexport class QuestionTabStrategy implements TabContentStrategy {\n\t/** Spacer(1) + OneLineClippedText(hint, 1) = 2 rendered rows. */\n\treadonly footerRowCount = 2;\n\n\tprivate readonly config: QuestionTabStrategyConfig;\n\n\tconstructor(config: QuestionTabStrategyConfig) {\n\t\tthis.config = config;\n\t}\n\n\theadingRows(state: DialogState): Component[] {\n\t\tconst out: Component[] = [];\n\t\tconst question = this.config.questions[state.currentTab];\n\t\t// In multi-question mode the tab bar already shows the header; suppress the inline badge.\n\t\tif (!this.config.isMulti && question?.header && question.header.length > 0) {\n\t\t\tout.push(new Text(this.config.theme.bg(\"selectedBg\", ` ${question.header} `), 1, 0));\n\t\t\tout.push(new Spacer(1));\n\t\t}\n\t\tif (question) {\n\t\t\tout.push(new Text(this.config.theme.bold(question.question), 1, 0));\n\t\t\tout.push(new Spacer(1));\n\t\t}\n\t\treturn out;\n\t}\n\n\tbodyComponent(state: DialogState): Component {\n\t\tconst question = this.config.questions[state.currentTab];\n\t\tconst mso = this.config.tabsByIndex[state.currentTab]?.multiSelect;\n\t\tif (question?.multiSelect === true && mso) return mso;\n\t\treturn this.config.getPreviewPane();\n\t}\n\n\tbodyHeight(width: number, _state: DialogState): number {\n\t\treturn this.config.getCurrentBodyHeight(width);\n\t}\n\n\tmidRows(state: DialogState): Component[] {\n\t\tif (state.notesVisible) {\n\t\t\treturn [\n\t\t\t\tnew Text(this.config.theme.fg(\"muted\", t(\"notes.header\", NOTES_HEADER)), 1, 0),\n\t\t\t\tthis.config.notesInput,\n\t\t\t\tnew Spacer(1),\n\t\t\t];\n\t\t}\n\t\t// A saved note stays visible once its editor closes (#197): one clipped row, so a long\n\t\t// or multi-line note cannot crowd the options — `n` reopens it in full. Mid rows are\n\t\t// subtracted from the body allowance (`DialogView.rowsAroundBody`), so the row is\n\t\t// height-safe.\n\t\tconst note = selectSavedNote(state.notesByTab, state.answers, state.currentTab);\n\t\tif (note === undefined) return [];\n\t\tconst [firstLine = \"\", ...rest] = note.split(\"\\n\");\n\t\tconst text = `${t(\"notes.saved_label\", SAVED_NOTE_LABEL)} ${firstLine}${rest.length > 0 ? \" …\" : \"\"}`;\n\t\treturn [new OneLineClippedText(this.config.theme.fg(\"dim\", text), 1)];\n\t}\n\n\tfooterRows(state: DialogState): Component[] {\n\t\tconst question = this.config.questions[state.currentTab];\n\t\t// OneLineClippedText (not pi-tui `Text`) — `buildHintText` includes the collapse\n\t\t// affordance, pushing the rendered string past 80 columns; `Text` would wrap and\n\t\t// break the strategy's `footerRowCount = 2` invariant. Clipping on narrow terminals\n\t\t// drops the trailing parts (collapse hint first, then cancel) with `…`.\n\t\treturn [\n\t\t\tnew Spacer(1),\n\t\t\tnew OneLineClippedText(\n\t\t\t\tthis.config.theme.fg(\n\t\t\t\t\t\"dim\",\n\t\t\t\t\tbuildHintText(question, this.config.isMulti, state, this.config.collapseKey, this.config.notesKey),\n\t\t\t\t),\n\t\t\t\t1,\n\t\t\t),\n\t\t];\n\t}\n\n\tfocusedItemRowRange(width: number, state: DialogState): [number, number] | undefined {\n\t\tconst question = this.config.questions[state.currentTab];\n\t\tconst mso = this.config.tabsByIndex[state.currentTab]?.multiSelect;\n\t\tif (question?.multiSelect === true && mso) return mso.focusedItemRowRange(width);\n\t\treturn (this.config.getPreviewPane() as unknown as PreviewPane).focusedItemRowRange(width);\n\t}\n}\n\nexport interface SubmitTabStrategyConfig {\n\ttheme: Theme;\n\tquestions: readonly QuestionData[];\n\tsubmitPicker: Component | undefined;\n\t/** Shared notes Editor — mounted into midRows while the global-note editor is open on this tab. */\n\tnotesInput: Editor;\n\t/** Resolved notes key (`resolveNotesKey` output). Named by the global-note hint. */\n\tnotesKey: string;\n}\n\nexport class SubmitTabStrategy implements TabContentStrategy {\n\t/** Spacer(1) + Text(prompt, 1) + submitPicker(2) + OneLineClippedText(hint, 1) = 5 rendered rows. Fallback path lands at 5 via 2 Spacer(1)s in the picker slot. */\n\treadonly footerRowCount = 5;\n\n\tprivate readonly config: SubmitTabStrategyConfig;\n\n\tconstructor(config: SubmitTabStrategyConfig) {\n\t\tthis.config = config;\n\t}\n\n\theadingRows(_state: DialogState): Component[] {\n\t\treturn [\n\t\t\tnew Text(this.config.theme.bold(this.config.theme.fg(\"accent\", t(\"review.heading\", REVIEW_HEADING))), 1, 0),\n\t\t\tnew Spacer(1),\n\t\t];\n\t}\n\n\tbodyComponent(state: DialogState): Component {\n\t\tconst c = new Container();\n\t\tfor (let i = 0; i < this.config.questions.length; i++) {\n\t\t\tconst q = this.config.questions[i];\n\t\t\tconst a = state.answers.get(i);\n\t\t\tif (!a) continue;\n\t\t\tconst label = q.header && q.header.length > 0 ? q.header : `Q${i + 1}`;\n\t\t\tconst answerText = formatAnswerScalar(a, \"summary\");\n\t\t\tc.addChild(new Text(this.config.theme.fg(\"muted\", ` ● ${label}`), 1, 0));\n\t\t\tc.addChild(\n\t\t\t\tnew Text(` ${this.config.theme.fg(\"muted\", \"→\")} ${this.config.theme.fg(\"text\", answerText)}`, 1, 0),\n\t\t\t);\n\t\t\tif (a.notes && a.notes.length > 0) {\n\t\t\t\tc.addChild(\n\t\t\t\t\tnew Text(\n\t\t\t\t\t\tthis.config.theme.fg(\"dim\", ` ${t(\"notes.saved_label\", SAVED_NOTE_LABEL)} ${a.notes}`),\n\t\t\t\t\t\t1,\n\t\t\t\t\t\t0,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// Committed global note (#182) as a review entry — pressing `n` gets visible\n\t\t// feedback and the note is reviewable before submit. Same presence predicate as\n\t\t// the reducer's doneFor lift. Hidden while the editor is open: the midRows editor\n\t\t// (seeded with this text) is the live surface then, and a stale copy above it\n\t\t// would read as a second note.\n\t\tconst globalNote = state.notesByTab.get(this.config.questions.length);\n\t\tif (!state.notesVisible && globalNote && globalNote.length > 0) {\n\t\t\tc.addChild(new Text(this.config.theme.fg(\"muted\", ` ● ${t(\"review.note_label\", REVIEW_NOTE_LABEL)}`), 1, 0));\n\t\t\tc.addChild(\n\t\t\t\tnew Text(` ${this.config.theme.fg(\"muted\", \"→\")} ${this.config.theme.fg(\"text\", globalNote)}`, 1, 0),\n\t\t\t);\n\t\t}\n\t\treturn c;\n\t}\n\n\tbodyHeight(width: number, state: DialogState): number {\n\t\treturn this.bodyComponent(state).render(width).length;\n\t}\n\n\tmidRows(state: DialogState): Component[] {\n\t\t// notesVisible-gated mirror of QuestionTabStrategy.midRows: while the global-note\n\t\t// editor is open, the shared notesInput mounts below the answer summary under its\n\t\t// own header. The pseudo-index draft (notesByTab[questions.length]) is reducer-owned\n\t\t// state; the strategy only renders.\n\t\tif (!state.notesVisible) return [];\n\t\treturn [\n\t\t\tnew Text(this.config.theme.fg(\"muted\", t(\"notes.global_header\", GLOBAL_NOTES_HEADER)), 1, 0),\n\t\t\tthis.config.notesInput,\n\t\t\tnew Spacer(1),\n\t\t];\n\t}\n\n\tfooterRows(state: DialogState): Component[] {\n\t\tconst missing: string[] = [];\n\t\tfor (let i = 0; i < this.config.questions.length; i++) {\n\t\t\tconst q = this.config.questions[i];\n\t\t\tif (!state.answers.has(i)) {\n\t\t\t\tmissing.push(q.header && q.header.length > 0 ? q.header : `Q${i + 1}`);\n\t\t\t}\n\t\t}\n\t\tconst promptText =\n\t\t\tmissing.length === 0\n\t\t\t\t? this.config.theme.fg(\"muted\", t(\"review.ready\", READY_PROMPT))\n\t\t\t\t: this.config.theme.fg(\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\t`${t(\"review.incomplete\", INCOMPLETE_WARNING_PREFIX)} ${missing.join(\", \")}`,\n\t\t\t\t\t);\n\t\t// One row, never wrapped: `footerRowCount` counts it as one, and a wrapped prompt\n\t\t// (long list of unanswered headers) would desync the chrome's row math (#261).\n\t\tconst out: Component[] = [new Spacer(1), new OneLineClippedText(promptText, 1)];\n\t\tif (this.config.submitPicker) {\n\t\t\tout.push(this.config.submitPicker);\n\t\t} else {\n\t\t\t// Padding when the picker isn't wired — keeps rendered row count at footerRowCount=5.\n\t\t\tout.push(new Spacer(1));\n\t\t\tout.push(new Spacer(1));\n\t\t}\n\t\t// Bottom key-hint row, mirroring QuestionTabStrategy's footer idiom (one dim\n\t\t// `·`-joined line below everything) — the prompt reads straight into its picker\n\t\t// with no hint wedged between them. Always present so footerRowCount stays\n\t\t// exactly 5. OneLineClippedText (not pi-tui Text) — a wrapped hint would inflate\n\t\t// the footer past footerRowCount and desync the chrome's cross-tab height math.\n\t\tout.push(\n\t\t\tnew OneLineClippedText(this.config.theme.fg(\"dim\", buildSubmitHintText(state, this.config.notesKey)), 1),\n\t\t);\n\t\treturn out;\n\t}\n\n\tfocusedItemRowRange(_width: number, _state: DialogState): [number, number] | undefined {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Build the controls hint line. Order:\n * Enter · ↑/↓ [· Space toggle] [· n notes] [· Tab switch] · Esc [· <key> collapse]\n * [· Shift+Enter newline] [· Ctrl+U clear]\n *\n * `NOTES` is part of the resting (notes-closed) core — it drops while the notes\n * editor or custom-answer input has the keyboard. Ctrl+G is Pi's global external-\n * editor shortcut and needs no local hint; the context-specific clear shortcut is\n * appended at the far right while input mode is active.\n *\n * The collapse part interpolates the configured `collapseKey` (display-cased)\n * and is omitted entirely when the shortcut is `\"off\"` — `routeKey` and the raw\n * terminal listener both refuse to collapse in that case, so advertising a key\n * would be a lie.\n */\nexport function buildHintText(\n\tquestion: QuestionData | undefined,\n\tisMulti: boolean,\n\tstate: DialogState,\n\tcollapseKey: string,\n\tnotesKey: string,\n): string {\n\tconst parts: string[] = [t(\"hint.enter\", HINT_PART_ENTER), t(\"hint.navigate\", HINT_PART_NAV)];\n\tif (question?.multiSelect === true) parts.push(t(\"hint.toggle\", HINT_PART_TOGGLE));\n\tif (question && !state.notesVisible && !state.inputMode)\n\t\tparts.push(notesHint(\"hint.notes\", HINT_PART_NOTES_TEMPLATE, notesKey));\n\tif (isMulti) parts.push(t(\"hint.tab\", HINT_PART_TAB));\n\tparts.push(t(\"hint.cancel\", HINT_PART_CANCEL));\n\tif (collapseKey !== COLLAPSE_KEY_OFF) {\n\t\tparts.push(\n\t\t\tt(\"hint.collapse\", HINT_PART_COLLAPSE_TEMPLATE).replace(KEY_PLACEHOLDER, formatKeySpecForDisplay(collapseKey)),\n\t\t);\n\t}\n\tif (state.notesVisible || state.inputMode) parts.push(t(\"hint.newline\", HINT_PART_NEW_LINE));\n\tif (state.inputMode) parts.push(t(\"hint.clear\", HINT_PART_CLEAR));\n\treturn parts.join(\" · \");\n}\n\n/**\n * Submit-tab counterpart of `buildHintText` — the same `·`-joined bottom-row idiom.\n * Resting: Enter · ↑/↓ · `n to add a note` · Esc. While the global-note editor is\n * open the note part drops (the editor is the affordance then) and the Shift+Enter\n * newline hint is appended after cancel, mirroring the question tabs' notes-open shape.\n */\nexport function buildSubmitHintText(state: DialogState, notesKey: string): string {\n\tconst parts: string[] = [t(\"hint.enter\", HINT_PART_ENTER), t(\"hint.navigate\", HINT_PART_NAV)];\n\tif (!state.notesVisible) parts.push(notesHint(\"review.global_hint\", REVIEW_GLOBAL_HINT_TEMPLATE, notesKey));\n\tparts.push(t(\"hint.cancel\", HINT_PART_CANCEL));\n\tif (state.notesVisible) parts.push(t(\"hint.newline\", HINT_PART_NEW_LINE));\n\treturn parts.join(\" · \");\n}\n\n/** A notes hint with the configured key in place of `{key}`. */\nfunction notesHint(key: string, template: string, notesKey: string): string {\n\treturn t(key, template).replace(KEY_PLACEHOLDER, formatNotesKeyForDisplay(notesKey));\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Component } from "@earendil-works/pi-tui";
|
|
2
|
+
import type { Theme } from "../../../../../modes/interactive/theme/theme.ts";
|
|
3
|
+
import { type QuestionParams } from "../tool/types.ts";
|
|
4
|
+
type ToolResultView = {
|
|
5
|
+
content: ReadonlyArray<{
|
|
6
|
+
type: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
}>;
|
|
9
|
+
details?: unknown;
|
|
10
|
+
};
|
|
11
|
+
/** `Ask Format · Migration`: the headers name the questions. */
|
|
12
|
+
export declare function renderAskCall(args: QuestionParams | undefined, theme: Theme): Component;
|
|
13
|
+
/**
|
|
14
|
+
* The transcript receipt: one `✓ answer` line for a single question, an aligned
|
|
15
|
+
* header/answer table for several. A failure shows `✗` with the first line of the
|
|
16
|
+
* model-facing message; a declined questionnaire shows a dimmed `✗ no answer`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderAskResult(result: ToolResultView, args: QuestionParams | undefined, theme: Theme, options: {
|
|
19
|
+
expanded: boolean;
|
|
20
|
+
isError: boolean;
|
|
21
|
+
}): Component;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=transcript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../../../../src/humain/ask-user-question/vendor/ask/view/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAmD,MAAM,wBAAwB,CAAC;AACzG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAI7E,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,kBAAkB,CAAC;AAO1B,KAAK,cAAc,GAAG;IAAE,OAAO,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA0CrG,gEAAgE;AAChE,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,SAAS,CAOvF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GAAG,SAAS,EAChC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAC9C,SAAS,CAeX"}
|