@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux
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/README.md +79 -109
- package/bundled/new-app/SKILL.md +22 -0
- package/bundled/qc-helper/SKILL.md +29 -24
- package/bundled/qc-helper/docs/_meta.ts +1 -0
- package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
- package/bundled/qc-helper/docs/configuration/settings.md +37 -31
- package/bundled/qc-helper/docs/configuration/themes.md +39 -0
- package/bundled/qc-helper/docs/features/_meta.ts +1 -3
- package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
- package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
- package/bundled/qc-helper/docs/features/commands.md +115 -35
- package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
- package/bundled/qc-helper/docs/features/headless.md +32 -0
- package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
- package/bundled/qc-helper/docs/features/memory.md +22 -5
- package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
- package/bundled/qc-helper/docs/features/status-line.md +168 -32
- package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
- package/bundled/qc-helper/docs/features/worktree.md +345 -0
- package/bundled/qc-helper/docs/overview.md +4 -4
- package/bundled/qc-helper/docs/quickstart.md +4 -4
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
- package/bundled/qc-helper/docs/qwen-serve.md +234 -24
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
- package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
- package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
- package/bundled/simplify/SKILL.md +123 -0
- package/chunks/agent-IDS4HMOX.js +56 -0
- package/chunks/agent-headless-5Q2EUSPS.js +50 -0
- package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
- package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
- package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
- package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
- package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
- package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
- package/chunks/chunk-3DHXZ6EV.js +241 -0
- package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
- package/chunks/chunk-3HX5LZ6R.js +1798 -0
- package/chunks/chunk-3PJXIDKI.js +2517 -0
- package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
- package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
- package/chunks/chunk-64WXLC72.js +98 -0
- package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
- package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
- package/chunks/chunk-B7HXHOHU.js +393 -0
- package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
- package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
- package/chunks/chunk-H6BD2ELD.js +36 -0
- package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
- package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
- package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
- package/chunks/chunk-J37FGIOA.js +1623 -0
- package/chunks/chunk-J5MDQKJL.js +2230 -0
- package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
- package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
- package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
- package/chunks/chunk-LD2XBG6Z.js +102 -0
- package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
- package/chunks/chunk-MRO43B25.js +30 -0
- package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
- package/chunks/chunk-OHEGWO4L.js +264 -0
- package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
- package/chunks/chunk-QQDPRDVW.js +25 -0
- package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
- package/chunks/chunk-SKBPNJEW.js +45 -0
- package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
- package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
- package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
- package/chunks/chunk-XBY7E2FX.js +605 -0
- package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
- package/chunks/chunk-YOGAOMYB.js +159 -0
- package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
- package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
- package/chunks/computer-use-W2TYQNEE.js +825 -0
- package/chunks/contextCommand-6FGX3A7J.js +52 -0
- package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
- package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
- package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
- package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
- package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
- package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
- package/chunks/dist-H6ONXVLG.js +94146 -0
- package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
- package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
- package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
- package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
- package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
- package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
- package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
- package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
- package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
- package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
- package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
- package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
- package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
- package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
- package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
- package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
- package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
- package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
- package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
- package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
- package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
- package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
- package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
- package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
- package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
- package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
- package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
- package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
- package/chunks/read-file-GIT7BCDR.js +27 -0
- package/chunks/ripGrep-MWKFVYMS.js +48 -0
- package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
- package/chunks/scheduler-5VOOYGBH.js +308 -0
- package/chunks/send-message-4QNWQJF4.js +244 -0
- package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
- package/chunks/shell-NQZQGFM2.js +56 -0
- package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
- package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
- package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
- package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
- package/chunks/task-create-MPORPYN6.js +19 -0
- package/chunks/task-list-R2YDYPZT.js +151 -0
- package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
- package/chunks/task-update-E4NSLKMQ.js +408 -0
- package/chunks/team-create-7R7KA5IP.js +314 -0
- package/chunks/team-delete-25OIWUPN.js +116 -0
- package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
- package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
- package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
- package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
- package/chunks/workflow-5RIKVCIE.js +960 -0
- package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
- package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
- package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
- package/cli.js +45402 -20570
- package/examples/agent/agents/diary.md +86 -0
- package/examples/agent/qwen-extension.json +5 -0
- package/examples/commands/commands/fs/grep-code.md +3 -0
- package/examples/commands/qwen-extension.json +5 -0
- package/examples/context/QWEN.md +8 -0
- package/examples/context/qwen-extension.json +5 -0
- package/examples/mcp-server/example.ts +60 -0
- package/examples/mcp-server/package.json +18 -0
- package/examples/mcp-server/qwen-extension.json +12 -0
- package/examples/mcp-server/tsconfig.json +13 -0
- package/examples/skills/qwen-extension.json +5 -0
- package/examples/skills/skills/synonyms/SKILL.md +48 -0
- package/examples/starter/QWEN.md +30 -0
- package/examples/starter/README.md +59 -0
- package/examples/starter/agents/diary.md +86 -0
- package/examples/starter/commands/writing/polish.md +13 -0
- package/examples/starter/example.ts +64 -0
- package/examples/starter/package.json +18 -0
- package/examples/starter/qwen-extension.json +12 -0
- package/examples/starter/skills/synonyms/SKILL.md +48 -0
- package/examples/starter/tsconfig.json +13 -0
- package/fzfWorker.js +1083 -0
- package/locales/ca.js +118 -5
- package/locales/de.js +117 -5
- package/locales/en.js +169 -7
- package/locales/fr.js +119 -5
- package/locales/ja.js +114 -5
- package/locales/pt.js +117 -5
- package/locales/ru.js +116 -5
- package/locales/zh-TW.js +161 -12
- package/locales/zh.js +169 -12
- package/package.json +4 -2
- package/scripts/postinstall.cjs +2 -1
- package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
- package/chunks/agent-7ZN3CRHR.js +0 -48
- package/chunks/chunk-6PCB2DEF.js +0 -434
- package/chunks/chunk-EM6ETG2K.js +0 -60
- package/chunks/chunk-G7YTSRES.js +0 -150
- package/chunks/contextCommand-7IBASARL.js +0 -44
- package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
- package/chunks/multipart-parser-IXGBIOIN.js +0 -384
- package/chunks/read-file-CCUEUFG2.js +0 -24
- package/chunks/ripGrep-TADOH2HK.js +0 -40
- package/chunks/send-message-YL44UZFC.js +0 -151
- package/chunks/shell-7KKKC5G7.js +0 -48
- package/chunks/src-IPWIHNMI.js +0 -1406
- package/chunks/undici-F6ZOXSS5.js +0 -8
package/chunks/chunk-G7YTSRES.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
createDebugLogger
|
|
5
|
-
} from "./chunk-XP27SJMH.js";
|
|
6
|
-
import {
|
|
7
|
-
init_esbuild_shims
|
|
8
|
-
} from "./chunk-A4BMJM77.js";
|
|
9
|
-
import {
|
|
10
|
-
__name
|
|
11
|
-
} from "./chunk-J2S4EL5Y.js";
|
|
12
|
-
|
|
13
|
-
// packages/core/src/utils/xml.ts
|
|
14
|
-
init_esbuild_shims();
|
|
15
|
-
function escapeXml(text) {
|
|
16
|
-
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
17
|
-
}
|
|
18
|
-
__name(escapeXml, "escapeXml");
|
|
19
|
-
var XML_TAG_CANDIDATE_RE = /<[^>]*>/g;
|
|
20
|
-
function isSystemReminderTagIgnorable(char) {
|
|
21
|
-
const codePoint = char.codePointAt(0);
|
|
22
|
-
return codePoint === 173 || codePoint === 65279 || codePoint !== void 0 && (codePoint >= 0 && codePoint <= 31 || codePoint >= 127 && codePoint <= 159 || codePoint >= 8203 && codePoint <= 8207 || codePoint >= 8234 && codePoint <= 8238 || codePoint >= 8288 && codePoint <= 8303 || codePoint >= 65024 && codePoint <= 65039);
|
|
23
|
-
}
|
|
24
|
-
__name(isSystemReminderTagIgnorable, "isSystemReminderTagIgnorable");
|
|
25
|
-
function normalizeSystemReminderCandidateTag(tag) {
|
|
26
|
-
let normalized = "";
|
|
27
|
-
for (const char of tag) {
|
|
28
|
-
if (!isSystemReminderTagIgnorable(char)) {
|
|
29
|
-
normalized += char;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return normalized.toLowerCase();
|
|
33
|
-
}
|
|
34
|
-
__name(normalizeSystemReminderCandidateTag, "normalizeSystemReminderCandidateTag");
|
|
35
|
-
function getSystemReminderTagKind(tag) {
|
|
36
|
-
const normalized = normalizeSystemReminderCandidateTag(tag);
|
|
37
|
-
const match = /^<\s*(\/?)\s*system-reminder(?:\s+[^>]*)?\s*(\/?)\s*>$/.exec(
|
|
38
|
-
normalized
|
|
39
|
-
);
|
|
40
|
-
if (!match) {
|
|
41
|
-
return void 0;
|
|
42
|
-
}
|
|
43
|
-
return match[1] ? "closing" : "other";
|
|
44
|
-
}
|
|
45
|
-
__name(getSystemReminderTagKind, "getSystemReminderTagKind");
|
|
46
|
-
function escapeSystemReminderTag(tag) {
|
|
47
|
-
const tagKind = getSystemReminderTagKind(tag);
|
|
48
|
-
if (tagKind === "closing") {
|
|
49
|
-
return "<\\/system-reminder>";
|
|
50
|
-
}
|
|
51
|
-
if (tagKind === "other") {
|
|
52
|
-
return escapeXml(tag);
|
|
53
|
-
}
|
|
54
|
-
return tag;
|
|
55
|
-
}
|
|
56
|
-
__name(escapeSystemReminderTag, "escapeSystemReminderTag");
|
|
57
|
-
function escapeSystemReminderTags(text) {
|
|
58
|
-
return text.replace(XML_TAG_CANDIDATE_RE, escapeSystemReminderTag);
|
|
59
|
-
}
|
|
60
|
-
__name(escapeSystemReminderTags, "escapeSystemReminderTags");
|
|
61
|
-
|
|
62
|
-
// packages/core/src/hooks/registerSkillHooks.ts
|
|
63
|
-
init_esbuild_shims();
|
|
64
|
-
var debugLogger = createDebugLogger("SKILL_HOOKS");
|
|
65
|
-
function registerSkillHooks(sessionHooksManager, sessionId, skill) {
|
|
66
|
-
if (!skill.hooks) {
|
|
67
|
-
debugLogger.debug(`Skill '${skill.name}' has no hooks to register`);
|
|
68
|
-
return 0;
|
|
69
|
-
}
|
|
70
|
-
const hooksSettings = skill.hooks;
|
|
71
|
-
let registeredCount = 0;
|
|
72
|
-
for (const eventName of Object.keys(hooksSettings)) {
|
|
73
|
-
const matchers = hooksSettings[eventName];
|
|
74
|
-
if (!matchers) continue;
|
|
75
|
-
for (const matcher of matchers) {
|
|
76
|
-
const matcherPattern = matcher.matcher || "";
|
|
77
|
-
for (const hook of matcher.hooks) {
|
|
78
|
-
if (hook.type === "function" /* Function */) {
|
|
79
|
-
debugLogger.debug(
|
|
80
|
-
"Skipping function hook from skill (not supported in frontmatter)"
|
|
81
|
-
);
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
const hookConfig = prepareHookConfig(
|
|
85
|
-
hook,
|
|
86
|
-
skill.skillRoot
|
|
87
|
-
);
|
|
88
|
-
sessionHooksManager.addSessionHook(
|
|
89
|
-
sessionId,
|
|
90
|
-
eventName,
|
|
91
|
-
matcherPattern,
|
|
92
|
-
hookConfig,
|
|
93
|
-
{ skillRoot: skill.skillRoot }
|
|
94
|
-
);
|
|
95
|
-
registeredCount++;
|
|
96
|
-
debugLogger.debug(
|
|
97
|
-
`Registered hook for ${eventName} with matcher '${matcherPattern}' from skill '${skill.name}'`
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (registeredCount > 0) {
|
|
103
|
-
debugLogger.info(
|
|
104
|
-
`Registered ${registeredCount} hooks from skill '${skill.name}'`
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
return registeredCount;
|
|
108
|
-
}
|
|
109
|
-
__name(registerSkillHooks, "registerSkillHooks");
|
|
110
|
-
function prepareHookConfig(hook, skillRoot) {
|
|
111
|
-
if (hook.type === "command" && skillRoot) {
|
|
112
|
-
return {
|
|
113
|
-
...hook,
|
|
114
|
-
env: {
|
|
115
|
-
...hook.env,
|
|
116
|
-
QWEN_SKILL_ROOT: skillRoot
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
return hook;
|
|
121
|
-
}
|
|
122
|
-
__name(prepareHookConfig, "prepareHookConfig");
|
|
123
|
-
|
|
124
|
-
// packages/core/src/tools/skill-utils.ts
|
|
125
|
-
init_esbuild_shims();
|
|
126
|
-
function buildSkillLlmContent(baseDir, body) {
|
|
127
|
-
return `Base directory for this skill: ${baseDir}
|
|
128
|
-
Important: ALWAYS resolve absolute paths from this base directory when working with skills.
|
|
129
|
-
|
|
130
|
-
${body}
|
|
131
|
-
`;
|
|
132
|
-
}
|
|
133
|
-
__name(buildSkillLlmContent, "buildSkillLlmContent");
|
|
134
|
-
|
|
135
|
-
export {
|
|
136
|
-
escapeXml,
|
|
137
|
-
escapeSystemReminderTags,
|
|
138
|
-
registerSkillHooks,
|
|
139
|
-
buildSkillLlmContent
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* @license
|
|
143
|
-
* Copyright 2025 Qwen
|
|
144
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
145
|
-
*/
|
|
146
|
-
/**
|
|
147
|
-
* @license
|
|
148
|
-
* Copyright 2026 Qwen Team
|
|
149
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
150
|
-
*/
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import {
|
|
4
|
-
collectContextData,
|
|
5
|
-
contextCommand,
|
|
6
|
-
formatContextUsageText
|
|
7
|
-
} from "./chunk-JKMBWLFB.js";
|
|
8
|
-
import "./chunk-DQ4QTG7E.js";
|
|
9
|
-
import "./chunk-3OCRHZA3.js";
|
|
10
|
-
import "./chunk-K5PGHDBN.js";
|
|
11
|
-
import "./chunk-N4WOREMD.js";
|
|
12
|
-
import "./chunk-O4PICXES.js";
|
|
13
|
-
import "./chunk-TW522KN6.js";
|
|
14
|
-
import "./chunk-MLZQVCF3.js";
|
|
15
|
-
import "./chunk-G7YTSRES.js";
|
|
16
|
-
import "./chunk-4AOCVI6J.js";
|
|
17
|
-
import "./chunk-77WXWU44.js";
|
|
18
|
-
import "./chunk-F23NCRJ2.js";
|
|
19
|
-
import "./chunk-6PCB2DEF.js";
|
|
20
|
-
import "./chunk-K6O2NBMF.js";
|
|
21
|
-
import "./chunk-UWCTAVOD.js";
|
|
22
|
-
import "./chunk-OFEVLU4C.js";
|
|
23
|
-
import "./chunk-PR4T27R7.js";
|
|
24
|
-
import "./chunk-MAY32HXD.js";
|
|
25
|
-
import "./chunk-D5NTAHYL.js";
|
|
26
|
-
import "./chunk-MYAKAFEC.js";
|
|
27
|
-
import "./chunk-66CXYE4B.js";
|
|
28
|
-
import "./chunk-NCTLV2NB.js";
|
|
29
|
-
import "./chunk-XEGHDASV.js";
|
|
30
|
-
import "./chunk-GGNTZ2NH.js";
|
|
31
|
-
import "./chunk-KXZ4TJB4.js";
|
|
32
|
-
import "./chunk-XP27SJMH.js";
|
|
33
|
-
import "./chunk-XKS5KBFJ.js";
|
|
34
|
-
import "./chunk-ZERZSAZL.js";
|
|
35
|
-
import "./chunk-QN5NZ3UQ.js";
|
|
36
|
-
import "./chunk-BR4QREVK.js";
|
|
37
|
-
import "./chunk-QWSRH265.js";
|
|
38
|
-
import "./chunk-A4BMJM77.js";
|
|
39
|
-
import "./chunk-J2S4EL5Y.js";
|
|
40
|
-
export {
|
|
41
|
-
collectContextData,
|
|
42
|
-
contextCommand,
|
|
43
|
-
formatContextUsageText
|
|
44
|
-
};
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import "./chunk-3OCRHZA3.js";
|
|
4
|
-
import "./chunk-K5PGHDBN.js";
|
|
5
|
-
import "./chunk-N4WOREMD.js";
|
|
6
|
-
import "./chunk-O4PICXES.js";
|
|
7
|
-
import "./chunk-TW522KN6.js";
|
|
8
|
-
import "./chunk-MLZQVCF3.js";
|
|
9
|
-
import "./chunk-G7YTSRES.js";
|
|
10
|
-
import "./chunk-4AOCVI6J.js";
|
|
11
|
-
import "./chunk-77WXWU44.js";
|
|
12
|
-
import "./chunk-F23NCRJ2.js";
|
|
13
|
-
import "./chunk-6PCB2DEF.js";
|
|
14
|
-
import "./chunk-K6O2NBMF.js";
|
|
15
|
-
import "./chunk-UWCTAVOD.js";
|
|
16
|
-
import "./chunk-OFEVLU4C.js";
|
|
17
|
-
import "./chunk-PR4T27R7.js";
|
|
18
|
-
import "./chunk-MAY32HXD.js";
|
|
19
|
-
import "./chunk-D5NTAHYL.js";
|
|
20
|
-
import "./chunk-MYAKAFEC.js";
|
|
21
|
-
import "./chunk-66CXYE4B.js";
|
|
22
|
-
import "./chunk-NCTLV2NB.js";
|
|
23
|
-
import {
|
|
24
|
-
BaseDeclarativeTool,
|
|
25
|
-
BaseToolInvocation,
|
|
26
|
-
ToolDisplayNames,
|
|
27
|
-
ToolNames
|
|
28
|
-
} from "./chunk-XEGHDASV.js";
|
|
29
|
-
import "./chunk-GGNTZ2NH.js";
|
|
30
|
-
import "./chunk-KXZ4TJB4.js";
|
|
31
|
-
import {
|
|
32
|
-
createDebugLogger
|
|
33
|
-
} from "./chunk-XP27SJMH.js";
|
|
34
|
-
import "./chunk-XKS5KBFJ.js";
|
|
35
|
-
import "./chunk-ZERZSAZL.js";
|
|
36
|
-
import "./chunk-QN5NZ3UQ.js";
|
|
37
|
-
import "./chunk-BR4QREVK.js";
|
|
38
|
-
import "./chunk-QWSRH265.js";
|
|
39
|
-
import {
|
|
40
|
-
init_esbuild_shims
|
|
41
|
-
} from "./chunk-A4BMJM77.js";
|
|
42
|
-
import {
|
|
43
|
-
__name
|
|
44
|
-
} from "./chunk-J2S4EL5Y.js";
|
|
45
|
-
|
|
46
|
-
// packages/core/src/tools/exitPlanMode.ts
|
|
47
|
-
init_esbuild_shims();
|
|
48
|
-
var debugLogger = createDebugLogger("EXIT_PLAN_MODE");
|
|
49
|
-
var exitPlanModeToolDescription = `Use this tool when you are in plan mode and have finished presenting your plan and are ready to code. This will prompt the user to exit plan mode.
|
|
50
|
-
|
|
51
|
-
## When to Use This Tool
|
|
52
|
-
IMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.
|
|
53
|
-
|
|
54
|
-
## Before Using This Tool
|
|
55
|
-
Ensure your plan is complete and unambiguous:
|
|
56
|
-
- If you have unresolved questions about requirements or approach, use AskUserQuestion first (in earlier phases)
|
|
57
|
-
- Once your plan is finalized, use THIS tool to request approval
|
|
58
|
-
|
|
59
|
-
**Important:** Do NOT use AskUserQuestion to ask "Is this plan okay?" or "Should I proceed?" - that's exactly what THIS tool does. ExitPlanMode inherently requests user approval of your plan.
|
|
60
|
-
|
|
61
|
-
## Examples
|
|
62
|
-
1. Initial task: "Search for and understand the implementation of vim mode in the codebase" - Do not use the exit plan mode tool because you are not planning the implementation steps of a task.
|
|
63
|
-
2. Initial task: "Help me implement yank mode for vim" - Use the exit plan mode tool after you have finished planning the implementation steps of the task.
|
|
64
|
-
3. Initial task: "Add a new feature to handle user authentication" - If unsure about auth method (OAuth, JWT, etc.), use AskUserQuestion first, then use exit plan mode tool after clarifying the approach.
|
|
65
|
-
`;
|
|
66
|
-
var exitPlanModeToolSchemaData = {
|
|
67
|
-
name: "exit_plan_mode",
|
|
68
|
-
description: exitPlanModeToolDescription,
|
|
69
|
-
parametersJsonSchema: {
|
|
70
|
-
type: "object",
|
|
71
|
-
properties: {
|
|
72
|
-
plan: {
|
|
73
|
-
type: "string",
|
|
74
|
-
description: "The plan you came up with, that you want to run by the user for approval. Supports markdown. The plan should be pretty concise."
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
required: ["plan"],
|
|
78
|
-
additionalProperties: false,
|
|
79
|
-
$schema: "http://json-schema.org/draft-07/schema#"
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var ExitPlanModeToolInvocation = class extends BaseToolInvocation {
|
|
83
|
-
constructor(config, params) {
|
|
84
|
-
super(params);
|
|
85
|
-
this.config = config;
|
|
86
|
-
}
|
|
87
|
-
static {
|
|
88
|
-
__name(this, "ExitPlanModeToolInvocation");
|
|
89
|
-
}
|
|
90
|
-
wasApproved = false;
|
|
91
|
-
getDescription() {
|
|
92
|
-
return "Plan:";
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Plan mode exit always requires user confirmation.
|
|
96
|
-
*/
|
|
97
|
-
async getDefaultPermission() {
|
|
98
|
-
return "ask";
|
|
99
|
-
}
|
|
100
|
-
async getConfirmationDetails(_abortSignal) {
|
|
101
|
-
const prePlanMode = this.config.getPrePlanMode();
|
|
102
|
-
const details = {
|
|
103
|
-
type: "plan",
|
|
104
|
-
title: "Would you like to proceed?",
|
|
105
|
-
plan: this.params.plan,
|
|
106
|
-
prePlanMode,
|
|
107
|
-
onConfirm: /* @__PURE__ */ __name(async (outcome) => {
|
|
108
|
-
switch (outcome) {
|
|
109
|
-
case "restore_previous" /* RestorePrevious */:
|
|
110
|
-
this.wasApproved = true;
|
|
111
|
-
this.setApprovalModeSafely(prePlanMode);
|
|
112
|
-
break;
|
|
113
|
-
case "proceed_always" /* ProceedAlways */:
|
|
114
|
-
this.wasApproved = true;
|
|
115
|
-
this.setApprovalModeSafely("auto-edit" /* AUTO_EDIT */);
|
|
116
|
-
break;
|
|
117
|
-
case "proceed_once" /* ProceedOnce */:
|
|
118
|
-
this.wasApproved = true;
|
|
119
|
-
this.setApprovalModeSafely("default" /* DEFAULT */);
|
|
120
|
-
break;
|
|
121
|
-
case "cancel" /* Cancel */:
|
|
122
|
-
this.wasApproved = false;
|
|
123
|
-
this.setApprovalModeSafely("plan" /* PLAN */);
|
|
124
|
-
break;
|
|
125
|
-
default:
|
|
126
|
-
this.wasApproved = true;
|
|
127
|
-
this.setApprovalModeSafely("default" /* DEFAULT */);
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
}, "onConfirm")
|
|
131
|
-
};
|
|
132
|
-
return details;
|
|
133
|
-
}
|
|
134
|
-
setApprovalModeSafely(mode) {
|
|
135
|
-
try {
|
|
136
|
-
this.config.setApprovalMode(mode);
|
|
137
|
-
} catch (error) {
|
|
138
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
139
|
-
debugLogger.error(
|
|
140
|
-
`[ExitPlanModeTool] Failed to set approval mode to "${mode}": ${errorMessage}`
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async execute(_signal) {
|
|
145
|
-
const { plan } = this.params;
|
|
146
|
-
try {
|
|
147
|
-
const isYolo = this.config.getApprovalMode() === "yolo" /* YOLO */;
|
|
148
|
-
const effectivelyApproved = this.wasApproved || isYolo;
|
|
149
|
-
if (!effectivelyApproved) {
|
|
150
|
-
const rejectionMessage = "Plan execution was not approved. Remaining in plan mode.";
|
|
151
|
-
return {
|
|
152
|
-
llmContent: rejectionMessage,
|
|
153
|
-
returnDisplay: rejectionMessage
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
try {
|
|
157
|
-
this.config.savePlan(plan);
|
|
158
|
-
} catch (error) {
|
|
159
|
-
debugLogger.warn(
|
|
160
|
-
`[ExitPlanModeTool] Failed to save plan to disk: ${error instanceof Error ? error.message : String(error)}`
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
const llmMessage = `User has approved your plan. You can now start coding. Start with updating your todo list if applicable.`;
|
|
164
|
-
const displayMessage = "User approved the plan.";
|
|
165
|
-
return {
|
|
166
|
-
llmContent: llmMessage,
|
|
167
|
-
returnDisplay: {
|
|
168
|
-
type: "plan_summary",
|
|
169
|
-
message: displayMessage,
|
|
170
|
-
plan
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
} catch (error) {
|
|
174
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
175
|
-
debugLogger.error(
|
|
176
|
-
`[ExitPlanModeTool] Error executing exit_plan_mode: ${errorMessage}`
|
|
177
|
-
);
|
|
178
|
-
const errorLlmContent = `Failed to present plan: ${errorMessage}`;
|
|
179
|
-
return {
|
|
180
|
-
llmContent: errorLlmContent,
|
|
181
|
-
returnDisplay: `Error presenting plan: ${errorMessage}`
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
var ExitPlanModeTool = class _ExitPlanModeTool extends BaseDeclarativeTool {
|
|
187
|
-
constructor(config) {
|
|
188
|
-
super(
|
|
189
|
-
_ExitPlanModeTool.Name,
|
|
190
|
-
ToolDisplayNames.EXIT_PLAN_MODE,
|
|
191
|
-
exitPlanModeToolDescription,
|
|
192
|
-
"think" /* Think */,
|
|
193
|
-
exitPlanModeToolSchemaData.parametersJsonSchema,
|
|
194
|
-
true,
|
|
195
|
-
// isOutputMarkdown
|
|
196
|
-
false,
|
|
197
|
-
// canUpdateOutput
|
|
198
|
-
true,
|
|
199
|
-
// shouldDefer — only used when leaving plan mode
|
|
200
|
-
false,
|
|
201
|
-
// alwaysLoad
|
|
202
|
-
"plan mode exit approve"
|
|
203
|
-
);
|
|
204
|
-
this.config = config;
|
|
205
|
-
}
|
|
206
|
-
static {
|
|
207
|
-
__name(this, "ExitPlanModeTool");
|
|
208
|
-
}
|
|
209
|
-
static Name = ToolNames.EXIT_PLAN_MODE;
|
|
210
|
-
validateToolParams(params) {
|
|
211
|
-
if (!params.plan || typeof params.plan !== "string" || params.plan.trim() === "") {
|
|
212
|
-
return 'Parameter "plan" must be a non-empty string.';
|
|
213
|
-
}
|
|
214
|
-
return null;
|
|
215
|
-
}
|
|
216
|
-
createInvocation(params) {
|
|
217
|
-
return new ExitPlanModeToolInvocation(this.config, params);
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
export {
|
|
221
|
-
ExitPlanModeTool
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* @license
|
|
225
|
-
* Copyright 2025 Qwen
|
|
226
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
227
|
-
*/
|