@qitqode/qitqode-android-arm64 0.1.36 → 0.2.0
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/bundle/{chunk-ja18tvc7.js → chunk-0ne5m1n3.js} +1 -1
- package/bundle/{chunk-bjcb9kt0.js → chunk-0z33en1a.js} +1 -1
- package/bundle/{chunk-g5prcvq2.js → chunk-17pxm5d3.js} +1 -1
- package/bundle/{chunk-xyjehgzm.js → chunk-2pzvcpv4.js} +1 -1
- package/bundle/{chunk-983rqajz.js → chunk-46ztrjw0.js} +2 -2
- package/bundle/chunk-4dtkj9zg.js +2 -0
- package/bundle/chunk-4e9p3e0a.js +2 -0
- package/bundle/{chunk-nr4q9fv7.js → chunk-55wxgsga.js} +1 -1
- package/bundle/{chunk-t8rke5fr.js → chunk-5ke0yqqz.js} +4 -4
- package/bundle/{chunk-364ccew0.js → chunk-5myxjxae.js} +1 -1
- package/bundle/{chunk-vg41rtdy.js → chunk-5q1fz2az.js} +1 -1
- package/bundle/{chunk-q7rt76qw.js → chunk-5sgpjgss.js} +1 -1
- package/bundle/{chunk-pmv8yr8c.js → chunk-6r8pg6ma.js} +1 -1
- package/bundle/{chunk-tabcpx7t.js → chunk-871f8x99.js} +1 -1
- package/bundle/chunk-88emsbaz.js +2 -0
- package/bundle/{chunk-fmxm4kaj.js → chunk-909fp6pm.js} +1 -1
- package/bundle/{chunk-e07dbha4.js → chunk-98effz12.js} +1 -1
- package/bundle/{chunk-eywryd3k.js → chunk-a6z0fhta.js} +1 -1
- package/bundle/{chunk-w1ypf53m.js → chunk-aj3y2e86.js} +1 -1
- package/bundle/{chunk-rph5xswc.js → chunk-akpssv2d.js} +1 -1
- package/bundle/{chunk-1yv5h8k4.js → chunk-aw8af3ky.js} +1 -1
- package/bundle/{chunk-dx7h5r8j.js → chunk-bha3sbsj.js} +1 -1
- package/bundle/chunk-bs61sezq.js +2 -0
- package/bundle/{chunk-rd4x4tsv.js → chunk-ceefd2nj.js} +1 -1
- package/bundle/{chunk-v8ksjgc3.js → chunk-cmdjkx32.js} +1 -1
- package/bundle/{chunk-7dep7g7c.js → chunk-cxtxvt43.js} +1 -1
- package/bundle/{chunk-cx0j6mpq.js → chunk-d9x9kqvy.js} +1 -1
- package/bundle/chunk-de2rfsaf.js +2 -0
- package/bundle/{chunk-8zmreqxx.js → chunk-dncnyzaa.js} +1 -1
- package/bundle/{chunk-3gw6r3hf.js → chunk-dz3s882k.js} +215 -215
- package/bundle/{chunk-n7xgfm5x.js → chunk-eb8nsk7e.js} +1 -1
- package/bundle/{chunk-6sfhbckv.js → chunk-fn8191ps.js} +1 -1
- package/bundle/chunk-fyz7fngd.js +2 -0
- package/bundle/{chunk-d0xs3j5h.js → chunk-g8cfzzrs.js} +1 -1
- package/bundle/{chunk-yjp0btmq.js → chunk-gnt982jr.js} +2 -2
- package/bundle/{chunk-r0ewmh6f.js → chunk-grdfpd57.js} +1 -1
- package/bundle/{chunk-fjm9kstr.js → chunk-gt6tgm42.js} +1 -1
- package/bundle/chunk-hd8q4msp.js +2 -0
- package/bundle/{chunk-p8k48st6.js → chunk-j5kyf7vt.js} +1 -1
- package/bundle/{chunk-e88wd9ex.js → chunk-jfz8wwk9.js} +1 -1
- package/bundle/chunk-js6hqmq7.js +2 -0
- package/bundle/{chunk-rebsz3bj.js → chunk-k70x182t.js} +1 -1
- package/bundle/chunk-k7n1csxv.js +3 -0
- package/bundle/{chunk-brh35yt5.js → chunk-kb6v5hhm.js} +1 -1
- package/bundle/chunk-kmtfdky8.js +4 -0
- package/bundle/{chunk-qpd0gab8.js → chunk-kp8nkm3m.js} +1 -1
- package/bundle/{chunk-htkwc2se.js → chunk-m0xsvzyd.js} +1 -1
- package/bundle/{chunk-f77nxt23.js → chunk-m6zxr0j8.js} +1 -1
- package/bundle/{chunk-t5tfppwv.js → chunk-n38h109k.js} +1 -1
- package/bundle/{chunk-ebkztnpf.js → chunk-n7d9eemn.js} +49 -49
- package/bundle/{chunk-jw16f6t0.js → chunk-nhwhkx62.js} +1 -1
- package/bundle/{chunk-41x11r2s.js → chunk-pnpre7ys.js} +1 -1
- package/bundle/{chunk-5yfzzmv0.js → chunk-pr1ysgr3.js} +1 -1
- package/bundle/{chunk-3bnqw3xp.js → chunk-px8vtbmr.js} +1 -1
- package/bundle/{chunk-132tcp2j.js → chunk-qpzspr9z.js} +1 -1
- package/bundle/{chunk-b4ysd5b4.js → chunk-qq2rcxv2.js} +1 -1
- package/bundle/{chunk-shwjjrj8.js → chunk-qy1a2tpc.js} +1 -1
- package/bundle/{chunk-vcrakhgy.js → chunk-qyjt0qnq.js} +1 -1
- package/bundle/{chunk-mvsrzvc4.js → chunk-r0g5yyhf.js} +1 -1
- package/bundle/{chunk-tqazneg6.js → chunk-rnd5mnsm.js} +1 -1
- package/bundle/{chunk-sy3n0qhc.js → chunk-rtdym35y.js} +5 -5
- package/bundle/{chunk-cjxcnhmq.js → chunk-s2xdf6qh.js} +1 -1
- package/bundle/{chunk-vdpd4akk.js → chunk-sp8ek94w.js} +1 -1
- package/bundle/chunk-sv1s1qxd.js +619 -0
- package/bundle/chunk-sxwqrvmy.js +28 -0
- package/bundle/{chunk-v8dd6tyn.js → chunk-sxy4hyyy.js} +1 -1
- package/bundle/{chunk-bcs2gvmp.js → chunk-syc4b8rt.js} +1 -1
- package/bundle/{chunk-jr2q5295.js → chunk-tcs6wgna.js} +1 -1
- package/bundle/{chunk-xqwvx3qq.js → chunk-twhavv1m.js} +1 -1
- package/bundle/{chunk-w24660y4.js → chunk-tzrbb0e8.js} +1 -1
- package/bundle/chunk-v0yxkq99.js +3 -0
- package/bundle/{chunk-f36ctnbp.js → chunk-v7q3d3n6.js} +1 -1
- package/bundle/{chunk-hbh2034m.js → chunk-vvzbfv2f.js} +1 -1
- package/bundle/{chunk-37dvnent.js → chunk-w8d9srv7.js} +1 -1
- package/bundle/{chunk-mqtqcc10.js → chunk-ws3p9cya.js} +1 -1
- package/bundle/{chunk-jxg15t11.js → chunk-x42w8ewc.js} +1 -1
- package/bundle/chunk-xc9se3c8.js +2 -0
- package/bundle/{chunk-e03tgfpb.js → chunk-xjhezxft.js} +6 -6
- package/bundle/{chunk-pq3qwxa8.js → chunk-xxvqq7kc.js} +1 -1
- package/bundle/{chunk-b0x888w9.js → chunk-ye0mkqb4.js} +1 -1
- package/bundle/{chunk-a42q5mx4.js → chunk-ypk3t1eh.js} +1 -1
- package/bundle/{chunk-et7kz7kx.js → chunk-yzn08nx1.js} +1 -1
- package/bundle/{chunk-rqmvj7f4.js → chunk-z0tfsdb9.js} +1 -1
- package/bundle/{chunk-p8czsxp0.js → chunk-z210dtw1.js} +1 -1
- package/bundle/{chunk-5pkg052s.js → chunk-z7vv0ngm.js} +1 -1
- package/bundle/{chunk-24rw1br0.js → chunk-ztnepaqc.js} +1 -1
- package/bundle/{chunk-r3df289z.js → chunk-zwvwbrsc.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0j6dhrew.js +0 -2
- package/bundle/chunk-4kqdzdv5.js +0 -3
- package/bundle/chunk-7cbj28fp.js +0 -2
- package/bundle/chunk-9yakc5yv.js +0 -28
- package/bundle/chunk-b1qhpxee.js +0 -2
- package/bundle/chunk-d72rty3t.js +0 -2
- package/bundle/chunk-dj951pms.js +0 -2
- package/bundle/chunk-ec7pznsp.js +0 -2
- package/bundle/chunk-gvtjxg0d.js +0 -2
- package/bundle/chunk-j21dnncc.js +0 -4
- package/bundle/chunk-qp9y0g73.js +0 -3
- package/bundle/chunk-t0jjes17.js +0 -2
- package/bundle/chunk-w57j3pgz.js +0 -616
- package/bundle/chunk-yg9c1v8v.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Nf as r}from"./chunk-
|
|
2
|
+
import{Nf as r}from"./chunk-z7vv0ngm.js";import{Xg as n}from"./chunk-sv1s1qxd.js";import{sl as e}from"./chunk-rtdym35y.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
|
|
3
3
|
export{a as Ad,c as Bd};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"Type your message... (type / for commands)","tui.prompt.placeholder.shell":'Run a command... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab to accept)","tui.home.placeholder.example.todo":"Fix a TODO in the codebase","tui.home.placeholder.example.stack":"What is the tech stack of this project?","tui.home.placeholder.example.tests":"Fix broken tests","tui.home.agreement.prefix":"By using QitQode, you agree to our ","tui.home.agreement.terms":"Terms of Service","tui.home.agreement.separator":" and ","tui.home.agreement.privacy":"Privacy Policy","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"attach file","tui.prompt.hint.subagent":"subagent","tui.prompt.hint.commands":"commands","tui.prompt.hint.switch_mode":"mode","tui.prompt.hint.settings":"settings","tui.tips.label":"Tip","tui.tips.plain_terminal":"QitQode looks best in iTerm2 or VS Code's integrated terminal","tui.tips.attach_file":"Hit {highlight}@{/highlight} and start typing to fuzzy-find and attach a file to your prompt","tui.tips.shell_prefix":"Prefix any message with {highlight}!{/highlight} to run it as a shell command \u2014 try {highlight}!git log{/highlight}","tui.tips.tab_agent":"{highlight}Tab{/highlight} and {highlight}Shift+Tab{/highlight} step through your Build, Plan, and Compose agents","tui.tips.theme_mode":"Switch between dark and light themes with {highlight}/dark{/highlight} or {highlight}/light{/highlight}","tui.tips.doc":"Pull up the full documentation anytime with {highlight}/doc{/highlight}","tui.tips.undo":"{highlight}/undo{/highlight} rolls back both the last message and any files it touched","tui.tips.redo":"Changed your mind? {highlight}/redo{/highlight} brings back what you just undid","tui.tips.drag_drop":"Drop images or PDFs straight into the terminal window to add them as context","tui.tips.paste_image":"Got something in your clipboard? {highlight}Ctrl+V{/highlight} pastes images directly into the prompt","tui.tips.editor":"Long prompt? Hit {highlight}Ctrl+X E{/highlight} or {highlight}/editor{/highlight} to write it in your editor of choice","tui.tips.init":"Let {highlight}/init{/highlight} read your project and generate a tailored rules file automatically","tui.tips.models":"Swap between Default, Fast, Economy, and Power with {highlight}/models{/highlight} or {highlight}Ctrl+X M{/highlight}","tui.tips.theme":`Lock your theme mode against your terminal's background \u2014 open the command palette ({highlight}Ctrl+P{/highlight}) and search for "lock"`,"tui.tips.new_session":"Start a clean slate with {highlight}Ctrl+X N{/highlight} or just type {highlight}/new{/highlight}","tui.tips.sessions":"Pick up where you left off \u2014 {highlight}/sessions{/highlight} or {highlight}Ctrl+X L{/highlight} lists all your past conversations","tui.tips.compact":"Running low on context? {highlight}/compact{/highlight} condenses the session into a concise summary","tui.tips.export":"Save any conversation as a Markdown file with {highlight}Ctrl+X X{/highlight} or {highlight}/export{/highlight}","tui.tips.copy_last":"{highlight}Ctrl+X Y{/highlight} copies QitQode's last response straight to your clipboard","tui.tips.command_palette":"Everything in one place \u2014 hit {highlight}Ctrl+P{/highlight} to open the full command palette","tui.tips.leader":"{highlight}Ctrl+X{/highlight} is your shortcut prefix \u2014 pair it with another key to trigger quick actions","tui.tips.f2":"Tap {highlight}F2{/highlight} to jump between your recently used models without opening the picker","tui.tips.sidebar":"Toggle the sidebar on or off with {highlight}Ctrl+X B{/highlight}","tui.tips.history":"Scroll through the conversation with {highlight}PageUp{/highlight} and {highlight}PageDown{/highlight}","tui.tips.jump_first":"Jump straight to the top of any conversation with {highlight}Ctrl+G{/highlight} or {highlight}Home{/highlight}","tui.tips.jump_last":"Skip to the latest message instantly with {highlight}Ctrl+Alt+G{/highlight} or {highlight}End{/highlight}","tui.tips.newline":"Need a line break in your prompt? {highlight}Shift+Enter{/highlight} or {highlight}Ctrl+J{/highlight} does it","tui.tips.clear_input":"Typed something you don't want? {highlight}Ctrl+C{/highlight} wipes the input field clean","tui.tips.escape":"Hit {highlight}Escape{/highlight} to interrupt QitQode and stop it mid-response","tui.tips.plan_agent":"The {highlight}Plan{/highlight} agent thinks through problems and proposes changes without touching any files","tui.tips.subagent":"Mention {highlight}@agent-name{/highlight} in your prompt to hand off to a specialized subagent","tui.tips.cycle_sessions":"Navigate between parent and child sessions with {highlight}Ctrl+X Right{/highlight} and {highlight}Ctrl+X Left{/highlight}","tui.tips.config_files":"{highlight}qitqode.json{/highlight} controls server behavior; {highlight}tui.json{/highlight} controls the terminal interface","tui.tips.global_config":"Your global TUI preferences live at {highlight}~/.config/qitqode/tui.json{/highlight}","tui.tips.schema":"Drop {highlight}$schema{/highlight} into your config file to unlock editor autocomplete","tui.tips.default_model":"Set the {highlight}model{/highlight} key in your config to lock in a preferred tier","tui.tips.keybinds":"Every keybind is overridable \u2014 drop it in the {highlight}keybinds{/highlight} section of {highlight}tui.json{/highlight}","tui.tips.disable_keybind":"Assign {highlight}none{/highlight} to any keybind to remove it entirely","tui.tips.mcp_config":"Wire up local or remote MCP servers through the {highlight}mcp{/highlight} section of your config","tui.tips.mcp_oauth":"Remote MCP servers that require OAuth? QitQode manages the auth flow for you","tui.tips.custom_command":"Save reusable prompts as {highlight}.md{/highlight} files in {highlight}.qitqode/command/{/highlight}","tui.tips.command_args":"Make commands dynamic with {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, and {highlight}$2{/highlight} placeholders","tui.tips.command_backticks":"Inject live shell output into any command using backticks \u2014 e.g. {highlight}`git diff`{/highlight}","tui.tips.custom_agent":"Drop a {highlight}.md{/highlight} file into {highlight}.qitqode/agent/{/highlight} to create a custom AI persona","tui.tips.agent_perms":"Each agent can have its own {highlight}edit{/highlight}, {highlight}bash{/highlight}, and {highlight}webfetch{/highlight} permission set","tui.tips.bash_allow":'Grant specific bash commands automatically \u2014 e.g. {highlight}"git *": "allow"{/highlight}',"tui.tips.bash_deny":'Block dangerous patterns outright \u2014 e.g. {highlight}"rm -rf *": "deny"{/highlight}',"tui.tips.bash_ask":'Require confirmation before certain commands run \u2014 e.g. {highlight}"git push": "ask"{/highlight}',"tui.tips.formatter":"QitQode runs prettier, gofmt, ruff, and other formatters on your files automatically","tui.tips.disable_formatter":'Turn off automatic formatting globally with {highlight}"formatter": false{/highlight} in your config',"tui.tips.custom_formatter":"Map any file extension to a custom formatter command in your config","tui.tips.lsp":"QitQode plugs into your LSP servers for deep, language-aware code understanding","tui.tips.custom_tool":"Give QitQode new capabilities by adding {highlight}.ts{/highlight} tool files to {highlight}.qitqode/tools/{/highlight}","tui.tips.tool_scripts":"Custom tools can shell out to scripts in any language \u2014 Python, Go, Bash, whatever","tui.tips.plugins":"Hook into QitQode's event lifecycle by adding {highlight}.ts{/highlight} files to {highlight}.qitqode/plugin/{/highlight}","tui.tips.plugin_notify":"Write a plugin to fire a desktop notification whenever a session finishes","tui.tips.plugin_protect":"A plugin can intercept file reads and block access to sensitive paths","tui.tips.run":"{highlight}qitqode run{/highlight} lets you drive QitQode from scripts without opening the TUI","tui.tips.continue":"Jump back into your last session from the CLI with {highlight}qitqode --continue{/highlight}","tui.tips.attach_cli":"Pass files into a non-interactive session with {highlight}qitqode run -f yourfile.ts{/highlight}","tui.tips.format_json":"Add {highlight}--format json{/highlight} to get structured output you can pipe into other tools","tui.tips.auth_list":"{highlight}qitqode auth status{/highlight} shows your current Forgewise sign-in status","tui.tips.agent_create":"Walk through building a new agent step by step with {highlight}qitqode agent create{/highlight}","tui.tips.theme_system":`Set {highlight}"theme": "system"{/highlight} to automatically follow your terminal's color scheme`,"tui.tips.theme_files":"Store custom JSON themes in {highlight}.qitqode/themes/{/highlight} to keep them project-local","tui.tips.theme_variants":"A single theme file can define both dark and light variants","tui.tips.theme_ansi":"Custom themes can reference any of the 256 ANSI terminal colors by number","tui.tips.env_var":"Pull in environment variables anywhere in your config with {highlight}{env:VAR_NAME}{/highlight}","tui.tips.file_var":"Embed the contents of any file into a config value using {highlight}{file:path}{/highlight}","tui.tips.instructions":"Point {highlight}instructions{/highlight} in your config to extra rules files to extend the agent's behavior","tui.tips.temperature":"Tune the agent's {highlight}temperature{/highlight} \u2014 lower for precision, higher for open-ended creativity","tui.tips.steps":"Cap how far the agent runs autonomously by setting a {highlight}steps{/highlight} limit in config","tui.tips.disable_tool":'Disable individual tools by setting them to {highlight}false{/highlight} under {highlight}"tools"{/highlight} in config',"tui.tips.disable_mcp_tools":`Silence an entire MCP server's toolset with {highlight}"mcp_*": false{/highlight}`,"tui.tips.tool_override":"Each agent config can override the global tool settings independently","tui.tips.doom_loop":"The {highlight}doom_loop{/highlight} permission guard stops the agent from getting stuck in runaway loops","tui.tips.external_dir":"{highlight}external_directory{/highlight} permission keeps the agent from modifying files outside your project","tui.tips.debug_config":"Something misconfigured? {highlight}qitqode debug config{/highlight} prints the resolved config for inspection","tui.tips.print_logs":"Pipe {highlight}--print-logs{/highlight} output to stderr for a full trace of what QitQode is doing","tui.tips.timeline":"Navigate directly to any message in the session with {highlight}Ctrl+X G{/highlight} or {highlight}/timeline{/highlight}","tui.tips.toggle_code":"Show or hide code blocks in the conversation with {highlight}Ctrl+X H{/highlight}","tui.tips.status":"Check what's running under the hood with {highlight}Ctrl+X S{/highlight} or {highlight}/status{/highlight}","tui.tips.scroll_accel":"Turn on {highlight}scroll_acceleration{/highlight} in {highlight}tui.json{/highlight} for fluid, physics-based scrolling","tui.tips.agents_md":"Share your project's AI rules with the whole team by committing {highlight}AGENTS.md{/highlight} to Git","tui.tips.review":"Ask QitQode to review your staged diff, branch, or open PR with {highlight}/review{/highlight}","tui.tips.help":"Lost? {highlight}/help{/highlight} or {highlight}Ctrl+X H{/highlight} surfaces the full keybind reference","tui.tips.rename":"Give your current session a proper name with {highlight}/rename{/highlight}","tui.tips.suspend.unix":"Need your shell back? {highlight}Ctrl+Z{/highlight} suspends QitQode and drops you back to the terminal","tui.tips.suspend.win":"Hit {highlight}Ctrl+Z{/highlight} to undo your last typed change in the prompt","tui.command.palette.title":"Commands","tui.command.palette.suggested":"Suggested","tui.command.category.session":"Session","tui.command.category.agent":"Agent","tui.command.category.provider":"Provider","tui.command.category.system":"System","tui.command.category.prompt":"Prompt","tui.command.category.internal":"Internal","tui.command.category.external":"External","tui.slash.init.description":"guided AGENTS.md setup","tui.slash.review.description":"review changes [commit|branch|pr], defaults to uncommitted","tui.slash.dream.description":"manually consolidate project memory from memory files and raw trajectory","tui.slash.distill.description":"find repeated workflows in recent work and package them into skills, subagents, or commands","tui.slash.goal.description":"set a stop-condition goal; runs until a judge says it's met. /goal clear to abort","tui.slash.deep-research.description":"deep multi-source, fact-checked research report (runs the deep-research workflow)","tui.command.language.switch.title":"Switch language","tui.command.language.switch.description":"Change the display language","tui.command.language.dialog.title":"Switch language","tui.language.auto":"Auto (system)","tui.language.current":"Current","tui.command.session.list.title":"Switch session","tui.command.session.new.title":"New session","tui.command.workflow.list.title":"Workflows","tui.command.model.list.title":"Switch model","tui.command.model.set_tier.title":"Switch to {{tier}}","tui.toast.model_tier_switched":"Switched to {{tier}}","tui.command.model.cycle_recent.title":"Model cycle","tui.command.model.cycle_recent_reverse.title":"Model cycle reverse","tui.command.model.cycle_favorite.title":"Favorite cycle","tui.command.model.cycle_favorite_reverse.title":"Favorite cycle reverse","tui.command.agent.list.title":"Switch agent","tui.command.mcp.list.title":"Toggle MCPs","tui.command.never_ask.title_on":"Never-ask: ON (auto-decide, permissions excluded) \u2014 click to turn off","tui.command.never_ask.title_off":"Never-ask: OFF \u2014 click to turn on (auto-decide, permissions excluded)","tui.command.never_ask.toast_on":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Permission requests still need your approval.","tui.command.never_ask.toast_off":"Never-ask OFF \u2014 I'll ask you at decision points again.","tui.command.never_ask.title_on_fullauto":"Never-ask: ON (auto-decide; full-auto is also approving permissions) \u2014 click to turn off","tui.command.never_ask.title_off_fullauto":"Never-ask: OFF \u2014 click to turn on (auto-decide; full-auto is still approving permissions)","tui.command.never_ask.toast_on_fullauto":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Full-auto is on, so tool permissions are being approved automatically too.","tui.command.agent.cycle.title":"Agent cycle","tui.command.variant.cycle.title":"Variant cycle","tui.command.variant.list.title":"Switch model variant","tui.command.agent.cycle.reverse.title":"Agent cycle reverse","tui.command.provider.login.title":"Login","tui.command.provider.logout.title":"Logout","tui.command.console.org.switch.title":"Switch org","tui.command.qitqode.status.title":"View status","tui.command.worktree.list.title":"Worktrees","tui.command.theme.switch.title":"Switch theme","tui.command.theme.switch_mode.to_light":"Switch to light mode","tui.command.theme.switch_mode.to_dark":"Switch to dark mode","tui.command.theme.mode.unlock":"Unlock theme mode","tui.command.theme.mode.lock":"Lock theme mode","tui.command.help.show.title":"Help","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accessibility: toggle animations and sound from the command list. Env vars: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Announcements: in accessible mode, choose how chatty screen-reader announcements are (quiet, normal, verbose) from the command list or with QITQODE_TUI_ANNOUNCEMENTS. Errors are always announced.","tui.dialog.help.dialog_keys":"Dialogs: every dialog works with the keyboard alone \u2014 Esc closes, Tab or arrow keys move focus, Enter or Space activates the focused control.","tui.command.app.announcements.cycle":"Announcements: {{level}} (select to change)","tui.announcements.level.quiet":"quiet","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"verbose","tui.app.terminal_too_small":"Terminal too small ({{width}}x{{height}}). Resize to at least 40x8.","tui.dialog.help.command_list":"Press {{keybind}} to see all available actions and commands in any context.","tui.dialog.help.ok":"ok","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 scroll \xB7 PgUp/PgDn page \xB7 esc close","tui.dialog.ok":"ok","tui.dialog.confirm.cancel":"Cancel","tui.dialog.confirm.confirm":"Confirm","tui.dialog.agreement.title":"Terms & Privacy","tui.dialog.agreement.message":"Please review and agree to continue.","tui.dialog.agreement.confirm":"Agree & Continue","tui.command.docs.terms.title":"View Terms of Service","tui.command.docs.privacy.title":"View Privacy Policy","tui.command.consent.revoke.title":"Revoke free-model agreement","tui.consent.revoked":"Free-model agreement revoked \u2014 you'll be asked to agree again","tui.dialog.select.placeholder":"Search","tui.dialog.select.no_results":"No results found","tui.dialog.prompt.placeholder":"Enter text","tui.dialog.prompt.busy":"Working...","tui.dialog.prompt.processing":"processing...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"submit","tui.dialog.export.title":"Export Options","tui.dialog.export.filename":"Filename:","tui.dialog.export.filename_placeholder":"Enter filename","tui.dialog.export.include_thinking":"Include thinking","tui.dialog.export.include_tool_details":"Include tool details","tui.dialog.export.include_assistant_metadata":"Include assistant metadata","tui.dialog.export.open_without_saving":"Open without saving","tui.dialog.export.hint.toggle_prefix":"Press","tui.dialog.export.hint.toggle_action":"to toggle","tui.dialog.export.hint.confirm_action":"to confirm","tui.dialog.export.hint.options_action":"for options","tui.toast.copied_to_clipboard":"Copied to clipboard","tui.toast.instructions_loaded":"Loaded {{files}}","tui.toast.update_available.title":"Update Available","tui.toast.update_available.confirm":"A new release v{{version}} is available. Would you like to update now?","tui.toast.update_available.updating":"Updating to v{{version}}...","tui.toast.update_available.failed":"Update failed","tui.toast.update_available.success":"Successfully updated to QitQode v{{version}}. Please restart the application.","tui.toast.updated.title":"Auto-updated","tui.toast.updated.message":"Patch update applied: v{{version}}. Restart to use the new version. Disable via autoupdate: false in config.","tui.sidebar.instructions":"Instructions","tui.sidebar.cwd":"Working Directory","tui.toast.unknown_error":"An unknown error has occurred","tui.command.docs.open.title":"Open docs","tui.command.app.exit.title":"Exit the app","tui.command.app.debug.title":"Toggle debug panel","tui.command.app.console.title":"Toggle console","tui.command.app.heap_snapshot.title":"Write heap snapshot","tui.command.terminal.suspend.title":"Suspend terminal","tui.command.terminal.title.disable":"Disable terminal title","tui.command.terminal.title.enable":"Enable terminal title","tui.command.app.toggle.animations.disable":"Disable animations","tui.command.app.toggle.animations.enable":"Enable animations","tui.command.app.toggle.diffwrap.disable":"Disable diff wrapping","tui.command.app.toggle.diffwrap.enable":"Enable diff wrapping","tui.command.app.toggle.sound.disable":"Disable sound","tui.command.app.toggle.sound.enable":"Enable sound","tui.command.logout.toast":"Logged out","tui.command.session.share.title":"Share session","tui.command.session.share.copy_link":"Copy share link","tui.command.session.rename.title":"Rename session","tui.command.session.timeline.title":"Jump to message","tui.command.session.fork.title":"Fork session","tui.command.session.compact.title":"Compact session","tui.command.session.unshare.title":"Unshare session","tui.command.session.undo.title":"Undo previous message","tui.command.session.redo.title":"Redo","tui.command.session.sidebar.show":"Show sidebar","tui.command.session.sidebar.hide":"Hide sidebar","tui.command.session.conceal.disable":"Disable code concealment","tui.command.session.conceal.enable":"Enable code concealment","tui.command.session.timestamps.show":"Show timestamps","tui.command.session.timestamps.hide":"Hide timestamps","tui.command.session.thinking.expand":"Expand thinking","tui.command.session.thinking.collapse":"Collapse thinking","tui.command.session.tool_details.show":"Show tool details","tui.command.session.tool_details.hide":"Hide tool details","tui.command.session.scrollbar.toggle":"Toggle session scrollbar","tui.command.session.generic_tool_output.show":"Show generic tool output","tui.command.session.generic_tool_output.hide":"Hide generic tool output","tui.command.session.page_up.title":"Page up","tui.command.session.page_down.title":"Page down","tui.command.session.line_up.title":"Line up","tui.command.session.line_down.title":"Line down","tui.command.session.half_page_up.title":"Half page up","tui.command.session.half_page_down.title":"Half page down","tui.command.session.first.title":"First message","tui.command.session.last.title":"Last message","tui.command.session.last_user.title":"Jump to last user message","tui.command.session.message_next.title":"Next message","tui.command.session.message_previous.title":"Previous message","tui.command.messages.copy.title":"Copy last assistant message","tui.command.session.copy.title":"Copy session transcript","tui.command.session.export.title":"Export session transcript","tui.command.session.child_first.title":"Go to child session","tui.command.session.parent.title":"Go to parent session","tui.command.session.child_next.title":"Next child session","tui.command.session.child_previous.title":"Previous child session","tui.command.prompt.clear.title":"Clear prompt","tui.command.prompt.submit.title":"Submit prompt","tui.command.prompt.paste.title":"Paste","tui.command.session.interrupt.title":"Interrupt session","tui.command.prompt.editor.title":"Open editor","tui.command.prompt.skills.title":"Skills","tui.command.voice.toggle.title":"Toggle voice input","tui.command.voice.toggle.title_on":"Voice input: ON \u2014 click to turn off","tui.command.voice.toggle.title_off":"Voice input: OFF \u2014 click to turn on","tui.command.voice.send.title":"Toggle voice send command","tui.command.voice.send.title_on":"Voice send: ON \u2014 click to turn off","tui.command.voice.send.title_off":"Voice send: OFF \u2014 click to turn on","tui.voice.enabled":"Voice input on (Chinese/English) \u2014 click [Voice] to record","tui.voice.disabled":"Voice input disabled","tui.voice.send.enabled":'Voice send enabled \u2014 after a pause, clearly say "send it" to submit',"tui.voice.send.disabled":"Voice send disabled","tui.voice.control.enabled":"Voice control enabled \u2014 using multimodal model for intelligent editing (slower)","tui.voice.control.disabled":"Voice control disabled \u2014 using fast ASR transcription","tui.command.voice.control.title":"Toggle voice control (multimodal)","tui.command.voice.control.title_on":"Voice control: ON (multimodal) \u2014 click to turn off","tui.command.voice.control.title_off":"Voice control: OFF (fast ASR) \u2014 click to turn on","tui.voice.error.no_auth":"Use /connect to sign in to QitQode, or configure voice.asr_model for another provider","tui.voice.error.no_auth_provider":'Voice provider "{{provider}}" is not authenticated, check its apiKey',"tui.voice.error.provider_not_found":'Provider "{{provider}}" not available \u2014 /connect to authenticate, or declare models in config for custom endpoints',"tui.voice.error.no_url":'Provider "{{provider}}" has no baseURL configured \u2014 set options.baseURL in the provider config',"tui.voice.error.no_device":"No microphone/audio device found \u2014 please check your system audio settings","tui.voice.error.recorder_failed":"Recording failed","tui.voice.error.no_recorder":"No recording tool found, please install sox","tui.voice.error.too_short":"Recording too short","tui.voice.error.network":"Transcription failed, please check your network","tui.voice.error.empty_send":"Nothing to send","tui.voice.error.unknown_agent":'Agent "{{name}}" not found',"tui.command.prompt.stash.title":"Stash prompt","tui.command.prompt.stash.pop.title":"Stash pop","tui.command.prompt.stash.list.title":"Stash list","tui.command.tips.toggle.show":"Show tips","tui.command.tips.toggle.hide":"Hide tips","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Install plugin","tui.dialog.login.title":"QitQode Sign In","cli.providers.select":"Select provider","cli.providers.other":"Other provider","tui.dialog.login.forgewise":"Sign in with Forgewise","tui.dialog.login.import_claude":"Import from Claude Code","tui.dialog.login.other":"Other Provider","tui.dialog.login.import_claude.no_key":"Claude Code API Key not found","tui.dialog.login.import_claude.read_failed":"Failed to read ~/.claude/settings.json","tui.dialog.login.import_claude.success":"Imported from Claude Code","tui.question.plan_enter.question":"Would you like to switch to plan mode for structured planning?","tui.question.plan_enter.header":"Plan","tui.question.plan_enter.option.0.label":"Yes","tui.question.plan_enter.option.0.description":"Switch to plan agent for read-only planning","tui.question.plan_enter.option.1.label":"No","tui.question.plan_enter.option.1.description":"Stay in current mode","tui.question.plan_exit.question":"Plan at {{plan}} is complete. Would you like to switch to the build agent and start implementing?","tui.question.plan_exit.header":"Plan","tui.question.plan_exit.option.0.label":"Yes","tui.question.plan_exit.option.0.description":"Switch to build agent and start implementing the plan","tui.question.plan_exit.option.1.label":"No","tui.question.plan_exit.option.1.description":"Stay with plan agent to continue refining the plan","tui.session.badge.auto":"Auto","trust.title":"Accessing workspace:","trust.safety_check":"Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a moment to review what's in this folder first.","trust.capabilities":"QitQode will be able to read, edit, and execute files here.","trust.plugin_warn":"If malicious plugins exist in this directory, they can execute arbitrary code, read, modify, or exfiltrate your files.","trust.option.yes":"Yes, I trust this folder","trust.option.no":"No, exit","trust.dangerous.title_home":"WARNING: You are about to open your HOME DIRECTORY.","trust.dangerous.title_root":"WARNING: You are about to open the FILESYSTEM ROOT.","trust.dangerous.body_home":"The model will have access to ALL your personal files \u2014 SSH keys, credentials, browser profiles, and everything else under your home folder.","trust.dangerous.body_root":"The model will have access to the ENTIRE filesystem \u2014 system files, all user data, credentials, and everything on this machine.","trust.dangerous.advice_home":"Unless you have a very specific reason, DO NOT trust your entire home directory.","trust.dangerous.advice_root":"Unless you have a very specific reason, DO NOT trust the filesystem root.","trust.dangerous.option.yes":"I understand the risks, trust for this session","trust.dangerous.option.no":"Exit (recommended)"};
|
|
2
|
+
var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"Type your message... (type / for commands)","tui.prompt.placeholder.shell":'Run a command... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab to accept)","tui.home.placeholder.example.todo":"Fix a TODO in the codebase","tui.home.placeholder.example.stack":"What is the tech stack of this project?","tui.home.placeholder.example.tests":"Fix broken tests","tui.home.agreement.prefix":"By using QitQode, you agree to our ","tui.home.agreement.terms":"Terms of Service","tui.home.agreement.separator":" and ","tui.home.agreement.privacy":"Privacy Policy","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"attach file","tui.prompt.hint.subagent":"subagent","tui.prompt.hint.commands":"commands","tui.prompt.hint.switch_mode":"mode","tui.prompt.hint.settings":"settings","tui.tips.label":"Tip","tui.tips.plain_terminal":"QitQode looks best in iTerm2 or VS Code's integrated terminal","tui.tips.attach_file":"Hit {highlight}@{/highlight} and start typing to fuzzy-find and attach a file to your prompt","tui.tips.shell_prefix":"Prefix any message with {highlight}!{/highlight} to run it as a shell command \u2014 try {highlight}!git log{/highlight}","tui.tips.tab_agent":"{highlight}Tab{/highlight} and {highlight}Shift+Tab{/highlight} step through your Build, Plan, and Compose agents","tui.tips.theme_mode":"Switch between dark and light themes with {highlight}/dark{/highlight} or {highlight}/light{/highlight}","tui.tips.doc":"Pull up the full documentation anytime with {highlight}/doc{/highlight}","tui.tips.undo":"{highlight}/undo{/highlight} rolls back both the last message and any files it touched","tui.tips.redo":"Changed your mind? {highlight}/redo{/highlight} brings back what you just undid","tui.tips.drag_drop":"Drop images or PDFs straight into the terminal window to add them as context","tui.tips.paste_image":"Got something in your clipboard? {highlight}Ctrl+V{/highlight} pastes images directly into the prompt","tui.tips.editor":"Long prompt? Hit {highlight}Ctrl+X E{/highlight} or {highlight}/editor{/highlight} to write it in your editor of choice","tui.tips.init":"Let {highlight}/init{/highlight} read your project and generate a tailored rules file automatically","tui.tips.models":"Swap between Default, Fast, Economy, and Power with {highlight}/models{/highlight} or {highlight}Ctrl+X M{/highlight}","tui.tips.theme":`Lock your theme mode against your terminal's background \u2014 open the command palette ({highlight}Ctrl+P{/highlight}) and search for "lock"`,"tui.tips.new_session":"Start a clean slate with {highlight}Ctrl+X N{/highlight} or just type {highlight}/new{/highlight}","tui.tips.sessions":"Pick up where you left off \u2014 {highlight}/sessions{/highlight} or {highlight}Ctrl+X L{/highlight} lists all your past conversations","tui.tips.compact":"Running low on context? {highlight}/compact{/highlight} condenses the session into a concise summary","tui.tips.export":"Save any conversation as a Markdown file with {highlight}Ctrl+X X{/highlight} or {highlight}/export{/highlight}","tui.tips.copy_last":"{highlight}Ctrl+X Y{/highlight} copies QitQode's last response straight to your clipboard","tui.tips.command_palette":"Everything in one place \u2014 hit {highlight}Ctrl+P{/highlight} to open the full command palette","tui.tips.leader":"{highlight}Ctrl+X{/highlight} is your shortcut prefix \u2014 pair it with another key to trigger quick actions","tui.tips.f2":"Tap {highlight}F2{/highlight} to jump between your recently used models without opening the picker","tui.tips.sidebar":"Toggle the sidebar on or off with {highlight}Ctrl+X B{/highlight}","tui.tips.history":"Scroll through the conversation with {highlight}PageUp{/highlight} and {highlight}PageDown{/highlight}","tui.tips.jump_first":"Jump straight to the top of any conversation with {highlight}Ctrl+G{/highlight} or {highlight}Home{/highlight}","tui.tips.jump_last":"Skip to the latest message instantly with {highlight}Ctrl+Alt+G{/highlight} or {highlight}End{/highlight}","tui.tips.newline":"Need a line break in your prompt? {highlight}Shift+Enter{/highlight} or {highlight}Ctrl+J{/highlight} does it","tui.tips.clear_input":"Typed something you don't want? {highlight}Ctrl+C{/highlight} wipes the input field clean","tui.tips.escape":"Hit {highlight}Escape{/highlight} to interrupt QitQode and stop it mid-response","tui.tips.plan_agent":"The {highlight}Plan{/highlight} agent thinks through problems and proposes changes without touching any files","tui.tips.subagent":"Mention {highlight}@agent-name{/highlight} in your prompt to hand off to a specialized subagent","tui.tips.cycle_sessions":"Navigate between parent and child sessions with {highlight}Ctrl+X Right{/highlight} and {highlight}Ctrl+X Left{/highlight}","tui.tips.config_files":"{highlight}qitqode.json{/highlight} controls server behavior; {highlight}tui.json{/highlight} controls the terminal interface","tui.tips.global_config":"Your global TUI preferences live at {highlight}~/.config/qitqode/tui.json{/highlight}","tui.tips.schema":"Drop {highlight}$schema{/highlight} into your config file to unlock editor autocomplete","tui.tips.default_model":"Set the {highlight}model{/highlight} key in your config to lock in a preferred tier","tui.tips.keybinds":"Every keybind is overridable \u2014 drop it in the {highlight}keybinds{/highlight} section of {highlight}tui.json{/highlight}","tui.tips.disable_keybind":"Assign {highlight}none{/highlight} to any keybind to remove it entirely","tui.tips.mcp_config":"Wire up local or remote MCP servers through the {highlight}mcp{/highlight} section of your config","tui.tips.mcp_oauth":"Remote MCP servers that require OAuth? QitQode manages the auth flow for you","tui.tips.custom_command":"Save reusable prompts as {highlight}.md{/highlight} files in {highlight}.qitqode/command/{/highlight}","tui.tips.command_args":"Make commands dynamic with {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, and {highlight}$2{/highlight} placeholders","tui.tips.command_backticks":"Inject live shell output into any command using backticks \u2014 e.g. {highlight}`git diff`{/highlight}","tui.tips.custom_agent":"Drop a {highlight}.md{/highlight} file into {highlight}.qitqode/agent/{/highlight} to create a custom AI persona","tui.tips.agent_perms":"Each agent can have its own {highlight}edit{/highlight}, {highlight}bash{/highlight}, and {highlight}webfetch{/highlight} permission set","tui.tips.bash_allow":'Grant specific bash commands automatically \u2014 e.g. {highlight}"git *": "allow"{/highlight}',"tui.tips.bash_deny":'Block dangerous patterns outright \u2014 e.g. {highlight}"rm -rf *": "deny"{/highlight}',"tui.tips.bash_ask":'Require confirmation before certain commands run \u2014 e.g. {highlight}"git push": "ask"{/highlight}',"tui.tips.formatter":"QitQode runs prettier, gofmt, ruff, and other formatters on your files automatically","tui.tips.disable_formatter":'Turn off automatic formatting globally with {highlight}"formatter": false{/highlight} in your config',"tui.tips.custom_formatter":"Map any file extension to a custom formatter command in your config","tui.tips.lsp":"QitQode plugs into your LSP servers for deep, language-aware code understanding","tui.tips.custom_tool":"Give QitQode new capabilities by adding {highlight}.ts{/highlight} tool files to {highlight}.qitqode/tools/{/highlight}","tui.tips.tool_scripts":"Custom tools can shell out to scripts in any language \u2014 Python, Go, Bash, whatever","tui.tips.plugins":"Hook into QitQode's event lifecycle by adding {highlight}.ts{/highlight} files to {highlight}.qitqode/plugin/{/highlight}","tui.tips.plugin_notify":"Write a plugin to fire a desktop notification whenever a session finishes","tui.tips.plugin_protect":"A plugin can intercept file reads and block access to sensitive paths","tui.tips.run":"{highlight}qitqode run{/highlight} lets you drive QitQode from scripts without opening the TUI","tui.tips.continue":"Jump back into your last session from the CLI with {highlight}qitqode --continue{/highlight}","tui.tips.attach_cli":"Pass files into a non-interactive session with {highlight}qitqode run -f yourfile.ts{/highlight}","tui.tips.format_json":"Add {highlight}--format json{/highlight} to get structured output you can pipe into other tools","tui.tips.auth_list":"{highlight}qitqode auth status{/highlight} shows your current Forgewise sign-in status","tui.tips.agent_create":"Walk through building a new agent step by step with {highlight}qitqode agent create{/highlight}","tui.tips.theme_system":`Set {highlight}"theme": "system"{/highlight} to automatically follow your terminal's color scheme`,"tui.tips.theme_files":"Store custom JSON themes in {highlight}.qitqode/themes/{/highlight} to keep them project-local","tui.tips.theme_variants":"A single theme file can define both dark and light variants","tui.tips.theme_ansi":"Custom themes can reference any of the 256 ANSI terminal colors by number","tui.tips.env_var":"Pull in environment variables anywhere in your config with {highlight}{env:VAR_NAME}{/highlight}","tui.tips.file_var":"Embed the contents of any file into a config value using {highlight}{file:path}{/highlight}","tui.tips.instructions":"Point {highlight}instructions{/highlight} in your config to extra rules files to extend the agent's behavior","tui.tips.temperature":"Tune the agent's {highlight}temperature{/highlight} \u2014 lower for precision, higher for open-ended creativity","tui.tips.steps":"Cap how far the agent runs autonomously by setting a {highlight}steps{/highlight} limit in config","tui.tips.disable_tool":'Disable individual tools by setting them to {highlight}false{/highlight} under {highlight}"tools"{/highlight} in config',"tui.tips.disable_mcp_tools":`Silence an entire MCP server's toolset with {highlight}"mcp_*": false{/highlight}`,"tui.tips.tool_override":"Each agent config can override the global tool settings independently","tui.tips.doom_loop":"The {highlight}doom_loop{/highlight} permission guard stops the agent from getting stuck in runaway loops","tui.tips.external_dir":"{highlight}external_directory{/highlight} permission keeps the agent from modifying files outside your project","tui.tips.debug_config":"Something misconfigured? {highlight}qitqode debug config{/highlight} prints the resolved config for inspection","tui.tips.print_logs":"Pipe {highlight}--print-logs{/highlight} output to stderr for a full trace of what QitQode is doing","tui.tips.timeline":"Navigate directly to any message in the session with {highlight}Ctrl+X G{/highlight} or {highlight}/timeline{/highlight}","tui.tips.toggle_code":"Show or hide code blocks in the conversation with {highlight}Ctrl+X H{/highlight}","tui.tips.status":"Check what's running under the hood with {highlight}Ctrl+X S{/highlight} or {highlight}/status{/highlight}","tui.tips.scroll_accel":"Turn on {highlight}scroll_acceleration{/highlight} in {highlight}tui.json{/highlight} for fluid, physics-based scrolling","tui.tips.agents_md":"Share your project's AI rules with the whole team by committing {highlight}AGENTS.md{/highlight} to Git","tui.tips.review":"Ask QitQode to review your staged diff, branch, or open PR with {highlight}/review{/highlight}","tui.tips.help":"Lost? {highlight}/help{/highlight} or {highlight}Ctrl+X H{/highlight} surfaces the full keybind reference","tui.tips.rename":"Give your current session a proper name with {highlight}/rename{/highlight}","tui.tips.suspend.unix":"Need your shell back? {highlight}Ctrl+Z{/highlight} suspends QitQode and drops you back to the terminal","tui.tips.suspend.win":"Hit {highlight}Ctrl+Z{/highlight} to undo your last typed change in the prompt","tui.command.palette.title":"Commands","tui.command.palette.suggested":"Suggested","tui.command.category.session":"Session","tui.command.category.agent":"Agent","tui.command.category.provider":"Provider","tui.command.category.system":"System","tui.command.category.prompt":"Prompt","tui.command.category.internal":"Internal","tui.command.category.external":"External","tui.slash.init.description":"guided AGENTS.md setup","tui.slash.review.description":"review changes [commit|branch|pr], defaults to uncommitted","tui.slash.dream.description":"manually consolidate project memory from memory files and raw trajectory","tui.slash.distill.description":"find repeated workflows in recent work and package them into skills, subagents, or commands","tui.slash.goal.description":"set a stop-condition goal; runs until a judge says it's met. /goal clear to abort","tui.slash.deep-research.description":"deep multi-source, fact-checked research report (runs the deep-research workflow)","tui.command.language.switch.title":"Switch language","tui.command.language.switch.description":"Change the display language","tui.command.language.dialog.title":"Switch language","tui.language.auto":"Auto (system)","tui.language.current":"Current","tui.command.session.list.title":"Switch session","tui.command.session.new.title":"New session","tui.command.workflow.list.title":"Workflows","tui.command.model.list.title":"Switch model","tui.command.model.set_tier.title":"Switch to {{tier}}","tui.toast.model_tier_switched":"Switched to {{tier}}","tui.command.model.cycle_recent.title":"Model cycle","tui.command.model.cycle_recent_reverse.title":"Model cycle reverse","tui.command.model.cycle_favorite.title":"Favorite cycle","tui.command.model.cycle_favorite_reverse.title":"Favorite cycle reverse","tui.command.agent.list.title":"Switch agent","tui.command.mcp.list.title":"Toggle MCPs","tui.command.never_ask.title_on":"Never-ask: ON (auto-decide, permissions excluded) \u2014 click to turn off","tui.command.never_ask.title_off":"Never-ask: OFF \u2014 click to turn on (auto-decide, permissions excluded)","tui.command.never_ask.toast_on":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Permission requests still need your approval.","tui.command.never_ask.toast_off":"Never-ask OFF \u2014 I'll ask you at decision points again.","tui.command.never_ask.title_on_fullauto":"Never-ask: ON (auto-decide; full-auto is also approving permissions) \u2014 click to turn off","tui.command.never_ask.title_off_fullauto":"Never-ask: OFF \u2014 click to turn on (auto-decide; full-auto is still approving permissions)","tui.command.never_ask.toast_on_fullauto":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Full-auto is on, so tool permissions are being approved automatically too.","tui.command.agent.cycle.title":"Agent cycle","tui.command.variant.cycle.title":"Variant cycle","tui.command.variant.list.title":"Switch model variant","tui.command.agent.cycle.reverse.title":"Agent cycle reverse","tui.command.provider.login.title":"Login","tui.command.provider.logout.title":"Logout","tui.command.console.org.switch.title":"Switch org","tui.command.qitqode.status.title":"View status","tui.command.worktree.list.title":"Worktrees","tui.command.theme.switch.title":"Switch theme","tui.command.theme.switch_mode.to_light":"Switch to light mode","tui.command.theme.switch_mode.to_dark":"Switch to dark mode","tui.command.theme.mode.unlock":"Unlock theme mode","tui.command.theme.mode.lock":"Lock theme mode","tui.command.help.show.title":"Help","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accessibility: toggle animations and sound from the command list. Env vars: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Announcements: in accessible mode, choose how chatty screen-reader announcements are (quiet, normal, verbose) from the command list or with QITQODE_TUI_ANNOUNCEMENTS. Errors are always announced.","tui.dialog.help.dialog_keys":"Dialogs: every dialog works with the keyboard alone \u2014 Esc closes, Tab or arrow keys move focus, Enter or Space activates the focused control.","tui.command.app.announcements.cycle":"Announcements: {{level}} (select to change)","tui.announcements.level.quiet":"quiet","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"verbose","tui.app.terminal_too_small":"Terminal too small ({{width}}x{{height}}). Resize to at least 40x8.","tui.dialog.help.command_list":"Press {{keybind}} to see all available actions and commands in any context.","tui.dialog.help.ok":"ok","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 scroll \xB7 PgUp/PgDn page \xB7 esc close","tui.dialog.ok":"ok","tui.dialog.confirm.cancel":"Cancel","tui.dialog.confirm.confirm":"Confirm","tui.dialog.agreement.title":"Terms & Privacy","tui.dialog.agreement.message":"Please review and agree to continue.","tui.dialog.agreement.confirm":"Agree & Continue","tui.command.docs.terms.title":"View Terms of Service","tui.command.docs.privacy.title":"View Privacy Policy","tui.command.consent.revoke.title":"Revoke free-model agreement","tui.consent.revoked":"Free-model agreement revoked \u2014 you'll be asked to agree again","tui.dialog.select.placeholder":"Search","tui.dialog.select.no_results":"No results found","tui.dialog.prompt.placeholder":"Enter text","tui.dialog.prompt.busy":"Working...","tui.dialog.prompt.processing":"processing...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"submit","tui.dialog.export.title":"Export Options","tui.dialog.export.filename":"Filename:","tui.dialog.export.filename_placeholder":"Enter filename","tui.dialog.export.include_thinking":"Include thinking","tui.dialog.export.include_tool_details":"Include tool details","tui.dialog.export.include_assistant_metadata":"Include assistant metadata","tui.dialog.export.open_without_saving":"Open without saving","tui.dialog.export.hint.toggle_prefix":"Press","tui.dialog.export.hint.toggle_action":"to toggle","tui.dialog.export.hint.confirm_action":"to confirm","tui.dialog.export.hint.options_action":"for options","tui.toast.copied_to_clipboard":"Copied to clipboard","tui.toast.instructions_loaded":"Loaded {{files}}","tui.toast.update_available.title":"Update Available","tui.toast.update_available.confirm":"A new release v{{version}} is available. Would you like to update now?","tui.toast.update_available.updating":"Updating to v{{version}}...","tui.toast.update_available.failed":"Update failed","tui.toast.update_available.success":"Successfully updated to QitQode v{{version}}. Please restart the application.","tui.toast.updated.title":"Auto-updated","tui.toast.updated.message":"Patch update applied: v{{version}}. Restart to use the new version. Disable via autoupdate: false in config.","tui.sidebar.instructions":"Instructions","tui.sidebar.cwd":"Working Directory","tui.toast.unknown_error":"An unknown error has occurred","tui.command.docs.open.title":"Open docs","tui.command.app.exit.title":"Exit the app","tui.command.app.debug.title":"Toggle debug panel","tui.command.app.console.title":"Toggle console","tui.command.app.heap_snapshot.title":"Write heap snapshot","tui.command.terminal.suspend.title":"Suspend terminal","tui.command.terminal.title.disable":"Disable terminal title","tui.command.terminal.title.enable":"Enable terminal title","tui.command.app.toggle.animations.disable":"Disable animations","tui.command.app.toggle.animations.enable":"Enable animations","tui.command.app.toggle.diffwrap.disable":"Disable diff wrapping","tui.command.app.toggle.diffwrap.enable":"Enable diff wrapping","tui.command.app.toggle.sound.disable":"Disable sound","tui.command.app.toggle.sound.enable":"Enable sound","tui.command.logout.toast":"Logged out","tui.command.session.share.title":"Share session","tui.command.session.share.copy_link":"Copy share link","tui.command.session.rename.title":"Rename session","tui.command.session.timeline.title":"Jump to message","tui.command.session.fork.title":"Fork session","tui.command.session.compact.title":"Compact session","tui.command.session.unshare.title":"Unshare session","tui.command.session.undo.title":"Undo previous message","tui.command.session.redo.title":"Redo","tui.command.session.sidebar.show":"Show sidebar","tui.command.session.sidebar.hide":"Hide sidebar","tui.command.session.conceal.disable":"Disable code concealment","tui.command.session.conceal.enable":"Enable code concealment","tui.command.session.timestamps.show":"Show timestamps","tui.command.session.timestamps.hide":"Hide timestamps","tui.command.session.thinking.expand":"Expand thinking","tui.command.session.thinking.collapse":"Collapse thinking","tui.command.session.tool_details.show":"Show tool details","tui.command.session.tool_details.hide":"Hide tool details","tui.command.session.scrollbar.toggle":"Toggle session scrollbar","tui.command.session.generic_tool_output.show":"Show generic tool output","tui.command.session.generic_tool_output.hide":"Hide generic tool output","tui.command.session.page_up.title":"Page up","tui.command.session.page_down.title":"Page down","tui.command.session.line_up.title":"Line up","tui.command.session.line_down.title":"Line down","tui.command.session.half_page_up.title":"Half page up","tui.command.session.half_page_down.title":"Half page down","tui.command.session.first.title":"First message","tui.command.session.last.title":"Last message","tui.command.session.last_user.title":"Jump to last user message","tui.command.session.message_next.title":"Next message","tui.command.session.message_previous.title":"Previous message","tui.command.messages.copy.title":"Copy last assistant message","tui.command.session.copy.title":"Copy session transcript","tui.command.session.export.title":"Export session transcript","tui.command.session.child_first.title":"Go to child session","tui.command.session.parent.title":"Go to parent session","tui.command.session.main.title":"Back to the main conversation","tui.command.session.child_next.title":"Next child session","tui.command.session.child_previous.title":"Previous child session","tui.command.prompt.clear.title":"Clear prompt","tui.command.prompt.submit.title":"Submit prompt","tui.command.prompt.paste.title":"Paste","tui.command.session.interrupt.title":"Interrupt session","tui.command.prompt.editor.title":"Open editor","tui.command.prompt.skills.title":"Skills","tui.command.voice.toggle.title":"Toggle voice input","tui.command.voice.toggle.title_on":"Voice input: ON \u2014 click to turn off","tui.command.voice.toggle.title_off":"Voice input: OFF \u2014 click to turn on","tui.command.voice.send.title":"Toggle voice send command","tui.command.voice.send.title_on":"Voice send: ON \u2014 click to turn off","tui.command.voice.send.title_off":"Voice send: OFF \u2014 click to turn on","tui.voice.enabled":"Voice input on (Chinese/English) \u2014 click [Voice] to record","tui.voice.disabled":"Voice input disabled","tui.voice.send.enabled":'Voice send enabled \u2014 after a pause, clearly say "send it" to submit',"tui.voice.send.disabled":"Voice send disabled","tui.voice.control.enabled":"Voice control enabled \u2014 using multimodal model for intelligent editing (slower)","tui.voice.control.disabled":"Voice control disabled \u2014 using fast ASR transcription","tui.command.voice.control.title":"Toggle voice control (multimodal)","tui.command.voice.control.title_on":"Voice control: ON (multimodal) \u2014 click to turn off","tui.command.voice.control.title_off":"Voice control: OFF (fast ASR) \u2014 click to turn on","tui.voice.error.no_auth":"Use /connect to sign in to QitQode, or configure voice.asr_model for another provider","tui.voice.error.no_auth_provider":'Voice provider "{{provider}}" is not authenticated, check its apiKey',"tui.voice.error.provider_not_found":'Provider "{{provider}}" not available \u2014 /connect to authenticate, or declare models in config for custom endpoints',"tui.voice.error.no_url":'Provider "{{provider}}" has no baseURL configured \u2014 set options.baseURL in the provider config',"tui.voice.error.no_device":"No microphone/audio device found \u2014 please check your system audio settings","tui.voice.error.recorder_failed":"Recording failed","tui.voice.error.no_recorder":"No recording tool found, please install sox","tui.voice.error.too_short":"Recording too short","tui.voice.error.network":"Transcription failed, please check your network","tui.voice.error.empty_send":"Nothing to send","tui.voice.error.unknown_agent":'Agent "{{name}}" not found',"tui.command.prompt.stash.title":"Stash prompt","tui.command.prompt.stash.pop.title":"Stash pop","tui.command.prompt.stash.list.title":"Stash list","tui.command.tips.toggle.show":"Show tips","tui.command.tips.toggle.hide":"Hide tips","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Install plugin","tui.dialog.login.title":"QitQode Sign In","cli.providers.select":"Select provider","cli.providers.other":"Other provider","tui.dialog.login.forgewise":"Sign in with Forgewise","tui.dialog.login.import_claude":"Import from Claude Code","tui.dialog.login.other":"Other Provider","tui.dialog.login.import_claude.no_key":"Claude Code API Key not found","tui.dialog.login.import_claude.read_failed":"Failed to read ~/.claude/settings.json","tui.dialog.login.import_claude.success":"Imported from Claude Code","tui.question.plan_enter.question":"Would you like to switch to plan mode for structured planning?","tui.question.plan_enter.header":"Plan","tui.question.plan_enter.option.0.label":"Yes","tui.question.plan_enter.option.0.description":"Switch to plan agent for read-only planning","tui.question.plan_enter.option.1.label":"No","tui.question.plan_enter.option.1.description":"Stay in current mode","tui.question.plan_exit.question":"Plan at {{plan}} is complete. Would you like to switch to the build agent and start implementing?","tui.question.plan_exit.header":"Plan","tui.question.plan_exit.option.0.label":"Yes","tui.question.plan_exit.option.0.description":"Switch to build agent and start implementing the plan","tui.question.plan_exit.option.1.label":"No","tui.question.plan_exit.option.1.description":"Stay with plan agent to continue refining the plan","tui.session.badge.auto":"Auto","tui.session.subagent.label":"Subagent","tui.session.subagent.child_label":"Child session","tui.session.subagent.back":"\u2190 Back to main","tui.session.subagent.previous":"Prev","tui.session.subagent.next":"Next","tui.session.subagent.prompt_badge":"Prompt \u2192 main","tui.session.subagent.prompt_hint":"what you type below goes to the main conversation","tui.session.subagent.legend_back":"back","tui.session.subagent.legend_cycle":"cycle","trust.title":"Accessing workspace:","trust.safety_check":"Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a moment to review what's in this folder first.","trust.capabilities":"QitQode will be able to read, edit, and execute files here.","trust.plugin_warn":"If malicious plugins exist in this directory, they can execute arbitrary code, read, modify, or exfiltrate your files.","trust.option.yes":"Yes, I trust this folder","trust.option.no":"No, exit","trust.dangerous.title_home":"WARNING: You are about to open your HOME DIRECTORY.","trust.dangerous.title_root":"WARNING: You are about to open the FILESYSTEM ROOT.","trust.dangerous.body_home":"The model will have access to ALL your personal files \u2014 SSH keys, credentials, browser profiles, and everything else under your home folder.","trust.dangerous.body_root":"The model will have access to the ENTIRE filesystem \u2014 system files, all user data, credentials, and everything on this machine.","trust.dangerous.advice_home":"Unless you have a very specific reason, DO NOT trust your entire home directory.","trust.dangerous.advice_root":"Unless you have a very specific reason, DO NOT trust the filesystem root.","trust.dangerous.option.yes":"I understand the risks, trust for this session","trust.dangerous.option.no":"Exit (recommended)"};
|
|
3
3
|
export{f as yd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Cd as n}from"./chunk-w8d9srv7.js";import{Pd as i}from"./chunk-9xvctnjr.js";import{Xg as r}from"./chunk-sv1s1qxd.js";import{Ih as K,Jh as X,Zg as y,_g as w,ch as R}from"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{Mk as g,ak as V,bk as W,ek as C,gl as J,mk as M,rl as Y,sl as F}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import{_l as E,am as u}from"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import{st as U}from"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import{lu as z,mu as B,nu as _,pu as H}from"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import{Ku as S}from"./chunk-kmtfdky8.js";import{_u as oo}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{LL as x,UI as d}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{lQ as v,mQ as P}from"./chunk-4sazy0nq.js";import{EOL as to}from"os";var I=i({command:"config",describe:"show resolved configuration",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(F.Service.use((e)=>e.get()));process.stdout.write(JSON.stringify(o,null,2)+to)})}});import{EOL as b}from"os";var io=i({command:"search <query>",describe:"search files by query",builder:(o)=>o.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.search({query:o.query})));process.stdout.write(e.join(b)+b)})}}),ro=i({command:"read <path>",describe:"read file contents as JSON",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.read(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),no=i({command:"status",describe:"show file status information",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(w.Service.use((e)=>e.status()));process.stdout.write(JSON.stringify(o,null,2)+b)})}}),so=i({command:"list <path>",describe:"list files in a directory",builder:(o)=>o.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(w.Service.use((t)=>t.list(o.path)));process.stdout.write(JSON.stringify(e,null,2)+b)})}}),mo=i({command:"tree [dir]",describe:"show directory tree",builder:(o)=>o.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:o.dir,limit:200})));console.log(JSON.stringify(e,null,2))})}}),L=i({command:"file",describe:"file system debugging utilities",builder:(o)=>o.command(ro).command(no).command(so).command(io).command(mo).demandCommand(),async handler(){}});import{EOL as A}from"os";var q=i({command:"lsp",describe:"LSP debugging utilities",builder:(o)=>o.command(ao).command(co).command(lo).demandCommand(),async handler(){}}),ao=i({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(o)=>o.positional("file",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(C.Service.use((t)=>d.gen(function*(){return yield*t.touchFile(o.file,!0),yield*d.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(e,null,2)+A)})}}),co=i({command:"symbols <query>",describe:"search workspace symbols",builder:(o)=>o.positional("query",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.workspaceSymbol(o.query)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}}),lo=i({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(o)=>o.positional("uri",{type:"string",demandOption:!0}),async handler(o){await n(process.cwd(),async()=>{let s=[];try{const e=v(s,S.Default.time("document-symbols"),0);let t=await r.runPromise(C.Service.use((m)=>m.documentSymbol(o.uri)));process.stdout.write(JSON.stringify(t,null,2)+A)}catch(a){var c=a,l=1}finally{P(s,c,l)}})}});import{EOL as O}from"os";var k=i({command:"rg",describe:"ripgrep debugging utilities",builder:(o)=>o.command(po).command(uo).command(fo).demandCommand(),async handler(){}}),po=i({command:"tree",describe:"show file tree using ripgrep",builder:(o)=>o.option("limit",{type:"number"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.tree({cwd:u.directory,limit:o.limit})));process.stdout.write(e+O)})}}),uo=i({command:"files",describe:"list files using ripgrep",builder:(o)=>o.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(d.gen(function*(){return yield*(yield*y.Service).files({cwd:u.directory,glob:o.glob?[o.glob]:void 0}).pipe(x.take(o.limit??1/0),x.runCollect,d.map((s)=>[...s]))}));process.stdout.write(e.join(O)+O)})}}),fo=i({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(o)=>o.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(o){await n(process.cwd(),async()=>{let e=await r.runPromise(y.Service.use((t)=>t.search({cwd:u.directory,pattern:o.pattern,glob:o.glob,limit:o.limit})));process.stdout.write(JSON.stringify(e.items,null,2)+O)})}});import{EOL as yo}from"os";var T=i({command:"scrap",describe:"list all known projects",builder:(o)=>o,async handler(){let o=S.Default.time("scrap"),e=await E.list();process.stdout.write(JSON.stringify(e,null,2)+yo),o.stop()}});import{EOL as go}from"os";var $=i({command:"skill",describe:"list all available skills",builder:(o)=>o,async handler(){await n(process.cwd(),async()=>{let o=await r.runPromise(d.gen(function*(){return yield*(yield*R.Service).all()}));process.stdout.write(JSON.stringify(o,null,2)+go)})}});var j=i({command:"snapshot",describe:"snapshot debugging utilities",builder:(o)=>o.command(bo).command(wo).command(So).demandCommand(),async handler(){}}),D=(o)=>n(process.cwd(),async()=>{console.log(await r.runPromise(M.Service.use(o)))}),G=(o)=>o.positional("hash",{type:"string",description:"hash",demandOption:!0}),bo=i({command:"track",describe:"track current snapshot state",async handler(){await D((o)=>o.track())}}),wo=i({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:G,async handler(o){await D((e)=>e.patch(o.hash))}}),So=i({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:G,async handler(o){await D((e)=>e.diff(o.hash))}});import{EOL as h}from"os";import{basename as ho}from"path";var Z=i({command:"agent <name>",describe:"show agent configuration details",builder:(o)=>o.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(o){await n(process.cwd(),async()=>{let e=o.name,t=await r.runPromise(X.Service.use((m)=>m.get(e)));if(!t)process.stderr.write(`Agent ${e} not found, run '${ho(process.execPath)} agent list' to get an agent list`+h),process.exit(1);let s=await Co(t),a=await Oo(t,s),c=o.tool;if(c){let m=s.find((eo)=>eo.id===c);if(!m)process.stderr.write(`Tool ${c} not found for agent ${e}`+h),process.exit(1);if(a[c]===!1)process.stderr.write(`Tool ${c} is disabled for agent ${e}`+h),process.exit(1);let p=vo(o.params),f=await Po(t),N=await m.execute(p,f);process.stdout.write(JSON.stringify({tool:c,input:p,result:N},null,2)+h);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+h)})}});async function Co(o){return r.runPromise(d.gen(function*(){let e=yield*J.Service,t=yield*K.Service,s=o.model??(yield*e.defaultModel());return yield*t.tools({...s,agent:o})}))}async function Oo(o,e){let t=g.disabled(e.map((a)=>a.id),o.permission),s={};for(let a of e)s[a.id]=!t.has(a.id);return s}function vo(o){if(!o)return{};let e=o.trim();if(e.length===0)return{};let t=(()=>{try{return JSON.parse(e)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function Po(o){let{session:e,messageID:t}=await r.runPromise(d.gen(function*(){let a=yield*Y.Service,c=yield*a.create({title:`Debug tool run (${o.name})`}),l=V.ascending(),m=o.model?o.model:yield*d.gen(function*(){return yield*(yield*J.Service).defaultModel()}),p=Date.now(),f={id:l,sessionID:c.id,role:"assistant",time:{created:p},parentID:l,modelID:m.modelID,providerID:m.providerID,mode:"debug",agent:o.name,path:{cwd:u.directory,root:u.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(f),{session:c,messageID:l}})),s=g.merge(o.permission,e.permission??[]);return{sessionID:e.id,messageID:t,callID:W.ascending(),agent:o.name,abort:new AbortController().signal,messages:[],metadata:()=>d.void,ask(a){return d.sync(()=>{for(let c of a.patterns)if(g.evaluate(a.permission,c,s).action==="deny")throw new g.DeniedError({ruleset:s})})}}}var Q=i({command:"worker-smoke",describe:"start the TUI background worker and verify it initialises",builder:(o)=>o.option("timeout",{type:"number",describe:"milliseconds to wait for the worker to answer",default:30000}),handler:async(o)=>{let e=typeof globalThis.QITQODE_WORKER_PATH<"u"?globalThis.QITQODE_WORKER_PATH:new URL("../tui/worker.ts",import.meta.url),t=H({[B]:"worker",[z]:_()}),s=new Worker(e,{env:t}),a=new Promise((m,p)=>{s.onerror=(f)=>{p(Error(`worker crashed during startup: ${f.message||String(f.error??"unknown error")}`))},s.addEventListener("close",()=>{p(Error("worker exited before answering ping"))})}),c=new Promise((m,p)=>{setTimeout(()=>p(Error(`worker did not answer ping within ${o.timeout}ms`)),o.timeout)}),l=U(s);try{let m=await Promise.race([l.call("ping",void 0),a,c]);if(m!=="pong")throw Error(`worker answered ping with unexpected reply: ${JSON.stringify(m)}`);console.log("worker initialised: ping ok"),process.exit(0)}catch(m){console.error(m instanceof Error?m.message:String(m)),process.exit(1)}}});var Be=i({command:"debug",describe:"debugging and troubleshooting tools",builder:(o)=>o.command(I).command(q).command(k).command(L).command(T).command($).command(j).command(Z).command(Q).command(Ao).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await n(process.cwd(),async()=>{await new Promise((e)=>setTimeout(e,86400000))})}}).demandCommand(),async handler(){}}),Ao=i({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[o,e]of Object.entries(oo.Path))console.log(o.padEnd(10),e)}});export{Be as DebugCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cd as j}from"./chunk-
|
|
2
|
+
import{Cd as j}from"./chunk-w8d9srv7.js";import{Pd as Q}from"./chunk-9xvctnjr.js";import{Sf as M}from"./chunk-9s4whpg1.js";import{lg as N}from"./chunk-m0xsvzyd.js";import{Xg as $}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as J,rl as X}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import{Cp as _}from"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import{qt as Z}from"./chunk-cxtxvt43.js";import{zt as E}from"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import{Bu as Y}from"./chunk-kmtfdky8.js";import{Vu as V}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import{EOL as L}from"os";import k from"path";function P(){let q=["-R","-S"];if(process.platform!=="win32")return["less",...q];let z=_("less");if(z){if(V.stat(z)?.size)return[z,...q]}if(Y.QITQODE_GIT_BASH_PATH){let G=k.join(Y.QITQODE_GIT_BASH_PATH,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}let B=_("git");if(B){let G=k.join(B,"..","..","usr","bin","less.exe");if(V.stat(G)?.size)return[G,...q]}return["cmd","/c","more"]}var g=Q({command:"session",describe:"manage sessions",builder:(q)=>q.command(T).command(D).command(v).demandCommand(),async handler(){}}),v=Q({command:"import-claude",describe:"import Claude Code sessions (~/.claude/projects) into qitqode",builder:(q)=>q.option("force",{describe:"re-sync every session, ignoring the mtime cache",type:"boolean",default:!1}),handler:async(q)=>{let z=await N.run({force:q.force});M.println(`Claude import: scanned ${z.scanned}, imported ${z.imported}, resynced ${z.resynced}, skipped ${z.skipped}`+(z.errors.length?`, errors ${z.errors.length}`:""));for(let B of z.errors)M.error(B)}}),D=Q({command:"delete <sessionID>",describe:"delete a session",builder:(q)=>{return q.positional("sessionID",{describe:"session ID to delete",type:"string",demandOption:!0})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=J.make(q.sessionID);try{await $.runPromise(X.Service.use((B)=>B.get(z)))}catch{M.error(`Session not found: ${q.sessionID}`),process.exit(1)}await $.runPromise(X.Service.use((B)=>B.remove(z))),M.println(M.Style.TEXT_SUCCESS_BOLD+`Session ${q.sessionID} deleted`+M.Style.TEXT_NORMAL)})}}),T=Q({command:"list",describe:"list sessions",builder:(q)=>{return q.option("max-count",{alias:"n",describe:"limit to N most recent sessions",type:"number"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"})},handler:async(q)=>{await j(process.cwd(),async()=>{let z=[...X.list({roots:!0,limit:q.maxCount})];if(z.length===0)return;let B;if(q.format==="json")B=f(z);else B=b(z);if(process.stdout.isTTY&&!q.maxCount&&q.format==="table"){let H=E.spawn(P(),{stdin:"pipe",stdout:"inherit",stderr:"inherit"});if(!H.stdin){console.log(B);return}H.stdin.write(B),H.stdin.end(),await H.exited}else console.log(B)})}});function b(q){let z=[],B=Math.max(20,...q.map((K)=>K.id.length)),G=Math.max(25,...q.map((K)=>K.title.length)),H=`Session ID${" ".repeat(B-10)} Title${" ".repeat(G-5)} Updated`;z.push(H),z.push("\u2500".repeat(H.length));for(let K of q){let A=Z.truncate(K.title,G),R=Z.todayTimeOrDateTime(K.time.updated),w=`${K.id.padEnd(B)} ${A.padEnd(G)} ${R}`;z.push(w)}return z.join(L)}function f(q){let z=q.map((B)=>({id:B.id,title:B.title,updated:B.time.updated,created:B.time.created,projectId:B.projectID,directory:B.directory}));return JSON.stringify(z,null,2)}export{T as SessionListCommand,v as SessionImportClaudeCommand,D as SessionDeleteCommand,g as SessionCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Bp as G$}from"./chunk-45mjcxqk.js";import{vt as A$}from"./chunk-
|
|
2
|
+
import{Bp as G$}from"./chunk-45mjcxqk.js";import{vt as A$}from"./chunk-871f8x99.js";import{At as k$}from"./chunk-cx7p4ezk.js";import{Lu as Y$,Mu as U$,Ou as CZ,Pu as KZ}from"./chunk-vc4e6xc4.js";import{$u as SZ}from"./chunk-hnz570f9.js";import{AF as Z$,CJ as V$,CL as PZ,DH as IZ,DL as lZ,FK as d,GH as zZ,GI as p,HF as $$,HK as m,HL as cZ,IF as E,KB as L,KF as WZ,LB as eZ,LF as q$,LL as v,NB as ZZ,NL as B$,PB as oZ,UI as P,VL as F$,XG as $Z,YG as LZ,ZG as qZ,ZH as xZ,_G as f,_H as Q$,_K as DZ,aD as gZ,aH as jZ,cH as D$,cL as C,dH as i,gH as J$,jH as o,kG as z$,kL as r,lC as kZ,lH as l,pC as rZ,pG as RZ,pH as h,pL as X$,qC as sZ,qH as K$,rB as a,sH as c,sI as EZ,tH as vZ,uL as JZ,xL as fZ,yL as iZ,zJ as YZ}from"./chunk-ydc6ypjt.js";import{gQ as u$,iQ as BZ,kQ as h$}from"./chunk-4sazy0nq.js";var pZ={};BZ(pZ,{makeHandle:()=>AZ,make:()=>GZ,ProcessId:()=>UZ,ExitCode:()=>FZ,ChildProcessSpawner:()=>W});var FZ=YZ(),UZ=YZ(),hZ="~effect/ChildProcessSpawner/ChildProcessHandle",j$={[hZ]:hZ,...kZ,toJSON(){return{_id:"ChildProcessHandle",pid:this.pid}}},AZ=(Z)=>Object.assign(Object.create(j$),Z),GZ=(Z)=>{let q=(B,Q)=>Z(B).pipe(h((U)=>fZ(Q?.includeStderr===!0?U.all:U.stdout)),r),z=(B,Q)=>iZ(q(B,Q));return W.of({spawn:Z,exitCode:(B)=>xZ(o(Z(B),(Q)=>Q.exitCode)),streamString:q,streamLines:z,lines:(B,Q)=>lZ(z(B,Q)),string:(B,Q)=>cZ(q(B,Q))})};class W extends gZ()("effect/process/ChildProcessSpawner"){}var x={};BZ(x,{setEnv:()=>HZ,setCwd:()=>yZ,prefix:()=>C$,pipeTo:()=>P$,parseFdName:()=>g,make:()=>k,isStandardCommand:()=>I$,isPipedCommand:()=>E$,isCommand:()=>s,fdName:()=>NZ});var MZ="~effect/unstable/process/ChildProcess",aZ={...rZ,...sZ,[MZ]:MZ,asEffect(){return W.use((Z)=>Z.spawn(this))}},s=(Z)=>oZ(Z,MZ),I$=(Z)=>Z._tag==="StandardCommand",E$=(Z)=>Z._tag==="PipedCommand",I=(Z,q,z)=>Object.assign(Object.create(aZ),{_tag:"StandardCommand",command:Z,args:q,options:z}),e=(Z,q,z={})=>Object.assign(Object.create(aZ),{_tag:"PipedCommand",left:Z,right:q,options:z}),k=function(...q){if(OZ(q[0])){let[U,...A]=q,G=bZ(U,A);return I(G[0]??"",G.slice(1),{})}if(typeof q[0]==="object"&&!Array.isArray(q[0])&&!OZ(q[0])){let U=q[0];return function(A,...G){let b=bZ(A,G);return I(b[0]??"",b.slice(1),U)}}if(typeof q[0]==="string"&&!Array.isArray(q[1])){let[U,A={}]=q;return I(U,[],A)}let[z,B=[],Q={}]=q;return I(z,B,Q)},P$=a((Z)=>s(Z[0])&&s(Z[1]),(Z,q,z)=>e(Z,q,z??{})),C$=function(...q){if(s(q[0])&&q.length>1){let[B,...Q]=q,U=dZ(Q);return _Z(B,U)}let z=dZ(q);return(B)=>_Z(B,z)},dZ=(Z)=>{if(OZ(Z[0])){let[B,...Q]=Z,U=bZ(B,Q);return{command:U[0]??"",args:U.slice(1)}}let[q,z=[]]=Z;return{command:q,args:z}},_Z=(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(q.command,[...q.args,Z.command,...Z.args],Z.options);case"PipedCommand":return e(_Z(Z.left,q),Z.right,Z.options)}},yZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(Z.command,Z.args,{...Z.options,cwd:q});case"PipedCommand":return e(yZ(Z.left,q),yZ(Z.right,q),Z.options)}}),HZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":{let z=Z.options.env===void 0?q:{...Z.options.env,...q};return I(Z.command,Z.args,{...Z.options,env:z})}case"PipedCommand":return e(HZ(Z.left,q),HZ(Z.right,q),Z.options)}}),OZ=(Z)=>Array.isArray(Z)&&("raw"in Z)&&Array.isArray(Z.raw),g=(Z)=>{let q=/^fd(\d+)$/.exec(Z);if(q===null)return;let z=parseInt(q[1],10);return z>=3?z:void 0},NZ=(Z)=>`fd${Z}`,bZ=(Z,q)=>{let z=[];for(let[B,Q]of Z.entries())z=S$(Z,q,z,Q,B);return z},S$=(Z,q,z,B,Q)=>{let U=Z.raw[Q];if(U===void 0)throw Error(`Invalid backslash sequence: ${Z.raw[Q]}`);let{hasLeadingWhitespace:A,hasTrailingWhitespace:G,tokens:b}=w$(B,U),N=nZ(z,b,A);if(Q===q.length)return N;let S=q[Q],QZ=Array.isArray(S)?S.map((VZ)=>mZ(VZ)):[mZ(S)];return nZ(N,QZ,G)},mZ=(Z)=>{if(typeof Z==="string")return Z;return String(Z)},tZ=new Set([" ","\t","\r",`
|
|
3
3
|
`]),T$={x:3,u:5},w$=(Z,q)=>{if(q.length===0)return{tokens:[],hasLeadingWhitespace:!1,hasTrailingWhitespace:!1};let z=tZ.has(q[0]),B=[],Q=0;for(let A=0,G=0;A<Z.length;A+=1,G+=1){let b=q[G];if(tZ.has(b)){if(Q!==A)B.push(Z.slice(Q,A));Q=A+1}else if(b==="\\"){let N=q[G+1];if(N===`
|
|
4
|
-
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return V$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=D$(function*(){let Z=yield*B$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...A$(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return K$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:X$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=$$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,q$(K,Z$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return J$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return eZ(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*Q$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=z$(W,f$),l$=i$.pipe(RZ(Y$.layer),RZ(U$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-
|
|
4
|
+
`)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return V$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=D$(function*(){let Z=yield*B$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...A$(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return K$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:X$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=$$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,q$(K,Z$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return J$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return eZ(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*Q$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=z$(W,f$),l$=i$.pipe(RZ(Y$.layer),RZ(U$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-4dtkj9zg.js");return Z(W,l$)});var H$=(Z,q)=>P.gen(function*(){let z=yield*Z.spawn(q),[B,Q]=yield*P.all([v.mkString(v.decodeText(z.stdout)),v.mkString(v.decodeText(z.stderr))],{concurrency:2});return{code:yield*z.exitCode,text:B,stderr:Q}}).pipe(P.scoped),Mq=H$,_q=(Z,q,z)=>H$(Z,x.make("git",q,{cwd:z?.cwd,extendEnv:!0,stdin:"ignore"}));var TZ={};BZ(TZ,{payloads:()=>p$,define:()=>c$,BusEvent:()=>TZ});var O$=new Map;function c$(Z,q){let z={type:Z,properties:q};return O$.set(Z,z),z}function p$(){return O$.entries().map(([Z,q])=>{return SZ.object({type:SZ.literal(Z),properties:q.properties}).meta({ref:`Event.${q.type}`})}).toArray()}
|
|
5
5
|
export{W as fm,pZ as gm,x as hm,l$ as im,H$ as jm,Mq as km,_q as lm,TZ as mm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{zg as a}from"./chunk-
|
|
2
|
+
import{zg as a}from"./chunk-m6zxr0j8.js";import{Mg as t,Xg as c}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import{$u as i}from"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var n=i.object({name:a.shape.name,branch:a.shape.branch.unwrap(),directory:a.shape.directory.unwrap()}),d={name:"Worktree",description:"Create a git worktree",async configure(e){let r=await c.runPromise(t.Service.use((o)=>o.makeWorktreeInfo()));return{...e,name:r.name,branch:r.branch,directory:r.directory}},async create(e){let r=n.parse(e);await c.runPromise(t.Service.use((o)=>o.createFromInfo({name:r.name,directory:r.directory,branch:r.branch})))},async remove(e){let r=n.parse(e);await c.runPromise(t.Service.use((o)=>o.remove({directory:r.directory})))},target(e){return{type:"local",directory:n.parse(e).directory}}};export{d as WorktreeAdaptor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Dd as T,Fd as q,Gd as N,Hd as w,Id as X,Ld as D}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Sf as Q}from"./chunk-9s4whpg1.js";import{Xg as A}from"./chunk-
|
|
2
|
+
import{Dd as T,Fd as q,Gd as N,Hd as w,Id as X,Ld as D}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Sf as Q}from"./chunk-9s4whpg1.js";import{Xg as A}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-rtdym35y.js";import{ul as $}from"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import{zt as _}from"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import{Vu as Y,_u as W}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import V from"fs/promises";import L from"path";import R from"os";var g={command:"uninstall",describe:"uninstall qitqode and remove all related files",builder:(j)=>j.option("keep-config",{alias:"c",type:"boolean",describe:"keep configuration files",default:!1}).option("keep-data",{alias:"d",type:"boolean",describe:"keep session data and snapshots",default:!1}).option("dry-run",{type:"boolean",describe:"show what would be removed without removing",default:!1}).option("force",{alias:"f",type:"boolean",describe:"skip confirmation prompts",default:!1}),handler:async(j)=>{Q.empty(),Q.println(Q.logo(" ")),Q.empty(),w("Uninstall QitQode");let B=await A.runPromise($.Service.use((J)=>J.method()));N.info(`Installation method: ${B}`);let E=await v(j,B);if(await z(E,B),!j.force&&!j.dryRun){let J=await q({message:"Are you sure you want to uninstall?",initialValue:!1});if(!J||T(J)){X("Cancelled");return}}if(j.dryRun){N.warn("Dry run - no changes made"),X("Done");return}await G(B,E),X("Done")}};async function v(j,B){let E=[{path:W.Path.data,label:"Data",keep:j.keepData},{path:W.Path.cache,label:"Cache",keep:!1},{path:W.Path.config,label:"Config",keep:j.keepConfig},{path:W.Path.state,label:"State",keep:!1}],J=B==="curl"?await P():null,H=B==="curl"?process.execPath:null;return{directories:E,shellConfig:J,binary:H}}async function z(j,B){N.message("The following will be removed:");for(let E of j.directories){if(!await V.access(E.path).then(()=>!0).catch(()=>!1))continue;let H=await F(E.path),K=S(H),O=E.keep?Q.Style.TEXT_DIM+"(keeping)":"",M=E.keep?"\u25CB":"\u2713";N.info(` ${M} ${E.label}: ${Z(E.path)} ${Q.Style.TEXT_DIM}(${K})${O}`)}if(j.binary)N.info(` \u2713 Binary: ${Z(j.binary)}`);if(j.shellConfig)N.info(` \u2713 Shell PATH in ${Z(j.shellConfig)}`);if(B!=="curl"&&B!=="unknown"){let E={npm:"npm uninstall -g @qitqode/cli",pnpm:"pnpm uninstall -g @qitqode/cli",bun:"bun remove -g @qitqode/cli"};N.info(` \u2713 Package: ${E[B]||B}`)}}async function G(j,B){let E=D(),J=[];for(let H of B.directories){if(H.keep){N.step(`Skipping ${H.label} (--keep-${H.label.toLowerCase()})`);continue}if(!await V.access(H.path).then(()=>!0).catch(()=>!1))continue;E.start(`Removing ${H.label}...`);let O=await V.rm(H.path,{recursive:!0,force:!0}).catch((M)=>M);if(O){E.stop(`Failed to remove ${H.label}`,1),J.push(`${H.label}: ${O.message}`);continue}E.stop(`Removed ${H.label}`)}if(B.shellConfig){E.start("Cleaning shell config...");let H=await k(B.shellConfig).catch((K)=>K);if(H)E.stop("Failed to clean shell config",1),J.push(`Shell config: ${H.message}`);else E.stop("Cleaned shell config")}if(j!=="curl"&&j!=="unknown"){let K={npm:["npm","uninstall","-g","@qitqode/cli"],pnpm:["pnpm","uninstall","-g","@qitqode/cli"],bun:["bun","remove","-g","@qitqode/cli"]}[j];if(K){E.start(`Running ${K.join(" ")}...`);let O=await _.run(K,{nothrow:!0});if(O.code!==0)E.stop(`Package manager uninstall failed: exit code ${O.code}`,1),N.warn(`You may need to run manually: ${K.join(" ")}`);else E.stop("Package removed")}else N.warn(`Uninstall not supported for method "${j}" yet, skipping package removal`)}if(j==="curl"&&B.binary){Q.empty(),N.message("To finish removing the binary, run:"),N.info(` rm "${B.binary}"`);let H=L.dirname(B.binary);if(H.includes(".qitqode"))N.info(` rmdir "${H}" 2>/dev/null`)}if(J.length>0){Q.empty(),N.warn("Some operations failed:");for(let H of J)N.error(` ${H}`)}Q.empty(),N.success("Thank you for using QitQode!")}async function P(){let j=L.basename(process.env.SHELL||"bash"),B=R.homedir(),E=process.env.XDG_CONFIG_HOME||L.join(B,".config"),J={fish:[L.join(E,"fish","config.fish")],zsh:[L.join(B,".zshrc"),L.join(B,".zshenv"),L.join(E,"zsh",".zshrc"),L.join(E,"zsh",".zshenv")],bash:[L.join(B,".bashrc"),L.join(B,".bash_profile"),L.join(B,".profile"),L.join(E,"bash",".bashrc"),L.join(E,"bash",".bash_profile")],ash:[L.join(B,".ashrc"),L.join(B,".profile")],sh:[L.join(B,".profile")]},H=J[j]||J.bash;for(let K of H){if(!await V.access(K).then(()=>!0).catch(()=>!1))continue;let M=await Y.readText(K).catch(()=>"");if(M.includes("# qitqode")||M.includes(".qitqode/bin"))return K}return null}async function k(j){let E=(await Y.readText(j)).split(`
|
|
3
3
|
`),J=[],H=!1;for(let O of E){let M=O.trim();if(M==="# qitqode"){H=!0;continue}if(H){if(H=!1,M.includes(".qitqode/bin")||M.includes("fish_add_path"))continue}if(M.startsWith("export PATH=")&&M.includes(".qitqode/bin")||M.startsWith("fish_add_path")&&M.includes(".qitqode"))continue;J.push(O)}while(J.length>0&&J[J.length-1].trim()==="")J.pop();let K=J.join(`
|
|
4
4
|
`)+`
|
|
5
5
|
`;await Y.write(j,K)}async function F(j){let B=0,E=async(J)=>{let H=await V.readdir(J,{withFileTypes:!0}).catch(()=>[]);for(let K of H){let O=L.join(J,K.name);if(K.isDirectory()){await E(O);continue}if(K.isFile()){let M=await V.stat(O).catch(()=>null);if(M)B+=M.size}}};return await E(j),B}function S(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;if(j<1073741824)return`${(j/1048576).toFixed(1)} MB`;return`${(j/1073741824).toFixed(1)} GB`}function Z(j){let B=R.homedir();if(j===B||j.startsWith(B+L.sep))return"~"+j.slice(B.length);return j}export{g as UninstallCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{rl as a}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{a as Session};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ot as A}from"./chunk-3sz6gw10.js";import{Qt as B}from"./chunk-
|
|
2
|
+
import{Ot as A}from"./chunk-3sz6gw10.js";import{Qt as B}from"./chunk-twhavv1m.js";import{ru as O,su as Q,tu as X}from"./chunk-2pzvcpv4.js";function W(j,z){return typeof j==="object"&&j!==null&&"_tag"in j&&j._tag===z}function f(j){let z=O(j),J=typeof j==="object"&&j!==null&&"name"in j&&typeof j.name==="string"?j.name:z?.errorName,K=typeof j==="object"&&j!==null&&"data"in j&&typeof j.data==="object"&&j.data!==null&&"message"in j.data&&typeof j.data.message==="string"?j.data.message:void 0;if(J==="UnknownError"||z){let v=z??Q(j,J??"UnknownError"),G=K&&!K.startsWith("{")?K:"QitQode could not explain this failure.",L=v?` [${v.errorName}, error id ${v.errorID}${v.logFile?`; log: ${v.logFile}`:""}]`:"";return G+L}if(A.hasName(j,"MCPFailed"))return`MCP server "${j.data?.name}" failed. Note, qitqode does not support MCP authentication yet.`;if(W(j,"AccountServiceError")||W(j,"AccountTransportError"))return j.message??"";if(A.hasName(j,"ProviderModelNotFoundError")){let v=j.data,G=Array.isArray(v?.suggestions)?v.suggestions:[];return[`Model not found: ${v?.providerID}/${v?.modelID}`,...G.length?["Did you mean: "+G.join(", ")]:[],"Try: `qitqode models` to list available models","Or check your config (qitqode.json) provider/model names"].join(`
|
|
3
3
|
`)}if(A.hasName(j,"ProviderInitError"))return`Failed to initialize provider "${j.data?.providerID}". Check credentials and configuration.`;if(A.hasName(j,"ConfigJsonError")){let v=j.data;return`Config file at ${v?.path} is not valid JSON(C)`+(v?.message?`: ${v.message}`:"")}if(A.hasName(j,"ConfigDirectoryTypoError")){let v=j.data;return`Directory "${v?.dir}" in ${v?.path} is not valid. Rename the directory to "${v?.suggestion}" or remove it. This is a common typo.`}if(A.hasName(j,"ConfigFrontmatterError"))return j.data?.message??"";if(A.hasName(j,"ConfigInvalidError")){let v=j.data,G=v?.path,L=v?.message,Y=Array.isArray(v?.issues)?v.issues:[];return[`Configuration is invalid${G&&G!=="config"?` at ${G}`:""}`+(L?`: ${L}`:""),...Y.map((V)=>"\u21B3 "+V.message+" "+V.path.join("."))].join(`
|
|
4
4
|
`)}if(A.hasName(j,"UICancelledError"))return"";let H=typeof j==="object"&&j!==null&&"name"in j?j.name:void 0;if(H==="QlexNotLoggedInError")return B.copy().notLoggedIn;if(H==="QlexInsufficientBalanceError")return(j.message??B.copy().insufficientBalanceFallback)+B.copy().insufficientBalanceCliSuffix;if(H==="QlexRateLimitError")return B.copy().rateLimit;if(H==="BackendInsufficientBalanceError")return(j.message??B.copy().insufficientBalanceFallback)+B.copy().insufficientBalanceCliSuffix;if(H==="BackendRateLimitError")return j.message??B.copy().rateLimit;if(H==="QlexInvalidCredentialsError")return j.message??B.copy().invalidCredentialsFallback}function q(j){let z=O(j)??Q(j);return`${X(j)}${z?` [${z.errorName}, error id ${z.errorID}; log: ${z.logFile}]`:""}`}function U({onlyFirst:j=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",j?void 0:"g")}var Z=U();function _(j){if(typeof j!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof j}\``);return j.replace(Z,"")}
|
|
5
5
|
export{_ as Gf,f as Hf,q as If};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{o as L}from"./chunk-
|
|
2
|
+
import{o as L}from"./chunk-dz3s882k.js";import"./chunk-nhwhkx62.js";import{A as K}from"./chunk-k7n1csxv.js";import{B as N}from"./chunk-gsez13bg.js";import{C as F,E as J}from"./chunk-c8k32724.js";import"./chunk-z0tfsdb9.js";import"./chunk-a9y27zd2.js";import"./chunk-6r8pg6ma.js";import{N as M}from"./chunk-qpzspr9z.js";import"./chunk-jf6ry79j.js";import"./chunk-px8vtbmr.js";import"./chunk-fn8191ps.js";import"./chunk-5kmfnkzv.js";import"./chunk-jcjaw7tk.js";import{Pd as B}from"./chunk-9xvctnjr.js";import"./chunk-1mcsf4yb.js";import"./chunk-txqc7543.js";import"./chunk-j5kyf7vt.js";import{Sf as z}from"./chunk-9s4whpg1.js";import"./chunk-ws3p9cya.js";import"./chunk-qq2rcxv2.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-tzrbb0e8.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var x=B({command:"attach <url>",describe:"attach to a running qitqode server",builder:(j)=>j.positional("url",{type:"string",describe:"http://localhost:4096",demandOption:!0}).option("dir",{type:"string",description:"directory to run in"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],type:"string",describe:"session id to continue"}).option("fork",{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}),handler:async(j)=>{let Q=J();try{F();let q=N(j);if(q){z.error(q),process.exitCode=1;return}let R=(()=>{if(!j.dir)return;try{return process.chdir(j.dir),process.cwd()}catch{return j.dir}})(),S=M({password:j.password}),V=await K.get();await L({url:j.url,config:V,args:{continue:j.continue,sessionID:j.session,fork:j.fork},directory:R,headers:S})}finally{Q?.()}}});export{x as AttachCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{n as a,o as b}from"./chunk-dz3s882k.js";import"./chunk-nhwhkx62.js";import"./chunk-k7n1csxv.js";import"./chunk-c8k32724.js";import"./chunk-z0tfsdb9.js";import"./chunk-a9y27zd2.js";import"./chunk-6r8pg6ma.js";import"./chunk-jf6ry79j.js";import"./chunk-px8vtbmr.js";import"./chunk-fn8191ps.js";import"./chunk-5kmfnkzv.js";import"./chunk-jcjaw7tk.js";import"./chunk-1mcsf4yb.js";import"./chunk-txqc7543.js";import"./chunk-j5kyf7vt.js";import"./chunk-9s4whpg1.js";import"./chunk-ws3p9cya.js";import"./chunk-qq2rcxv2.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-tzrbb0e8.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{b as tui,a as rendererConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A as g,u as a,v as b,w as c,x as d,y as e,z as f}from"./chunk-
|
|
2
|
+
import{A as g,u as a,v as b,w as c,x as d,y as e,z as f}from"./chunk-k7n1csxv.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-3sz6gw10.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{e as waitForDependencies,c as layer,f as get,d as defaultLayer,g as TuiConfig,b as Service,a as Info};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{So as E,To as c,Uo as M,Vo as i}from"./chunk-17pxm5d3.js";import{Xo as g,Zo as n,_o as k,bp as d,cp as u,qp as e,rp as _0,sp as I,tp as O0}from"./chunk-n38h109k.js";import{Ap as r}from"./chunk-qdcf1ay5.js";import{$t as y,Wt as G}from"./chunk-v0yxkq99.js";import{qu as s}from"./chunk-2pzvcpv4.js";import{Bu as X,Ku as o}from"./chunk-kmtfdky8.js";import{Ru as x,Vu as K,_u as T}from"./chunk-vc4e6xc4.js";import{$u as j}from"./chunk-hnz570f9.js";import{HP as A,UI as w,aK as f,nD as v,rG as L}from"./chunk-ydc6ypjt.js";import{iQ as p}from"./chunk-4sazy0nq.js";var F={};p(F,{waitForDependencies:()=>M0,layer:()=>V0,get:()=>R0,defaultLayer:()=>W0,TuiConfig:()=>F,Service:()=>z,Info:()=>Z0});import l from"path";var J={};p(J,{Keybinds:()=>B0,ConfigKeybinds:()=>J});var _=(O,Z)=>A.String.pipe(A.optional,A.withDecodingDefault(w.succeed(O))).annotate({description:Z}),j0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",w0=A.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(j0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("<leader>right","Go to next child session"),session_child_cycle_reverse:_("<leader>left","Go to previous child session"),session_parent:_("<leader>up","Go to parent session"),session_main:_("<leader>escape","Back to the main conversation"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),B0=r(w0);var K0=j.object(Object.fromEntries(Object.keys(J.Keybinds.shape).map((O)=>[O,j.string().optional()]))).strict(),R=j.object({scroll_speed:j.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:j.object({enabled:j.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:j.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:j.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:j.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:j.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:j.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:j.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=j.object({$schema:j.string().optional(),theme:j.string().optional(),keybinds:K0.optional(),plugin:M.Spec.zod.array().optional(),plugin_enabled:j.record(j.string(),j.boolean()).optional()}).extend(R.shape).strict();var D=o.create({service:"tui.migrate"}),X0="https://qitqode.com/tui.json",Y0=P.shape.theme.optional(),b=j.record(j.string(),j.unknown()).optional(),H0=j.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function t(O){let Z=await G0(O);for(let V of Z){let $=await K.readText(V).catch((m)=>{D.warn("failed to read config for tui migration",{path:V,error:m});return});if(!$)continue;let Q=[],B=g($,Q,{allowTrailingComma:!0});if(Q.length||!B||typeof B!=="object"||Array.isArray(B))continue;let W=Y0.safeParse("theme"in B?B.theme:void 0),Y=b.safeParse("keybinds"in B?B.keybinds:void 0),N=b.safeParse("tui"in B?B.tui:void 0),H={theme:W.success?W.data:void 0,keybinds:Y.success?Y.data:void 0,tui:N.success?N.data:void 0},S=H.tui?J0(H.tui):void 0;if(H.theme===void 0&&H.keybinds===void 0&&!S)continue;let U=l.join(l.dirname(V),"tui.json");if(await K.exists(U))continue;let C={$schema:X0};if(H.theme!==void 0)C.theme=H.theme;if(H.keybinds!==void 0)C.keybinds=H.keybinds;if(S)Object.assign(C,S);if(!await K.write(U,JSON.stringify(C,null,2)).then(()=>!0).catch((m)=>{return D.warn("failed to write tui migration target",{from:V,to:U,error:m}),!1}))continue;if(!await D0(V,$)){D.warn("tui config migrated but source file was not stripped",{from:V,to:U});continue}D.info("migrated tui config",{from:V,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function D0(O,Z){let V=O+".tui-migration.bak";if(!(await K.exists(V)?!0:await K.write(V,Z).then(()=>!0).catch((W)=>{return D.warn("failed to backup source config during tui migration",{path:O,backup:V,error:W}),!1})))return!1;let B=["theme","keybinds","tui"].reduce((W,Y)=>{let N=n(W,[Y],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return W;return k(W,N)},Z);return K.write(O,B).then(()=>{return D.info("stripped tui keys from server config",{path:O,backup:V}),!0}).catch((W)=>{return D.warn("failed to strip legacy tui keys from server config",{path:O,backup:V,error:W}),!1})}async function G0(O){let Z=[...I(T.Path.config,"qitqode"),...await K.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let $ of G(O.directories))Z.push(...I($,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(G(Z).map(async($)=>{return await K.exists($)?$:void 0}))).filter(($)=>!!$)}var a=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var h=o.create({service:"tui.config"}),Z0=P;class z extends v.Service()("@qitqode/TuiConfig"){}function I0(O,Z){if(K.contains(Z.directory,O))return"local";return"global"}function N0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let V=Z.tui;return delete Z.tui,{...V,...Z}}async function U0(O,Z){if(!O.plugin)return O;for(let V=0;V<O.plugin.length;V++)O.plugin[V]=await M.resolvePluginSpec(O.plugin[V],Z);return O}async function q(O,Z,V){let $=await z0(Z);if(O.result=y(O.result,$),!$.plugin?.length)return;let Q=I0(Z,V),B=M.deduplicatePluginOrigins([...O.result.plugin_origins??[],...$.plugin.map((W)=>({spec:W,scope:Q,source:Z}))]);O.result.plugin=B.map((W)=>W.spec),O.result.plugin_origins=B}var A0=w.fn("TuiConfig.loadState")(function*(O){let Z=yield*_0(O.directory);yield*w.promise(()=>t({directories:Z,cwd:O.directory}));let V=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*e("tui",O.directory),$={result:{}};for(let W of I(T.Path.config,"tui"))yield*w.promise(()=>q($,W,O)).pipe(w.orDie);if(X.QITQODE_TUI_CONFIG){let W=X.QITQODE_TUI_CONFIG;yield*w.promise(()=>q($,W,O)).pipe(w.orDie),h.debug("loaded custom tui config",{path:W})}for(let W of V)yield*w.promise(()=>q($,W,O)).pipe(w.orDie);let Q=G(Z).filter((W)=>W.endsWith(".qitqode")||W===X.QITQODE_CONFIG_DIR);for(let W of Q){if(!W.endsWith(".qitqode")&&W!==X.QITQODE_CONFIG_DIR)continue;for(let Y of I(W,"tui"))yield*w.promise(()=>q($,Y,O)).pipe(w.orDie)}let B={...$.result.keybinds??{}};if(process.platform==="win32")B.terminal_suspend="none",B.input_undo??=G(["ctrl+z",...J.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return $.result.keybinds=J.Keybinds.parse(B),{config:$.result,dirs:$.result.plugin?.length?Q:[]}}),V0=L.effect(z,w.gen(function*(){let O=yield*a,Z=yield*u.Service,V=yield*x.Service,$=yield*A0({directory:O}),Q=yield*w.forEach($.dirs,(Y)=>i.install({fs:V,npm:Z,dir:Y}).pipe(w.forkScoped),{concurrency:"unbounded"}),B=w.fn("TuiConfig.get")(()=>w.succeed($.config)),W=w.fn("TuiConfig.waitForDependencies")(()=>w.forEach(Q,f.join,{concurrency:"unbounded"}).pipe(w.ignore(),w.asVoid));return z.of({get:B,waitForDependencies:W})}).pipe(w.withSpan("TuiConfig.layer"))),W0=V0.pipe(L.provide(u.defaultLayer),L.provide(x.defaultLayer)),{runPromise:$0}=d(z,W0);async function M0(){await $0((O)=>O.waitForDependencies())}async function R0(){return $0((O)=>O.get())}async function z0(O){let Z=await O0(O);if(!Z)return{};return C0(Z,O).catch((V)=>{return h.warn("failed to load tui config",{path:O,error:V}),{}})}async function C0(O,Z){return c.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((V)=>E.jsonc(V,Z)).then((V)=>{if(!s(V))return{};return E.schema(Z0,N0(V),Z)}).then((V)=>U0(V,Z)).catch((V)=>{return h.warn("invalid tui config",{path:Z,error:V}),{}})}
|
|
3
|
+
export{Z0 as u,z as v,V0 as w,W0 as x,M0 as y,R0 as z,F as A};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{qs as z,ts as B}from"./chunk-
|
|
2
|
+
import{qs as z,ts as B}from"./chunk-qyjt0qnq.js";import{pt as D}from"./chunk-cxtxvt43.js";import{DA as r}from"./chunk-pqnbdygz.js";import{UI as W,nD as x,rG as R}from"./chunk-ydc6ypjt.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
|
|
3
3
|
export{w as hs,C as is,y as js,U as ks,H as ls,d as ms,F as ns};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{_u as Q}from"./chunk-vc4e6xc4.js";import{$u as u}from"./chunk-hnz570f9.js";import{SP as B}from"./chunk-ydc6ypjt.js";import{iQ as i}from"./chunk-4sazy0nq.js";var Pq={};i(Pq,{redactValue:()=>D,init:()=>Hq,flush:()=>Jq,file:()=>qq,enabled:()=>a,create:()=>h,Level:()=>s,Default:()=>e});import U from"path";import Z from"fs/promises";import{createWriteStream as m}from"fs";var Wq="https://qortex.forgewise.tech/api/v1/qortex/streamTier",Gq=new URL("https://qortex.forgewise.tech/api/v1/qortex/streamTier").origin,_="https://qortex.forgewise.tech/api/v1/qortex/streamTier".replace(/\/streamTier$/,""),Vq={name:"QitQode",family:"qlex",npm:"@qitqode/qlex-provider",limit:{context:200000,output:16384},capabilities:{temperature:!0,reasoning:!1,attachment:!0,toolcall:!0,input:{text:!0,audio:!1,image:!0,video:!1,pdf:!1},output:{text:!0,audio:!1,image:!1,video:!1,pdf:!1},interleaved:!1},release_date:"2025-07-06"};function F(q){return q.replace(/provider\s+'[^']*'\s*(?:stream\s+)?(?:failed|error)?\s*:?\s*/gi,"").replace(/\b(?:anthropic|openai|google|vertex\s*ai|bedrock|azure|x\.?ai|mistral|deepseek|cohere|groq|together(?:\.ai)?|openrouter|fireworks|perplexity|meta)\b/gi,"").replace(/\b(?:gpt|claude|gemini|grok|llama|qwen|sonnet|opus|haiku|o[0-9])[-\w.]*/gi,"").replace(/\s+/g," ").replace(/^[\s:;,.\-]+/,"").replace(/[\s.]+$/,"").trim()}var Fq={notLoggedIn:"Not logged in to QitQode. Run `qitqode auth login` to sign in with your Forgewise account.",rateLimit:"Rate limit exceeded. Please wait a moment before sending more requests.",insufficientBalance:(q)=>{let H=q?F(q):"";return`Insufficient qredits${H?`: ${H}`:""}. Add qredits at qitqode.com to continue.`},invalidCredentials:(q)=>{let H=q?F(q):"";return`Your QitQode sign-in has ended${H?` (${H})`:""}. Renewing it automatically didn't work, so signing in again is the only step left.`},accountNotLinked:(q)=>{let H=q?F(q):"";return`This credential isn't linked to a QitQode account${H?` (${H})`:""}, so there is no wallet to read. Sign in with your Forgewise account, or use a key issued to that account.`},gatewayUnavailable:(q)=>{let H=q?F(q):"";return`The QitQode model gateway is unavailable${H?` (${H})`:""}. Your sign-in is still valid \u2014 the model backend isn't reachable through its trusted gateway yet. This is a server-side configuration issue, not a login problem.`},streamFailed:(q)=>{let H=q?F(q):"";return`The QitQode model stream failed${H?`: ${H}`:""}.`},streamCutOff:()=>"The model's reply was cut off before it finished and QitQode could not recover it. This is a temporary upstream fault \u2014 your sign-in is fine and the service is reachable. Send the message again; if it keeps happening, try a shorter request or a different tier.",streamFailedAfterRetries:()=>"The model's reply was cut off before it finished. QitQode retried it, but the problem may be temporary or specific to this request. Send the message again; if it keeps happening, try a shorter request or a different tier.",outputBudgetExhausted:()=>"The model ran out of output room before it could finish. QitQode will retry once with more headroom when the tier allows it.",emptyOutput:()=>"The model used its output budget without producing visible text. QitQode did not receive an answer and no charge is implied.",requestRejected:(q,H)=>{let $=q?F(q):"",W=H?F(H):"";return`QitQode built an invalid request and the server rejected it${W?` (field: ${W})`:""}${$?`: ${$}`:""}. This is a problem with the request QitQode sent \u2014 not your sign-in, and not a gateway outage. Sending the same thing again will fail the same way.`},requestNotSent:(q)=>{let H=q?F(q):"";return`QitQode did not send this request${H?`: ${H}`:""}. Nothing was sent and no qredits were spent. This is a problem inside QitQode \u2014 not your sign-in, and not a gateway outage.`},requestTooLargeRecovering:(q)=>{let H=q?F(q):"";return`This request was too large to send${H?` (${H})`:""}, so QitQode removed some earlier conversation detail and is trying once more. Your sign-in is fine and the service is reachable.`},requestTooLargeIrreducible:(q)=>{let H=q?F(q):"";return`This request is too large for the service to accept${H?` (${H})`:""}, and QitQode couldn't make it smaller without losing your current request. Try removing large pasted text or attachments from your message, or start a new session. This isn't a sign-in problem or a service outage.`},requestTooLargeAfterReduction:(q)=>{let H=q?F(q):"";return`This request was still too large for the service after QitQode removed earlier conversation detail${H?` (${H})`:""}, so it stopped rather than retrying again. Start a new session, or send a shorter message with fewer attachments. This isn't a sign-in problem or a service outage.`},insufficientBalanceFallback:"Insufficient qredits.",insufficientBalanceCliSuffix:" Visit qitqode.com to add qredits.",invalidCredentialsFallback:"Your QitQode sign-in has ended and couldn't be renewed automatically. Sign in again.",apiKeyPrompt:"Paste your Qortex API key:",apiKeyPlaceholder:"qortex-...",loginMenuForgewise:"Sign in with Forgewise account",loginMenuApiKey:"Paste a Qortex API key",waitingForgewise:"\u23F3 Waiting for Forgewise sign-in in your browser\u2026"};function J(q){let H=process.env[q]?.toLowerCase();return H==="true"||H==="1"}function x(q){let H=process.env[q]?.toLowerCase();return H==="false"||H==="0"}function M(q){let H=process.env[q];if(!H)return;let $=Number(H);return Number.isInteger($)&&$>0?$:void 0}var K=J("QITQODE_EXPERIMENTAL"),C=J("QITQODE_DISABLE_CLAUDE_CODE"),O=J("QITQODE_DISABLE_EXTERNAL_SKILLS"),n=O||C||J("QITQODE_DISABLE_CLAUDE_CODE_SKILLS"),o=process.env.QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT,L={OTEL_EXPORTER_OTLP_ENDPOINT:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_HEADERS:process.env.OTEL_EXPORTER_OTLP_HEADERS,QITQODE_AUTO_SHARE:J("QITQODE_AUTO_SHARE"),QITQODE_AUTO_HEAP_SNAPSHOT:J("QITQODE_AUTO_HEAP_SNAPSHOT"),QITQODE_GIT_BASH_PATH:process.env.QITQODE_GIT_BASH_PATH,QITQODE_CONFIG:process.env.QITQODE_CONFIG,QITQODE_CONFIG_CONTENT:process.env.QITQODE_CONFIG_CONTENT,get QITQODE_BACKEND_URL(){return process.env.QITQODE_BACKEND_URL??_},get QITQODE_QLEX_MAX_REQUEST_BYTES(){return M("QITQODE_QLEX_MAX_REQUEST_BYTES")},QITQODE_DISABLE_AUTOUPDATE:J("QITQODE_DISABLE_AUTOUPDATE"),QITQODE_DISABLE_LOG_ROTATION:J("QITQODE_DISABLE_LOG_ROTATION"),QITQODE_ALWAYS_NOTIFY_UPDATE:J("QITQODE_ALWAYS_NOTIFY_UPDATE"),QITQODE_DISABLE_PRUNE:J("QITQODE_DISABLE_PRUNE"),QITQODE_DISABLE_TERMINAL_TITLE:J("QITQODE_DISABLE_TERMINAL_TITLE"),QITQODE_SHOW_TTFD:J("QITQODE_SHOW_TTFD"),QITQODE_PERMISSION:process.env.QITQODE_PERMISSION,QITQODE_DISABLE_DEFAULT_PLUGINS:J("QITQODE_DISABLE_DEFAULT_PLUGINS"),QITQODE_DISABLE_LSP_DOWNLOAD:!0,QITQODE_ENABLE_EXPERIMENTAL_MODELS:J("QITQODE_ENABLE_EXPERIMENTAL_MODELS"),QITQODE_DISABLE_AUTOCOMPACT:J("QITQODE_DISABLE_AUTOCOMPACT"),QITQODE_DISABLE_MODELS_FETCH:J("QITQODE_DISABLE_MODELS_FETCH"),QITQODE_DISABLE_MOUSE:J("QITQODE_DISABLE_MOUSE"),QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT:M("QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT")??3,QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT:M("QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT")??2,QITQODE_TEXT_NGRAM_N:M("QITQODE_TEXT_NGRAM_N")??6,QITQODE_TEXT_REPEAT_THRESHOLD:M("QITQODE_TEXT_REPEAT_THRESHOLD")??3,QITQODE_TEXT_WINDOW_TOKENS:M("QITQODE_TEXT_WINDOW_TOKENS")??500,QITQODE_MAX_PROMPT_IMAGES:M("QITQODE_MAX_PROMPT_IMAGES")??4,QITQODE_MAX_PROMPT_IMAGE_SIZE:M("QITQODE_MAX_PROMPT_IMAGE_SIZE")??393216,QITQODE_DISABLE_PROVIDER_ENV:J("QITQODE_DISABLE_PROVIDER_ENV"),QITQODE_DISABLE_CLAUDE_CODE:C,get QITQODE_DISABLE_CLAUDE_CODE_MCP(){return C||J("QITQODE_DISABLE_CLAUDE_CODE_MCP")},QITQODE_DISABLE_CLAUDE_CODE_PROMPT:C||J("QITQODE_DISABLE_CLAUDE_CODE_PROMPT"),QITQODE_DISABLE_CLAUDE_CODE_COMMANDS:J("QITQODE_DISABLE_CLAUDE_CODE_COMMANDS"),QITQODE_DISABLE_CLAUDE_CODE_SKILLS:n,QITQODE_DISABLE_EXTERNAL_SKILLS:O,QITQODE_DISABLE_CODEX_SKILLS:O||J("QITQODE_DISABLE_CODEX_SKILLS"),QITQODE_DISABLE_OPENCODE_SKILLS:O||J("QITQODE_DISABLE_OPENCODE_SKILLS"),QITQODE_FAKE_VCS:process.env.QITQODE_FAKE_VCS,QITQODE_DISABLE_GIT:J("QITQODE_DISABLE_GIT"),get QITQODE_SERVER_PASSWORD(){return process.env.QITQODE_SERVER_PASSWORD},get QITQODE_SERVER_USERNAME(){return process.env.QITQODE_SERVER_USERNAME},QITQODE_ENABLE_QUESTION_TOOL:J("QITQODE_ENABLE_QUESTION_TOOL"),QITQODE_EXPERIMENTAL:K,QITQODE_EXPERIMENTAL_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_ICON_DISCOVERY:K||J("QITQODE_EXPERIMENTAL_ICON_DISCOVERY"),QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT:o===void 0?process.platform==="win32":J("QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT"),QITQODE_ENABLE_EXA:J("QITQODE_ENABLE_EXA")||K||J("QITQODE_EXPERIMENTAL_EXA"),QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS:M("QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS"),QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX:M("QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX"),QITQODE_EXPERIMENTAL_OXFMT:K||J("QITQODE_EXPERIMENTAL_OXFMT"),QITQODE_EXPERIMENTAL_LSP_TY:J("QITQODE_EXPERIMENTAL_LSP_TY"),QITQODE_EXPERIMENTAL_LSP_TOOL:K||J("QITQODE_EXPERIMENTAL_LSP_TOOL"),QITQODE_EXPERIMENTAL_WORKFLOW_TOOL:!x("QITQODE_EXPERIMENTAL_WORKFLOW_TOOL"),QITQODE_EXPERIMENTAL_MARKDOWN:!x("QITQODE_EXPERIMENTAL_MARKDOWN"),QITQODE_MODELS_URL:process.env.QITQODE_MODELS_URL,QITQODE_MODELS_PATH:process.env.QITQODE_MODELS_PATH,QITQODE_DB:process.env.QITQODE_DB,QITQODE_DISABLE_CHANNEL_DB:!x("QITQODE_DISABLE_CHANNEL_DB"),QITQODE_SKIP_MIGRATIONS:J("QITQODE_SKIP_MIGRATIONS"),QITQODE_STRICT_CONFIG_DEPS:J("QITQODE_STRICT_CONFIG_DEPS"),QITQODE_WORKSPACE_ID:process.env.QITQODE_WORKSPACE_ID,QITQODE_EXPERIMENTAL_HTTPAPI:J("QITQODE_EXPERIMENTAL_HTTPAPI"),QITQODE_EXPERIMENTAL_WORKSPACES:K||J("QITQODE_EXPERIMENTAL_WORKSPACES"),get QITQODE_DISABLE_COMPOSE_SKILLS(){return J("QITQODE_DISABLE_COMPOSE_SKILLS")},get QITQODE_DISABLE_BUILTIN_SKILLS(){return J("QITQODE_DISABLE_BUILTIN_SKILLS")},get QITQODE_DISABLE_PROJECT_CONFIG(){return J("QITQODE_DISABLE_PROJECT_CONFIG")},get QITQODE_TUI_CONFIG(){return process.env.QITQODE_TUI_CONFIG},get QITQODE_CONFIG_DIR(){return process.env.QITQODE_CONFIG_DIR},get QITQODE_HOME(){return process.env.QITQODE_HOME},get QITQODE_PURE(){return J("QITQODE_PURE")},get QITQODE_PLUGIN_META_FILE(){return process.env.QITQODE_PLUGIN_META_FILE},get QITQODE_CLIENT(){return process.env.QITQODE_CLIENT??"cli"}};var s=u.enum(["DEBUG","INFO","WARN","ERROR"]).meta({ref:"LogLevel",description:"Log level"}),f={DEBUG:0,INFO:1,WARN:2,ERROR:3},l=10,r=52428800,t=209715200,p="INFO";function X(q){return f[q]>=f[p]}function a(q){return X(q)}var c=new Map,e=h({service:"default"}),G="";function qq(){return G}var z,T=0,v=!0,w=(q)=>{return process.stderr.write(q),q.length};function k(){return new Date().toISOString().split(".")[0].replace(/:/g,"")}async function Hq(q){if(q.level)p=q.level;if(v=q.rotate??!L.QITQODE_DISABLE_LOG_ROTATION,g(Q.Path.log),q.print)return;if(G=U.join(Q.Path.log,q.dev?"dev.log":k()+".log"),q.dev){let H=await Z.stat(G).catch(()=>null);if(H&&H.size>0)await Z.rename(G,`${G}.${k()}`).catch(()=>{})}else await Z.truncate(G).catch(()=>{});z=m(G,{flags:"a"}),T=0,w=(H)=>{return S=S.then(async()=>{if(T+=Buffer.byteLength(H),v&&T>=r)T=Buffer.byteLength(H),await $q();await new Promise(($)=>{if(!z){$();return}z.write(H,()=>$())})}).catch(()=>{}),H.length}}var S=Promise.resolve();async function Jq(){await S}async function $q(){let q=z,H=`${G}.${k()}`;for(let $=2;await Z.stat(H).then(()=>!0,()=>!1);$++)H=`${G}.${k()}.${$}`;if(await Z.rename(G,H).catch(()=>{}),z=m(G,{flags:"a"}),q)q.end();g(Q.Path.log)}async function g(q){let H=await Z.readdir(q).catch(()=>[]),W=(await Promise.all(H.filter((Y)=>Y.includes(".log")&&U.join(q,Y)!==G).map(async(Y)=>{let N=await Z.stat(U.join(q,Y)).catch(()=>null);return N?.isFile()?{name:Y,size:N.size}:null}))).flatMap((Y)=>Y?[Y]:[]).sort((Y,N)=>Y.name<N.name?-1:Y.name>N.name?1:0),j=W.reduce((Y,N)=>Y+N.size,0),P=W.length,R=W.filter((Y)=>{if(P<=l&&j<=t)return!1;return j-=Y.size,P-=1,!0});await Promise.all(R.map((Y)=>Z.unlink(U.join(q,Y.name)).catch(()=>{})))}var Yq=/token|secret|password|passwd|credential|api[_-]?key|authorization|cookie|set-cookie/i;function D(q,H){if(Yq.test(q)&&H!==void 0&&H!==null)return"[REDACTED]";return H}var A=10240;function jq(q){try{let H=JSON.stringify(q,function($,W){return $?D($,W):W});if(typeof H==="string"&&H.length>A)return H.slice(0,A)+`\u2026[truncated ${H.length-A} chars]`;return H}catch{return"[unserializable]"}}function d(q,H=0){let $=q.message;return q.cause instanceof Error&&H<10?$+" Caused by: "+d(q.cause,H+1):$}var E=Date.now();function h(q){q=q||{};let H=q.service;if(H&&typeof H==="string"){let j=c.get(H);if(j)return j}function $(j,P){let R=Object.entries({...q,...P}).filter(([y,V])=>V!==void 0&&V!==null).map(([y,V])=>{let b=`${y}=`;if(V instanceof Error)return b+d(V);let I=D(y,V);if(I!==V)return b+I;if(typeof V==="object"&&V!==null)return b+jq(V);return b+V}).join(" "),Y=new Date,N=Y.getTime()-E;return E=Y.getTime(),[Y.toISOString().split(".")[0],"+"+N+"ms",R,j].filter(Boolean).join(" ")+`
|
|
3
|
+
`}let W={debug(j,P){if(X("DEBUG"))w("DEBUG "+$(j,P))},info(j,P){if(X("INFO"))w("INFO "+$(j,P))},error(j,P){if(X("ERROR"))w("ERROR "+$(j,P))},warn(j,P){if(X("WARN"))w("WARN "+$(j,P))},tag(j,P){if(q)q[j]=P;return W},clone(){return h({...q})},time(j,P){let R=Date.now();W.info(j,{status:"started",...P});function Y(){W.info(j,{status:"completed",duration:Date.now()-R,...P})}return{stop:Y,[Symbol.dispose](){Y()}}}};if(H&&typeof H==="string")c.set(H,W);return W}
|
|
4
|
+
export{Wq as vu,Gq as wu,_ as xu,Vq as yu,F as zu,Fq as Au,L as Bu,s as Cu,a as Du,e as Eu,qq as Fu,Hq as Gu,Jq as Hu,D as Iu,h as Ju,Pq as Ku};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cd as d}from"./chunk-
|
|
2
|
+
import{Cd as d}from"./chunk-w8d9srv7.js";import{Pd as f}from"./chunk-9xvctnjr.js";import{Sf as e}from"./chunk-9s4whpg1.js";import{Xg as l}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as m,rl as u}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var v=f({command:"usage [sessionID]",describe:"show per-turn token/cost breakdown for a session (debug/verification tool)",builder:(o)=>{return o.positional("sessionID",{describe:"session ID to inspect (default: most recently updated session)",type:"string"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"}).option("limit",{describe:"number of most recent turns to show (default: all)",type:"number"})},handler:async(o)=>{await d(process.cwd(),async()=>{let a=o.sessionID?m.make(o.sessionID):[...u.list({roots:!1,limit:1})][0]?.id;if(!a)e.error("No sessions found"),process.exit(1);let p=(await l.runPromise(u.Service.use((s)=>s.messages({sessionID:a,agentID:"*"})))).filter((s)=>s.info.role==="assistant").map((s)=>{let t=s.info,c=s.parts.filter((n)=>n.type==="step-finish");return{messageID:t.id,provider:t.providerID,model:t.modelID,finish:t.finish,cost:t.cost??0,tokens:t.tokens??{input:0,output:0,reasoning:0,cache:{read:0,write:0}},steps:c.map((n)=>({cost:n.cost,tokens:n.tokens}))}}),r=o.limit?p.slice(-o.limit):p;if(r.length===0){e.println("No assistant turns found for this session");return}if(o.format==="json"){console.log(JSON.stringify({sessionID:a,turns:r},null,2));return}e.println(`Session ${a} \u2014 ${r.length} turn(s)`),e.println("");for(let s of r){let t=s.tokens,c=t.input+t.cache.read+t.cache.write,n=t.output+t.reasoning;if(e.println(`${s.messageID} ${s.provider}/${s.model} finish=${s.finish??"-"}`),e.println(` tokens input=${t.input} cache.read=${t.cache.read} cache.write=${t.cache.write} output=${t.output} reasoning=${t.reasoning} (in=${c} out=${n})`),e.println(` cost $${s.cost.toFixed(6)}`),s.steps.length>1)e.println(` steps ${s.steps.length}`),s.steps.forEach((i,g)=>{e.println(` [${g}] input=${i.tokens.input} output=${i.tokens.output} cache.read=${i.tokens.cache.read} cache.write=${i.tokens.cache.write} reasoning=${i.tokens.reasoning} cost=$${i.cost.toFixed(6)}`)});e.println("")}let h=r.reduce((s,t)=>s+t.cost,0);e.println(`Total cost for shown turns: $${h.toFixed(6)}`),e.println("(source: Session.getUsage(), same numbers persisted to the message record \u2014 see session.usage log tag)")})}});export{v as UsageCommand};
|