@qwen-code/qwen-code 0.6.0-nightly.20251226.3787e955 → 0.6.0-nightly.20251228.2bc80795
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/cli.js +1977 -1746
- package/locales/en.js +88 -133
- package/locales/ru.js +118 -147
- package/locales/zh.js +47 -164
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -154418,7 +154418,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
154418
154418
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
154419
154419
|
});
|
|
154420
154420
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
154421
|
-
const version2 = "0.6.0-nightly.
|
|
154421
|
+
const version2 = "0.6.0-nightly.20251228.2bc80795";
|
|
154422
154422
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
154423
154423
|
const baseHeaders = {
|
|
154424
154424
|
"User-Agent": userAgent2
|
|
@@ -287171,7 +287171,7 @@ var init_en3 = __esm({
|
|
|
287171
287171
|
"Theme configuration unavailable due to NO_COLOR env variable.": "Theme configuration unavailable due to NO_COLOR env variable.",
|
|
287172
287172
|
'Theme "{{themeName}}" not found.': 'Theme "{{themeName}}" not found.',
|
|
287173
287173
|
'Theme "{{themeName}}" not found in selected scope.': 'Theme "{{themeName}}" not found in selected scope.',
|
|
287174
|
-
"
|
|
287174
|
+
"Clear conversation history and free up context": "Clear conversation history and free up context",
|
|
287175
287175
|
"Compresses the context by replacing it with a summary.": "Compresses the context by replacing it with a summary.",
|
|
287176
287176
|
"open full Qwen Code documentation in your browser": "open full Qwen Code documentation in your browser",
|
|
287177
287177
|
"Configuration not available.": "Configuration not available.",
|
|
@@ -287291,6 +287291,7 @@ var init_en3 = __esm({
|
|
|
287291
287291
|
"(Use Enter to select{{tabText}})": "(Use Enter to select{{tabText}})",
|
|
287292
287292
|
", Tab to change focus": ", Tab to change focus",
|
|
287293
287293
|
"To see changes, Qwen Code must be restarted. Press r to exit and apply changes now.": "To see changes, Qwen Code must be restarted. Press r to exit and apply changes now.",
|
|
287294
|
+
'The command "/{{command}}" is not supported in non-interactive mode.': 'The command "/{{command}}" is not supported in non-interactive mode.',
|
|
287294
287295
|
// ============================================================================
|
|
287295
287296
|
// Settings Labels
|
|
287296
287297
|
// ============================================================================
|
|
@@ -287523,6 +287524,10 @@ var init_en3 = __esm({
|
|
|
287523
287524
|
"Already generating summary, wait for previous request to complete": "Already generating summary, wait for previous request to complete",
|
|
287524
287525
|
"No conversation found to summarize.": "No conversation found to summarize.",
|
|
287525
287526
|
"Failed to generate project context summary: {{error}}": "Failed to generate project context summary: {{error}}",
|
|
287527
|
+
"Saved project summary to {{filePathForDisplay}}.": "Saved project summary to {{filePathForDisplay}}.",
|
|
287528
|
+
"Saving project summary...": "Saving project summary...",
|
|
287529
|
+
"Generating project summary...": "Generating project summary...",
|
|
287530
|
+
"Failed to generate summary - no text content received from LLM response": "Failed to generate summary - no text content received from LLM response",
|
|
287526
287531
|
// ============================================================================
|
|
287527
287532
|
// Commands - Model
|
|
287528
287533
|
// ============================================================================
|
|
@@ -287533,8 +287538,8 @@ var init_en3 = __esm({
|
|
|
287533
287538
|
// ============================================================================
|
|
287534
287539
|
// Commands - Clear
|
|
287535
287540
|
// ============================================================================
|
|
287536
|
-
"
|
|
287537
|
-
"
|
|
287541
|
+
"Starting a new session, resetting chat, and clearing terminal.": "Starting a new session, resetting chat, and clearing terminal.",
|
|
287542
|
+
"Starting a new session and clearing.": "Starting a new session and clearing.",
|
|
287538
287543
|
// ============================================================================
|
|
287539
287544
|
// Commands - Compress
|
|
287540
287545
|
// ============================================================================
|
|
@@ -287779,134 +287784,139 @@ var init_en3 = __esm({
|
|
|
287779
287784
|
// ============================================================================
|
|
287780
287785
|
"Waiting for user confirmation...": "Waiting for user confirmation...",
|
|
287781
287786
|
"(esc to cancel, {{time}})": "(esc to cancel, {{time}})",
|
|
287782
|
-
|
|
287783
|
-
|
|
287784
|
-
|
|
287785
|
-
|
|
287786
|
-
|
|
287787
|
-
|
|
287788
|
-
|
|
287789
|
-
|
|
287790
|
-
|
|
287791
|
-
|
|
287792
|
-
|
|
287793
|
-
|
|
287794
|
-
|
|
287795
|
-
|
|
287796
|
-
|
|
287797
|
-
|
|
287798
|
-
|
|
287799
|
-
|
|
287800
|
-
|
|
287801
|
-
|
|
287802
|
-
|
|
287803
|
-
|
|
287804
|
-
|
|
287805
|
-
|
|
287806
|
-
|
|
287807
|
-
|
|
287808
|
-
|
|
287809
|
-
|
|
287810
|
-
|
|
287811
|
-
|
|
287812
|
-
|
|
287813
|
-
|
|
287814
|
-
|
|
287815
|
-
|
|
287816
|
-
|
|
287817
|
-
|
|
287818
|
-
|
|
287819
|
-
|
|
287820
|
-
|
|
287821
|
-
|
|
287822
|
-
|
|
287823
|
-
|
|
287824
|
-
|
|
287825
|
-
|
|
287826
|
-
|
|
287827
|
-
|
|
287828
|
-
|
|
287829
|
-
|
|
287830
|
-
|
|
287831
|
-
|
|
287832
|
-
|
|
287833
|
-
|
|
287834
|
-
|
|
287835
|
-
|
|
287836
|
-
|
|
287837
|
-
|
|
287838
|
-
|
|
287839
|
-
|
|
287840
|
-
|
|
287841
|
-
|
|
287842
|
-
|
|
287843
|
-
|
|
287844
|
-
|
|
287845
|
-
|
|
287846
|
-
|
|
287847
|
-
|
|
287848
|
-
|
|
287849
|
-
|
|
287850
|
-
|
|
287851
|
-
|
|
287852
|
-
|
|
287853
|
-
|
|
287854
|
-
|
|
287855
|
-
|
|
287856
|
-
|
|
287857
|
-
|
|
287858
|
-
|
|
287859
|
-
|
|
287860
|
-
|
|
287861
|
-
|
|
287862
|
-
|
|
287863
|
-
|
|
287864
|
-
|
|
287865
|
-
|
|
287866
|
-
|
|
287867
|
-
|
|
287868
|
-
|
|
287869
|
-
|
|
287870
|
-
|
|
287871
|
-
|
|
287872
|
-
|
|
287873
|
-
|
|
287874
|
-
|
|
287875
|
-
|
|
287876
|
-
|
|
287877
|
-
|
|
287878
|
-
|
|
287879
|
-
|
|
287880
|
-
|
|
287881
|
-
|
|
287882
|
-
|
|
287883
|
-
|
|
287884
|
-
|
|
287885
|
-
|
|
287886
|
-
|
|
287887
|
-
|
|
287888
|
-
|
|
287889
|
-
|
|
287890
|
-
|
|
287891
|
-
|
|
287892
|
-
|
|
287893
|
-
|
|
287894
|
-
|
|
287895
|
-
|
|
287896
|
-
|
|
287897
|
-
|
|
287898
|
-
|
|
287899
|
-
|
|
287900
|
-
|
|
287901
|
-
|
|
287902
|
-
|
|
287903
|
-
|
|
287904
|
-
|
|
287905
|
-
|
|
287906
|
-
|
|
287907
|
-
|
|
287908
|
-
|
|
287909
|
-
|
|
287787
|
+
// ============================================================================
|
|
287788
|
+
// Loading Phrases
|
|
287789
|
+
// ============================================================================
|
|
287790
|
+
WITTY_LOADING_PHRASES: [
|
|
287791
|
+
"I'm Feeling Lucky",
|
|
287792
|
+
"Shipping awesomeness... ",
|
|
287793
|
+
"Painting the serifs back on...",
|
|
287794
|
+
"Navigating the slime mold...",
|
|
287795
|
+
"Consulting the digital spirits...",
|
|
287796
|
+
"Reticulating splines...",
|
|
287797
|
+
"Warming up the AI hamsters...",
|
|
287798
|
+
"Asking the magic conch shell...",
|
|
287799
|
+
"Generating witty retort...",
|
|
287800
|
+
"Polishing the algorithms...",
|
|
287801
|
+
"Don't rush perfection (or my code)...",
|
|
287802
|
+
"Brewing fresh bytes...",
|
|
287803
|
+
"Counting electrons...",
|
|
287804
|
+
"Engaging cognitive processors...",
|
|
287805
|
+
"Checking for syntax errors in the universe...",
|
|
287806
|
+
"One moment, optimizing humor...",
|
|
287807
|
+
"Shuffling punchlines...",
|
|
287808
|
+
"Untangling neural nets...",
|
|
287809
|
+
"Compiling brilliance...",
|
|
287810
|
+
"Loading wit.exe...",
|
|
287811
|
+
"Summoning the cloud of wisdom...",
|
|
287812
|
+
"Preparing a witty response...",
|
|
287813
|
+
"Just a sec, I'm debugging reality...",
|
|
287814
|
+
"Confuzzling the options...",
|
|
287815
|
+
"Tuning the cosmic frequencies...",
|
|
287816
|
+
"Crafting a response worthy of your patience...",
|
|
287817
|
+
"Compiling the 1s and 0s...",
|
|
287818
|
+
"Resolving dependencies... and existential crises...",
|
|
287819
|
+
"Defragmenting memories... both RAM and personal...",
|
|
287820
|
+
"Rebooting the humor module...",
|
|
287821
|
+
"Caching the essentials (mostly cat memes)...",
|
|
287822
|
+
"Optimizing for ludicrous speed",
|
|
287823
|
+
"Swapping bits... don't tell the bytes...",
|
|
287824
|
+
"Garbage collecting... be right back...",
|
|
287825
|
+
"Assembling the interwebs...",
|
|
287826
|
+
"Converting coffee into code...",
|
|
287827
|
+
"Updating the syntax for reality...",
|
|
287828
|
+
"Rewiring the synapses...",
|
|
287829
|
+
"Looking for a misplaced semicolon...",
|
|
287830
|
+
"Greasin' the cogs of the machine...",
|
|
287831
|
+
"Pre-heating the servers...",
|
|
287832
|
+
"Calibrating the flux capacitor...",
|
|
287833
|
+
"Engaging the improbability drive...",
|
|
287834
|
+
"Channeling the Force...",
|
|
287835
|
+
"Aligning the stars for optimal response...",
|
|
287836
|
+
"So say we all...",
|
|
287837
|
+
"Loading the next great idea...",
|
|
287838
|
+
"Just a moment, I'm in the zone...",
|
|
287839
|
+
"Preparing to dazzle you with brilliance...",
|
|
287840
|
+
"Just a tick, I'm polishing my wit...",
|
|
287841
|
+
"Hold tight, I'm crafting a masterpiece...",
|
|
287842
|
+
"Just a jiffy, I'm debugging the universe...",
|
|
287843
|
+
"Just a moment, I'm aligning the pixels...",
|
|
287844
|
+
"Just a sec, I'm optimizing the humor...",
|
|
287845
|
+
"Just a moment, I'm tuning the algorithms...",
|
|
287846
|
+
"Warp speed engaged...",
|
|
287847
|
+
"Mining for more Dilithium crystals...",
|
|
287848
|
+
"Don't panic...",
|
|
287849
|
+
"Following the white rabbit...",
|
|
287850
|
+
"The truth is in here... somewhere...",
|
|
287851
|
+
"Blowing on the cartridge...",
|
|
287852
|
+
"Loading... Do a barrel roll!",
|
|
287853
|
+
"Waiting for the respawn...",
|
|
287854
|
+
"Finishing the Kessel Run in less than 12 parsecs...",
|
|
287855
|
+
"The cake is not a lie, it's just still loading...",
|
|
287856
|
+
"Fiddling with the character creation screen...",
|
|
287857
|
+
"Just a moment, I'm finding the right meme...",
|
|
287858
|
+
"Pressing 'A' to continue...",
|
|
287859
|
+
"Herding digital cats...",
|
|
287860
|
+
"Polishing the pixels...",
|
|
287861
|
+
"Finding a suitable loading screen pun...",
|
|
287862
|
+
"Distracting you with this witty phrase...",
|
|
287863
|
+
"Almost there... probably...",
|
|
287864
|
+
"Our hamsters are working as fast as they can...",
|
|
287865
|
+
"Giving Cloudy a pat on the head...",
|
|
287866
|
+
"Petting the cat...",
|
|
287867
|
+
"Rickrolling my boss...",
|
|
287868
|
+
"Never gonna give you up, never gonna let you down...",
|
|
287869
|
+
"Slapping the bass...",
|
|
287870
|
+
"Tasting the snozberries...",
|
|
287871
|
+
"I'm going the distance, I'm going for speed...",
|
|
287872
|
+
"Is this the real life? Is this just fantasy?...",
|
|
287873
|
+
"I've got a good feeling about this...",
|
|
287874
|
+
"Poking the bear...",
|
|
287875
|
+
"Doing research on the latest memes...",
|
|
287876
|
+
"Figuring out how to make this more witty...",
|
|
287877
|
+
"Hmmm... let me think...",
|
|
287878
|
+
"What do you call a fish with no eyes? A fsh...",
|
|
287879
|
+
"Why did the computer go to therapy? It had too many bytes...",
|
|
287880
|
+
"Why don't programmers like nature? It has too many bugs...",
|
|
287881
|
+
"Why do programmers prefer dark mode? Because light attracts bugs...",
|
|
287882
|
+
"Why did the developer go broke? Because they used up all their cache...",
|
|
287883
|
+
"What can you do with a broken pencil? Nothing, it's pointless...",
|
|
287884
|
+
"Applying percussive maintenance...",
|
|
287885
|
+
"Searching for the correct USB orientation...",
|
|
287886
|
+
"Ensuring the magic smoke stays inside the wires...",
|
|
287887
|
+
"Rewriting in Rust for no particular reason...",
|
|
287888
|
+
"Trying to exit Vim...",
|
|
287889
|
+
"Spinning up the hamster wheel...",
|
|
287890
|
+
"That's not a bug, it's an undocumented feature...",
|
|
287891
|
+
"Engage.",
|
|
287892
|
+
"I'll be back... with an answer.",
|
|
287893
|
+
"My other process is a TARDIS...",
|
|
287894
|
+
"Communing with the machine spirit...",
|
|
287895
|
+
"Letting the thoughts marinate...",
|
|
287896
|
+
"Just remembered where I put my keys...",
|
|
287897
|
+
"Pondering the orb...",
|
|
287898
|
+
"I've seen things you people wouldn't believe... like a user who reads loading messages.",
|
|
287899
|
+
"Initiating thoughtful gaze...",
|
|
287900
|
+
"What's a computer's favorite snack? Microchips.",
|
|
287901
|
+
"Why do Java developers wear glasses? Because they don't C#.",
|
|
287902
|
+
"Charging the laser... pew pew!",
|
|
287903
|
+
"Dividing by zero... just kidding!",
|
|
287904
|
+
"Looking for an adult superviso... I mean, processing.",
|
|
287905
|
+
"Making it go beep boop.",
|
|
287906
|
+
"Buffering... because even AIs need a moment.",
|
|
287907
|
+
"Entangling quantum particles for a faster response...",
|
|
287908
|
+
"Polishing the chrome... on the algorithms.",
|
|
287909
|
+
"Are you not entertained? (Working on it!)",
|
|
287910
|
+
"Summoning the code gremlins... to help, of course.",
|
|
287911
|
+
"Just waiting for the dial-up tone to finish...",
|
|
287912
|
+
"Recalibrating the humor-o-meter.",
|
|
287913
|
+
"My other loading screen is even funnier.",
|
|
287914
|
+
"Pretty sure there's a cat walking on the keyboard somewhere...",
|
|
287915
|
+
"Enhancing... Enhancing... Still loading.",
|
|
287916
|
+
"It's not a bug, it's a feature... of this loading screen.",
|
|
287917
|
+
"Have you tried turning it off and on again? (The loading screen, not me.)",
|
|
287918
|
+
"Constructing additional pylons..."
|
|
287919
|
+
]
|
|
287910
287920
|
};
|
|
287911
287921
|
}
|
|
287912
287922
|
});
|
|
@@ -287998,7 +288008,7 @@ var init_ru = __esm({
|
|
|
287998
288008
|
"Theme configuration unavailable due to NO_COLOR env variable.": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0442\u0435\u043C\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0438\u0437-\u0437\u0430 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F NO_COLOR.",
|
|
287999
288009
|
'Theme "{{themeName}}" not found.': '\u0422\u0435\u043C\u0430 "{{themeName}}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.',
|
|
288000
288010
|
'Theme "{{themeName}}" not found in selected scope.': '\u0422\u0435\u043C\u0430 "{{themeName}}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0432 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438.',
|
|
288001
|
-
"
|
|
288011
|
+
"Clear conversation history and free up context": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0434\u0438\u0430\u043B\u043E\u0433\u0430 \u0438 \u043E\u0441\u0432\u043E\u0431\u043E\u0434\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442",
|
|
288002
288012
|
"Compresses the context by replacing it with a summary.": "\u0421\u0436\u0430\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430 \u0437\u0430\u043C\u0435\u043D\u043E\u0439 \u043D\u0430 \u043A\u0440\u0430\u0442\u043A\u0443\u044E \u0441\u0432\u043E\u0434\u043A\u0443",
|
|
288003
288013
|
"open full Qwen Code documentation in your browser": "\u041E\u0442\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u043E\u043B\u043D\u043E\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u0438 Qwen Code \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435",
|
|
288004
288014
|
"Configuration not available.": "\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.",
|
|
@@ -288118,6 +288128,7 @@ var init_ru = __esm({
|
|
|
288118
288128
|
"(Use Enter to select{{tabText}})": "(Enter \u0434\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430{{tabText}})",
|
|
288119
288129
|
", Tab to change focus": ", Tab \u0434\u043B\u044F \u0441\u043C\u0435\u043D\u044B \u0444\u043E\u043A\u0443\u0441\u0430",
|
|
288120
288130
|
"To see changes, Qwen Code must be restarted. Press r to exit and apply changes now.": "\u0414\u043B\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C Qwen Code. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 r \u0434\u043B\u044F \u0432\u044B\u0445\u043E\u0434\u0430 \u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439.",
|
|
288131
|
+
'The command "/{{command}}" is not supported in non-interactive mode.': '\u041A\u043E\u043C\u0430\u043D\u0434\u0430 "/{{command}}" \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043D\u0435\u0438\u043D\u0442\u0435\u0440\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435.',
|
|
288121
288132
|
// ============================================================================
|
|
288122
288133
|
// Метки настроек
|
|
288123
288134
|
// ============================================================================
|
|
@@ -288169,6 +288180,7 @@ var init_ru = __esm({
|
|
|
288169
288180
|
"Tool Output Truncation Lines": "\u041B\u0438\u043C\u0438\u0442 \u0441\u0442\u0440\u043E\u043A \u0432\u044B\u0432\u043E\u0434\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432",
|
|
288170
288181
|
"Folder Trust": "\u0414\u043E\u0432\u0435\u0440\u0438\u0435 \u043A \u043F\u0430\u043F\u043A\u0435",
|
|
288171
288182
|
"Vision Model Preview": "\u0412\u0438\u0437\u0443\u0430\u043B\u044C\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C (\u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440)",
|
|
288183
|
+
"Tool Schema Compliance": "\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0445\u0435\u043C\u0435 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430",
|
|
288172
288184
|
// Варианты перечислений настроек
|
|
288173
288185
|
"Auto (detect from system)": "\u0410\u0432\u0442\u043E (\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u0442\u044C \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B)",
|
|
288174
288186
|
Text: "\u0422\u0435\u043A\u0441\u0442",
|
|
@@ -288189,7 +288201,7 @@ var init_ru = __esm({
|
|
|
288189
288201
|
"set external editor preference": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u0435\u043C\u043E\u0433\u043E \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430",
|
|
288190
288202
|
"Manage extensions": "\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F\u043C\u0438",
|
|
288191
288203
|
"List active extensions": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F",
|
|
288192
|
-
"Update extensions. Usage: update
|
|
288204
|
+
"Update extensions. Usage: update <extension-names>|--all": "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: update <extension-names>|--all",
|
|
288193
288205
|
"manage IDE integration": "\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 IDE",
|
|
288194
288206
|
"check status of IDE integration": "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 IDE",
|
|
288195
288207
|
"install required IDE companion for {{ideName}}": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u044C\u043E\u043D IDE \u0434\u043B\u044F {{ideName}}",
|
|
@@ -288227,7 +288239,7 @@ var init_ru = __esm({
|
|
|
288227
288239
|
"Set UI language": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u044F\u0437\u044B\u043A\u0430 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430",
|
|
288228
288240
|
"Set LLM output language": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u044F\u0437\u044B\u043A\u0430 \u0432\u044B\u0432\u043E\u0434\u0430 LLM",
|
|
288229
288241
|
"Usage: /language ui [zh-CN|en-US]": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /language ui [zh-CN|en-US|ru-RU]",
|
|
288230
|
-
"Usage: /language output ": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /language output ",
|
|
288242
|
+
"Usage: /language output <language>": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /language output <language>",
|
|
288231
288243
|
"Example: /language output \u4E2D\u6587": "\u041F\u0440\u0438\u043C\u0435\u0440: /language output \u4E2D\u6587",
|
|
288232
288244
|
"Example: /language output English": "\u041F\u0440\u0438\u043C\u0435\u0440: /language output English",
|
|
288233
288245
|
"Example: /language output \u65E5\u672C\u8A9E": "\u041F\u0440\u0438\u043C\u0435\u0440: /language output \u65E5\u672C\u8A9E",
|
|
@@ -288239,9 +288251,8 @@ var init_ru = __esm({
|
|
|
288239
288251
|
"Available subcommands:": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043F\u043E\u0434\u043A\u043E\u043C\u0430\u043D\u0434\u044B:",
|
|
288240
288252
|
"To request additional UI language packs, please open an issue on GitHub.": "\u0414\u043B\u044F \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u044F\u0437\u044B\u043A\u043E\u0432\u044B\u0445 \u043F\u0430\u043A\u0435\u0442\u043E\u0432 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 GitHub.",
|
|
288241
288253
|
"Available options:": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B:",
|
|
288242
|
-
"
|
|
288243
|
-
"
|
|
288244
|
-
" - ru-RU: Russian": " - ru-RU: \u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
288254
|
+
" - zh-CN: Simplified Chinese": " - zh-CN: \u0423\u043F\u0440\u043E\u0449\u0435\u043D\u043D\u044B\u0439 \u043A\u0438\u0442\u0430\u0439\u0441\u043A\u0438\u0439",
|
|
288255
|
+
" - en-US: English": " - en-US: \u0410\u043D\u0433\u043B\u0438\u0439\u0441\u043A\u0438\u0439",
|
|
288245
288256
|
"Set UI language to Simplified Chinese (zh-CN)": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u044F\u0437\u044B\u043A \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043D\u0430 \u0443\u043F\u0440\u043E\u0449\u0435\u043D\u043D\u044B\u0439 \u043A\u0438\u0442\u0430\u0439\u0441\u043A\u0438\u0439 (zh-CN)",
|
|
288246
288257
|
"Set UI language to English (en-US)": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u044F\u0437\u044B\u043A \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043D\u0430 \u0430\u043D\u0433\u043B\u0438\u0439\u0441\u043A\u0438\u0439 (en-US)",
|
|
288247
288258
|
// ============================================================================
|
|
@@ -288252,7 +288263,7 @@ var init_ru = __esm({
|
|
|
288252
288263
|
"Available approval modes:": "\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0440\u0435\u0436\u0438\u043C\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F:",
|
|
288253
288264
|
"Approval mode changed to: {{mode}}": "\u0420\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D \u043D\u0430: {{mode}}",
|
|
288254
288265
|
"Approval mode changed to: {{mode}} (saved to {{scope}} settings{{location}})": "\u0420\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D \u043D\u0430: {{mode}} (\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 {{scope}}{{location}})",
|
|
288255
|
-
"Usage: /approval-mode [--session|--user|--project]": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /approval-mode [--session|--user|--project]",
|
|
288266
|
+
"Usage: /approval-mode <mode> [--session|--user|--project]": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /approval-mode <mode> [--session|--user|--project]",
|
|
288256
288267
|
"Scope subcommands do not accept additional arguments.": "\u041F\u043E\u0434\u043A\u043E\u043C\u0430\u043D\u0434\u044B \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u044E\u0442 \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0430\u0440\u0433\u0443\u043C\u0435\u043D\u0442\u043E\u0432.",
|
|
288257
288268
|
"Plan mode - Analyze only, do not modify files or execute commands": "\u0420\u0435\u0436\u0438\u043C \u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F - \u0442\u043E\u043B\u044C\u043A\u043E \u0430\u043D\u0430\u043B\u0438\u0437, \u0431\u0435\u0437 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0444\u0430\u0439\u043B\u043E\u0432 \u0438\u043B\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043A\u043E\u043C\u0430\u043D\u0434",
|
|
288258
288269
|
"Default mode - Require approval for file edits or shell commands": "\u0420\u0435\u0436\u0438\u043C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E - \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0444\u0430\u0439\u043B\u043E\u0432 \u0438\u043B\u0438 \u043A\u043E\u043C\u0430\u043D\u0434 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430",
|
|
@@ -288341,7 +288352,7 @@ var init_ru = __esm({
|
|
|
288341
288352
|
"Error sharing conversation: {{error}}": "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u044D\u043A\u0441\u043F\u043E\u0440\u0442\u0435 \u0434\u0438\u0430\u043B\u043E\u0433\u0430: {{error}}",
|
|
288342
288353
|
"Conversation shared to {{filePath}}": "\u0414\u0438\u0430\u043B\u043E\u0433 \u044D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D \u0432 {{filePath}}",
|
|
288343
288354
|
"No conversation found to share.": "\u041D\u0435\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u0430 \u0434\u043B\u044F \u044D\u043A\u0441\u043F\u043E\u0440\u0442\u0430.",
|
|
288344
|
-
"Share the current conversation to a markdown or json file. Usage: /chat share
|
|
288355
|
+
"Share the current conversation to a markdown or json file. Usage: /chat share <file>": "\u042D\u043A\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0432 markdown \u0438\u043B\u0438 json \u0444\u0430\u0439\u043B. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435: /chat share <\u0444\u0430\u0439\u043B>",
|
|
288345
288356
|
// ============================================================================
|
|
288346
288357
|
// Команды - Резюме
|
|
288347
288358
|
// ============================================================================
|
|
@@ -288350,6 +288361,10 @@ var init_ru = __esm({
|
|
|
288350
288361
|
"Already generating summary, wait for previous request to complete": "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0441\u0432\u043E\u0434\u043A\u0438 \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F, \u0434\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0430",
|
|
288351
288362
|
"No conversation found to summarize.": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432 \u0434\u043B\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0441\u0432\u043E\u0434\u043A\u0438.",
|
|
288352
288363
|
"Failed to generate project context summary: {{error}}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u043E\u0434\u043A\u0443 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430: {{error}}",
|
|
288364
|
+
"Saved project summary to {{filePathForDisplay}}.": "\u0421\u0432\u043E\u0434\u043A\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430 \u0432 {{filePathForDisplay}}",
|
|
288365
|
+
"Saving project summary...": "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0434\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430...",
|
|
288366
|
+
"Generating project summary...": "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F \u0441\u0432\u043E\u0434\u043A\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0430...",
|
|
288367
|
+
"Failed to generate summary - no text content received from LLM response": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u043E\u0434\u043A\u0443 - \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u043A\u043E\u043D\u0442\u0435\u043D\u0442 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430 LLM",
|
|
288353
288368
|
// ============================================================================
|
|
288354
288369
|
// Команды - Модель
|
|
288355
288370
|
// ============================================================================
|
|
@@ -288360,8 +288375,8 @@ var init_ru = __esm({
|
|
|
288360
288375
|
// ============================================================================
|
|
288361
288376
|
// Команды - Очистка
|
|
288362
288377
|
// ============================================================================
|
|
288363
|
-
"
|
|
288364
|
-
"
|
|
288378
|
+
"Starting a new session, resetting chat, and clearing terminal.": "\u041D\u0430\u0447\u0430\u043B\u043E \u043D\u043E\u0432\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438, \u0441\u0431\u0440\u043E\u0441 \u0447\u0430\u0442\u0430 \u0438 \u043E\u0447\u0438\u0441\u0442\u043A\u0430 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430.",
|
|
288379
|
+
"Starting a new session and clearing.": "\u041D\u0430\u0447\u0430\u043B\u043E \u043D\u043E\u0432\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438 \u043E\u0447\u0438\u0441\u0442\u043A\u0430.",
|
|
288365
288380
|
// ============================================================================
|
|
288366
288381
|
// Команды - Сжатие
|
|
288367
288382
|
// ============================================================================
|
|
@@ -288381,7 +288396,7 @@ var init_ru = __esm({
|
|
|
288381
288396
|
"Please provide at least one path to add.": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0443\u043A\u0430\u0436\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u0438\u043D \u043F\u0443\u0442\u044C \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F.",
|
|
288382
288397
|
"The /directory add command is not supported in restrictive sandbox profiles. Please use --include-directories when starting the session instead.": "\u041A\u043E\u043C\u0430\u043D\u0434\u0430 /directory add \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u043F\u0440\u043E\u0444\u0438\u043B\u044F\u0445 \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 --include-directories \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435 \u0441\u0435\u0441\u0441\u0438\u0438.",
|
|
288383
288398
|
"Error adding '{{path}}': {{error}}": "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 '{{path}}': {{error}}",
|
|
288384
|
-
"Successfully added
|
|
288399
|
+
"Successfully added QWEN.md files from the following directories if there are:\n- {{directories}}": "\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u044B \u0444\u0430\u0439\u043B\u044B QWEN.md \u0438\u0437 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0445 \u0434\u0438\u0440\u0435\u043A\u0442\u043E\u0440\u0438\u0439 (\u0435\u0441\u043B\u0438 \u043E\u043D\u0438 \u0435\u0441\u0442\u044C):\n- {{directories}}",
|
|
288385
288400
|
"Error refreshing memory: {{error}}": "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0438 \u043F\u0430\u043C\u044F\u0442\u0438: {{error}}",
|
|
288386
288401
|
"Successfully added directories:\n- {{directories}}": "\u0423\u0441\u043F\u0435\u0448\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u044B \u0434\u0438\u0440\u0435\u043A\u0442\u043E\u0440\u0438\u0438:\n- {{directories}}",
|
|
288387
288402
|
"Current workspace directories:\n{{directories}}": "\u0422\u0435\u043A\u0443\u0449\u0438\u0435 \u0434\u0438\u0440\u0435\u043A\u0442\u043E\u0440\u0438\u0438 \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430:\n{{directories}}",
|
|
@@ -288553,6 +288568,7 @@ var init_ru = __esm({
|
|
|
288553
288568
|
// Экран выхода / Статистика
|
|
288554
288569
|
// ============================================================================
|
|
288555
288570
|
"Agent powering down. Goodbye!": "\u0410\u0433\u0435\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043E\u0442\u0443. \u0414\u043E \u0441\u0432\u0438\u0434\u0430\u043D\u0438\u044F!",
|
|
288571
|
+
"To continue this session, run": "\u0414\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F \u044D\u0442\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435",
|
|
288556
288572
|
"Interaction Summary": "\u0421\u0432\u043E\u0434\u043A\u0430 \u0432\u0437\u0430\u0438\u043C\u043E\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F",
|
|
288557
288573
|
"Session ID:": "ID \u0441\u0435\u0441\u0441\u0438\u0438:",
|
|
288558
288574
|
"Tool Calls:": "\u0412\u044B\u0437\u043E\u0432\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432:",
|
|
@@ -288605,134 +288621,140 @@ var init_ru = __esm({
|
|
|
288605
288621
|
// ============================================================================
|
|
288606
288622
|
"Waiting for user confirmation...": "\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043E\u0442 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F...",
|
|
288607
288623
|
"(esc to cancel, {{time}})": "(esc \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B, {{time}})",
|
|
288608
|
-
|
|
288609
|
-
|
|
288610
|
-
|
|
288611
|
-
|
|
288612
|
-
|
|
288613
|
-
|
|
288614
|
-
|
|
288615
|
-
|
|
288616
|
-
|
|
288617
|
-
|
|
288618
|
-
|
|
288619
|
-
|
|
288620
|
-
|
|
288621
|
-
|
|
288622
|
-
|
|
288623
|
-
|
|
288624
|
-
|
|
288625
|
-
|
|
288626
|
-
|
|
288627
|
-
|
|
288628
|
-
|
|
288629
|
-
|
|
288630
|
-
|
|
288631
|
-
|
|
288632
|
-
|
|
288633
|
-
|
|
288634
|
-
|
|
288635
|
-
|
|
288636
|
-
|
|
288637
|
-
|
|
288638
|
-
|
|
288639
|
-
|
|
288640
|
-
|
|
288641
|
-
|
|
288642
|
-
|
|
288643
|
-
|
|
288644
|
-
|
|
288645
|
-
|
|
288646
|
-
|
|
288647
|
-
|
|
288648
|
-
|
|
288649
|
-
|
|
288650
|
-
|
|
288651
|
-
|
|
288652
|
-
|
|
288653
|
-
|
|
288654
|
-
|
|
288655
|
-
|
|
288656
|
-
|
|
288657
|
-
|
|
288658
|
-
|
|
288659
|
-
|
|
288660
|
-
|
|
288661
|
-
|
|
288662
|
-
|
|
288663
|
-
|
|
288664
|
-
|
|
288665
|
-
|
|
288666
|
-
|
|
288667
|
-
|
|
288668
|
-
|
|
288669
|
-
|
|
288670
|
-
|
|
288671
|
-
|
|
288672
|
-
|
|
288673
|
-
|
|
288674
|
-
|
|
288675
|
-
|
|
288676
|
-
|
|
288677
|
-
|
|
288678
|
-
|
|
288679
|
-
|
|
288680
|
-
|
|
288681
|
-
|
|
288682
|
-
|
|
288683
|
-
|
|
288684
|
-
|
|
288685
|
-
|
|
288686
|
-
|
|
288687
|
-
|
|
288688
|
-
|
|
288689
|
-
|
|
288690
|
-
|
|
288691
|
-
|
|
288692
|
-
|
|
288693
|
-
|
|
288694
|
-
|
|
288695
|
-
|
|
288696
|
-
|
|
288697
|
-
|
|
288698
|
-
|
|
288699
|
-
|
|
288700
|
-
|
|
288701
|
-
|
|
288702
|
-
|
|
288703
|
-
|
|
288704
|
-
|
|
288705
|
-
|
|
288706
|
-
|
|
288707
|
-
|
|
288708
|
-
|
|
288709
|
-
|
|
288710
|
-
|
|
288711
|
-
|
|
288712
|
-
|
|
288713
|
-
|
|
288714
|
-
|
|
288715
|
-
|
|
288716
|
-
|
|
288717
|
-
|
|
288718
|
-
|
|
288719
|
-
|
|
288720
|
-
|
|
288721
|
-
|
|
288722
|
-
|
|
288723
|
-
|
|
288724
|
-
|
|
288725
|
-
|
|
288726
|
-
|
|
288727
|
-
|
|
288728
|
-
|
|
288729
|
-
|
|
288730
|
-
|
|
288731
|
-
|
|
288732
|
-
|
|
288733
|
-
|
|
288734
|
-
|
|
288735
|
-
|
|
288624
|
+
// ============================================================================
|
|
288625
|
+
// ============================================================================
|
|
288626
|
+
// Loading Phrases
|
|
288627
|
+
// ============================================================================
|
|
288628
|
+
WITTY_LOADING_PHRASES: [
|
|
288629
|
+
"\u041C\u043D\u0435 \u043F\u043E\u0432\u0435\u0437\u0451\u0442!",
|
|
288630
|
+
"\u0414\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u043C \u043A\u0440\u0443\u0442\u0438\u0437\u043D\u0443... ",
|
|
288631
|
+
"\u0420\u0438\u0441\u0443\u0435\u043C \u0437\u0430\u0441\u0435\u0447\u043A\u0438 \u043D\u0430 \u0431\u0443\u043A\u0432\u0430\u0445...",
|
|
288632
|
+
"\u041F\u0440\u043E\u0431\u0438\u0440\u0430\u0435\u043C\u0441\u044F \u0447\u0435\u0440\u0435\u0437 \u0441\u043B\u0438\u0437\u0435\u0432\u0438\u043A\u043E\u0432..",
|
|
288633
|
+
"\u0421\u043E\u0432\u0435\u0442\u0443\u0435\u043C\u0441\u044F \u0441 \u0446\u0438\u0444\u0440\u043E\u0432\u044B\u043C\u0438 \u0434\u0443\u0445\u0430\u043C\u0438...",
|
|
288634
|
+
"\u0421\u0433\u043B\u0430\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0441\u043F\u043B\u0430\u0439\u043D\u043E\u0432...",
|
|
288635
|
+
"\u0420\u0430\u0437\u043E\u0433\u0440\u0435\u0432\u0430\u0435\u043C \u0418\u0418-\u0445\u043E\u043C\u044F\u0447\u043A\u043E\u0432...",
|
|
288636
|
+
"\u0421\u043F\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043C \u0432\u043E\u043B\u0448\u0435\u0431\u043D\u0443\u044E \u0440\u0430\u043A\u0443\u0448\u043A\u0443...",
|
|
288637
|
+
"\u0413\u0435\u043D\u0435\u0440\u0438\u0440\u0443\u0435\u043C \u043E\u0441\u0442\u0440\u043E\u0443\u043C\u043D\u044B\u0439 \u043E\u0442\u0432\u0435\u0442...",
|
|
288638
|
+
"\u041F\u043E\u043B\u0438\u0440\u0443\u0435\u043C \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C\u044B...",
|
|
288639
|
+
"\u041D\u0435 \u0442\u043E\u0440\u043E\u043F\u0438\u0442\u0435 \u0441\u043E\u0432\u0435\u0440\u0448\u0435\u043D\u0441\u0442\u0432\u043E (\u0438\u043B\u0438 \u043C\u043E\u0439 \u043A\u043E\u0434)...",
|
|
288640
|
+
"\u0417\u0430\u0432\u0430\u0440\u0438\u0432\u0430\u0435\u043C \u0441\u0432\u0435\u0436\u0438\u0435 \u0431\u0430\u0439\u0442\u044B...",
|
|
288641
|
+
"\u041F\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044B\u0432\u0430\u0435\u043C \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u044B...",
|
|
288642
|
+
"\u0417\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043C \u043A\u043E\u0433\u043D\u0438\u0442\u0438\u0432\u043D\u044B\u0435 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0440\u044B...",
|
|
288643
|
+
"\u0418\u0449\u0435\u043C \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u043E\u0448\u0438\u0431\u043A\u0438 \u0432\u043E \u0432\u0441\u0435\u043B\u0435\u043D\u043D\u043E\u0439...",
|
|
288644
|
+
"\u0421\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443, \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u0443\u0435\u043C \u044E\u043C\u043E\u0440...",
|
|
288645
|
+
"\u041F\u0435\u0440\u0435\u0442\u0430\u0441\u043E\u0432\u044B\u0432\u0430\u0435\u043C \u043F\u0430\u043D\u0447\u043B\u0430\u0439\u043D\u044B...",
|
|
288646
|
+
"\u0420\u0430\u0441\u043F\u0443\u0442\u0430\u0432\u0430\u0435\u043C \u043D\u0435\u0439\u0440\u043E\u0441\u0435\u0442\u0438...",
|
|
288647
|
+
"\u041A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u0433\u0435\u043D\u0438\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u044C...",
|
|
288648
|
+
"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C yumor.exe...",
|
|
288649
|
+
"\u041F\u0440\u0438\u0437\u044B\u0432\u0430\u0435\u043C \u043E\u0431\u043B\u0430\u043A\u043E \u043C\u0443\u0434\u0440\u043E\u0441\u0442\u0438...",
|
|
288650
|
+
"\u0413\u043E\u0442\u043E\u0432\u0438\u043C \u043E\u0441\u0442\u0440\u043E\u0443\u043C\u043D\u044B\u0439 \u043E\u0442\u0432\u0435\u0442...",
|
|
288651
|
+
"\u0421\u0435\u043A\u0443\u043D\u0434\u0443, \u0438\u0434\u0451\u0442 \u043E\u0442\u043B\u0430\u0434\u043A\u0430 \u0440\u0435\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u0438...",
|
|
288652
|
+
"\u0417\u0430\u043F\u0443\u0442\u044B\u0432\u0430\u0435\u043C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B...",
|
|
288653
|
+
"\u041D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C \u043A\u043E\u0441\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0447\u0430\u0441\u0442\u043E\u0442\u044B...",
|
|
288654
|
+
"\u0421\u043E\u0437\u0434\u0430\u0435\u043C \u043E\u0442\u0432\u0435\u0442, \u0434\u043E\u0441\u0442\u043E\u0439\u043D\u044B\u0439 \u0432\u0430\u0448\u0435\u0433\u043E \u0442\u0435\u0440\u043F\u0435\u043D\u0438\u044F...",
|
|
288655
|
+
"\u041A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u0435\u0434\u0438\u043D\u0438\u0447\u043A\u0438 \u0438 \u043D\u043E\u043B\u0438\u043A\u0438...",
|
|
288656
|
+
"\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043C \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438... \u0438 \u044D\u043A\u0437\u0438\u0441\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043A\u0440\u0438\u0437\u0438\u0441\u044B...",
|
|
288657
|
+
"\u0414\u0435\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F \u043F\u0430\u043C\u044F\u0442\u0438... \u0438 \u043E\u043F\u0435\u0440\u0430\u0442\u0438\u0432\u043D\u043E\u0439, \u0438 \u043B\u0438\u0447\u043D\u043E\u0439...",
|
|
288658
|
+
"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u043E\u0434\u0443\u043B\u044F \u044E\u043C\u043E\u0440\u0430...",
|
|
288659
|
+
"\u041A\u044D\u0448\u0438\u0440\u0443\u0435\u043C \u0441\u0430\u043C\u043E\u0435 \u0432\u0430\u0436\u043D\u043E\u0435 (\u0432 \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u043C \u043C\u0435\u043C\u044B \u0441 \u043A\u043E\u0442\u0438\u043A\u0430\u043C\u0438)...",
|
|
288660
|
+
"\u041E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u0431\u0435\u0437\u0443\u043C\u043D\u043E\u0439 \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u0438",
|
|
288661
|
+
"\u041C\u0435\u043D\u044F\u0435\u043C \u0431\u0438\u0442\u044B... \u0442\u043E\u043B\u044C\u043A\u043E \u0431\u0430\u0439\u0442\u0430\u043C \u043D\u0435 \u0433\u043E\u0432\u043E\u0440\u0438\u0442\u0435...",
|
|
288662
|
+
"\u0421\u0431\u043E\u0440\u043A\u0430 \u043C\u0443\u0441\u043E\u0440\u0430... \u0441\u043A\u043E\u0440\u043E \u0432\u0435\u0440\u043D\u0443\u0441\u044C...",
|
|
288663
|
+
"\u0421\u0431\u043E\u0440\u043A\u0430 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442\u043E\u0432...",
|
|
288664
|
+
"\u041F\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043C \u043A\u043E\u0444\u0435 \u0432 \u043A\u043E\u0434...",
|
|
288665
|
+
"\u041E\u0431\u043D\u043E\u0432\u043B\u044F\u0435\u043C \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441 \u0440\u0435\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u0438...",
|
|
288666
|
+
"\u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0441\u0438\u043D\u0430\u043F\u0441\u044B...",
|
|
288667
|
+
"\u0418\u0449\u0435\u043C \u043B\u0438\u0448\u043D\u044E\u044E \u0442\u043E\u0447\u043A\u0443 \u0441 \u0437\u0430\u043F\u044F\u0442\u043E\u0439...",
|
|
288668
|
+
"\u0421\u043C\u0430\u0437\u044B\u0432\u0430\u0435\u043C \u0448\u0435\u0441\u0442\u0435\u0440\u0451\u043D\u043A\u0438 \u043C\u0430\u0448\u0438\u043D\u044B...",
|
|
288669
|
+
"\u0420\u0430\u0437\u043E\u0433\u0440\u0435\u0432\u0430\u0435\u043C \u0441\u0435\u0440\u0432\u0435\u0440\u044B...",
|
|
288670
|
+
"\u041A\u0430\u043B\u0438\u0431\u0440\u0443\u0435\u043C \u043F\u043E\u0442\u043E\u043A\u043E\u0432\u044B\u0439 \u043D\u0430\u043A\u043E\u043F\u0438\u0442\u0435\u043B\u044C...",
|
|
288671
|
+
"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C \u043D\u0435\u0432\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u0438...",
|
|
288672
|
+
"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C \u0421\u0438\u043B\u0443...",
|
|
288673
|
+
"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u0435\u043C \u0437\u0432\u0451\u0437\u0434\u044B \u0434\u043B\u044F \u043E\u043F\u0442\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430...",
|
|
288674
|
+
"\u0422\u0430\u043A \u0441\u043A\u0430\u0436\u0435\u043C \u043C\u044B \u0432\u0441\u0435...",
|
|
288675
|
+
"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439 \u0432\u0435\u043B\u0438\u043A\u043E\u0439 \u0438\u0434\u0435\u0438...",
|
|
288676
|
+
"\u041C\u0438\u043D\u0443\u0442\u043A\u0443, \u044F \u0432 \u043F\u043E\u0442\u043E\u043A\u0435...",
|
|
288677
|
+
"\u0413\u043E\u0442\u043E\u0432\u043B\u044E\u0441\u044C \u043E\u0441\u043B\u0435\u043F\u0438\u0442\u044C \u0432\u0430\u0441 \u0433\u0435\u043D\u0438\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u044C\u044E...",
|
|
288678
|
+
"\u0421\u0435\u043A\u0443\u043D\u0434\u0443, \u043F\u043E\u043B\u0438\u0440\u0443\u044E \u043E\u0441\u0442\u0440\u043E\u0443\u043C\u0438\u0435...",
|
|
288679
|
+
"\u0414\u0435\u0440\u0436\u0438\u0442\u0435\u0441\u044C, \u0441\u043E\u0437\u0434\u0430\u044E \u0448\u0435\u0434\u0435\u0432\u0440...",
|
|
288680
|
+
"\u041C\u0438\u0433\u043E\u043C, \u043E\u0442\u043B\u0430\u0436\u0438\u0432\u0430\u044E \u0432\u0441\u0435\u043B\u0435\u043D\u043D\u0443\u044E...",
|
|
288681
|
+
"\u041C\u043E\u043C\u0435\u043D\u0442, \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u044E \u043F\u0438\u043A\u0441\u0435\u043B\u0438...",
|
|
288682
|
+
"\u0421\u0435\u043A\u0443\u043D\u0434\u0443, \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u0443\u044E \u044E\u043C\u043E\u0440...",
|
|
288683
|
+
"\u041C\u043E\u043C\u0435\u043D\u0442, \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044E \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C\u044B...",
|
|
288684
|
+
"\u0412\u0430\u0440\u043F-\u043F\u0440\u044B\u0436\u043E\u043A \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D...",
|
|
288685
|
+
"\u0414\u043E\u0431\u044B\u0432\u0430\u0435\u043C \u043A\u0440\u0438\u0441\u0442\u0430\u043B\u043B\u044B \u0434\u0438\u043B\u0438\u0442\u0438\u044F...",
|
|
288686
|
+
"\u0411\u0435\u0437 \u043F\u0430\u043D\u0438\u043A\u0438...",
|
|
288687
|
+
"\u0421\u043B\u0435\u0434\u0443\u0435\u043C \u0437\u0430 \u0431\u0435\u043B\u044B\u043C \u043A\u0440\u043E\u043B\u0438\u043A\u043E\u043C...",
|
|
288688
|
+
"\u0418\u0441\u0442\u0438\u043D\u0430 \u0433\u0434\u0435-\u0442\u043E \u0437\u0434\u0435\u0441\u044C... \u0432\u043D\u0443\u0442\u0440\u0438...",
|
|
288689
|
+
"\u041F\u0440\u043E\u0434\u0443\u0432\u0430\u0435\u043C \u043A\u0430\u0440\u0442\u0440\u0438\u0434\u0436...",
|
|
288690
|
+
"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430... \u0421\u0434\u0435\u043B\u0430\u0439 \u0431\u043E\u0447\u043A\u0443!",
|
|
288691
|
+
"\u0416\u0434\u0435\u043C \u0440\u0435\u0441\u043F\u0430\u0443\u043D\u0430...",
|
|
288692
|
+
"\u0414\u0435\u043B\u0430\u0435\u043C \u0414\u0443\u0433\u0443 \u041A\u0435\u0441\u0441\u0435\u043B\u044F \u043C\u0435\u043D\u0435\u0435 \u0447\u0435\u043C \u0437\u0430 12 \u043F\u0430\u0440\u0441\u0435\u043A\u043E\u0432...",
|
|
288693
|
+
"\u0422\u043E\u0440\u0442\u0438\u043A \u2014 \u043D\u0435 \u043B\u043E\u0436\u044C, \u043E\u043D \u043F\u0440\u043E\u0441\u0442\u043E \u0435\u0449\u0451 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F...",
|
|
288694
|
+
"\u0412\u043E\u0437\u0438\u043C\u0441\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u043E\u043C \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u0436\u0430...",
|
|
288695
|
+
"\u041C\u0438\u043D\u0443\u0442\u043A\u0443, \u0438\u0449\u0443 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u043C\u0435\u043C...",
|
|
288696
|
+
"\u041D\u0430\u0436\u0438\u043C\u0430\u0435\u043C 'A' \u0434\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F...",
|
|
288697
|
+
"\u041F\u0430\u0441\u0451\u043C \u0446\u0438\u0444\u0440\u043E\u0432\u044B\u0445 \u043A\u043E\u0442\u043E\u0432...",
|
|
288698
|
+
"\u041F\u043E\u043B\u0438\u0440\u0443\u0435\u043C \u043F\u0438\u043A\u0441\u0435\u043B\u0438...",
|
|
288699
|
+
"\u0418\u0449\u0435\u043C \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u043A\u0430\u043B\u0430\u043C\u0431\u0443\u0440 \u0434\u043B\u044F \u044D\u043A\u0440\u0430\u043D\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438...",
|
|
288700
|
+
"\u041E\u0442\u0432\u043B\u0435\u043A\u0430\u0435\u043C \u0432\u0430\u0441 \u044D\u0442\u043E\u0439 \u043E\u0441\u0442\u0440\u043E\u0443\u043C\u043D\u043E\u0439 \u0444\u0440\u0430\u0437\u043E\u0439...",
|
|
288701
|
+
"\u041F\u043E\u0447\u0442\u0438 \u0433\u043E\u0442\u043E\u0432\u043E... \u0432\u0440\u043E\u0434\u0435...",
|
|
288702
|
+
"\u041D\u0430\u0448\u0438 \u0445\u043E\u043C\u044F\u0447\u043A\u0438 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442 \u0438\u0437\u043E \u0432\u0441\u0435\u0445 \u0441\u0438\u043B...",
|
|
288703
|
+
"\u0413\u043B\u0430\u0434\u0438\u043C \u041E\u0431\u043B\u0430\u0447\u043A\u043E \u043F\u043E \u0433\u043E\u043B\u043E\u0432\u0435...",
|
|
288704
|
+
"\u0413\u043B\u0430\u0434\u0438\u043C \u043A\u043E\u0442\u0430...",
|
|
288705
|
+
"\u0420\u0438\u043A\u0440\u043E\u043B\u043B\u0438\u043C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u0438\u043A\u0430...",
|
|
288706
|
+
"Never gonna give you up, never gonna let you down...",
|
|
288707
|
+
"\u041B\u0430\u0431\u0430\u0435\u043C \u0431\u0430\u0441-\u0433\u0438\u0442\u0430\u0440\u0443...",
|
|
288708
|
+
"\u041F\u0440\u043E\u0431\u0443\u0435\u043C \u0441\u043D\u0443\u0437\u0431\u0435\u0440\u0440\u0438 \u043D\u0430 \u0432\u043A\u0443\u0441...",
|
|
288709
|
+
"\u0418\u0434\u0443 \u0434\u043E \u043A\u043E\u043D\u0446\u0430, \u0438\u0434\u0443 \u043D\u0430 \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u044C...",
|
|
288710
|
+
"Is this the real life? Is this just fantasy?...",
|
|
288711
|
+
"\u0423 \u043C\u0435\u043D\u044F \u0445\u043E\u0440\u043E\u0448\u0435\u0435 \u043F\u0440\u0435\u0434\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0435...",
|
|
288712
|
+
"\u0414\u0440\u0430\u0437\u043D\u0438\u043C \u043C\u0435\u0434\u0432\u0435\u0434\u044F... (\u041D\u0435 \u043B\u0435\u0437\u044C...)",
|
|
288713
|
+
"\u0418\u0437\u0443\u0447\u0430\u0435\u043C \u0441\u0432\u0435\u0436\u0438\u0435 \u043C\u0435\u043C\u044B...",
|
|
288714
|
+
"\u0414\u0443\u043C\u0430\u0435\u043C, \u043A\u0430\u043A \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u044D\u0442\u043E \u043E\u0441\u0442\u0440\u043E\u0443\u043C\u043D\u0435\u0435...",
|
|
288715
|
+
"\u0425\u043C\u043C... \u0434\u0430\u0439\u0442\u0435 \u043F\u043E\u0434\u0443\u043C\u0430\u0442\u044C...",
|
|
288716
|
+
"\u041A\u0430\u043A \u043D\u0430\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0431\u0443\u043C\u0435\u0440\u0430\u043D\u0433, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043D\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F? \u041F\u0430\u043B\u043A\u0430...",
|
|
288717
|
+
"\u041F\u043E\u0447\u0435\u043C\u0443 \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440 \u043F\u0440\u043E\u0441\u0442\u0443\u0434\u0438\u043B\u0441\u044F? \u041F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u043E\u0441\u0442\u0430\u0432\u0438\u043B \u043E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C\u0438...",
|
|
288718
|
+
"\u041F\u043E\u0447\u0435\u043C\u0443 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0438\u0441\u0442\u044B \u043D\u0435 \u043B\u044E\u0431\u044F\u0442 \u0433\u0443\u043B\u044F\u0442\u044C \u043D\u0430 \u0443\u043B\u0438\u0446\u0435? \u0422\u0430\u043C \u0441\u0440\u0435\u0434\u0430 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u0430...",
|
|
288719
|
+
"\u041F\u043E\u0447\u0435\u043C\u0443 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0438\u0441\u0442\u044B \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u044E\u0442 \u0442\u0451\u043C\u043D\u0443\u044E \u0442\u0435\u043C\u0443? \u041F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u0432 \u0442\u0435\u043C\u043D\u043E\u0442\u0435 \u043D\u0435 \u0432\u0438\u0434\u043D\u043E \u0431\u0430\u0433\u043E\u0432...",
|
|
288720
|
+
"\u041F\u043E\u0447\u0435\u043C\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A \u0440\u0430\u0437\u043E\u0440\u0438\u043B\u0441\u044F? \u041F\u043E\u0442\u043E\u043C\u0443 \u0447\u0442\u043E \u043F\u043E\u0442\u0440\u0430\u0442\u0438\u043B \u0432\u0435\u0441\u044C \u0441\u0432\u043E\u0439 \u043A\u044D\u0448...",
|
|
288721
|
+
"\u0427\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u0434\u0435\u043B\u0430\u0442\u044C \u0441\u043E \u0441\u043B\u043E\u043C\u0430\u043D\u043D\u044B\u043C \u043A\u0430\u0440\u0430\u043D\u0434\u0430\u0448\u043E\u043C? \u041D\u0438\u0447\u0435\u0433\u043E \u2014 \u043E\u043D \u0442\u0443\u043F\u043E\u0439...",
|
|
288722
|
+
"\u041F\u0440\u043E\u0432\u043E\u0436\u0443 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u043C\u0435\u0442\u043E\u0434\u043E\u043C \u0442\u044B\u043A\u0430...",
|
|
288723
|
+
"\u0418\u0449\u0435\u043C, \u043A\u0430\u043A\u043E\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u043E\u0439 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0444\u043B\u0435\u0448\u043A\u0443...",
|
|
288724
|
+
"\u0421\u043B\u0435\u0434\u0438\u043C, \u0447\u0442\u043E\u0431\u044B \u0432\u043E\u043B\u0448\u0435\u0431\u043D\u044B\u0439 \u0434\u044B\u043C \u043D\u0435 \u0432\u044B\u0448\u0435\u043B \u0438\u0437 \u043F\u0440\u043E\u0432\u043E\u0434\u043E\u0432...",
|
|
288725
|
+
"\u041F\u0435\u0440\u0435\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u043C \u0432\u0441\u0451 \u043D\u0430 Rust \u0431\u0435\u0437 \u043E\u0441\u043E\u0431\u043E\u0439 \u043F\u0440\u0438\u0447\u0438\u043D\u044B...",
|
|
288726
|
+
"\u041F\u044B\u0442\u0430\u0435\u043C\u0441\u044F \u0432\u044B\u0439\u0442\u0438 \u0438\u0437 Vim...",
|
|
288727
|
+
"\u0420\u0430\u0441\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043C \u043A\u043E\u043B\u0435\u0441\u043E \u0434\u043B\u044F \u0445\u043E\u043C\u044F\u043A\u0430...",
|
|
288728
|
+
"\u042D\u0442\u043E \u043D\u0435 \u0431\u0430\u0433, \u0430 \u0444\u0438\u0447\u0430...",
|
|
288729
|
+
"\u041F\u043E\u0435\u0445\u0430\u043B\u0438!",
|
|
288730
|
+
"\u042F \u0432\u0435\u0440\u043D\u0443\u0441\u044C... \u0441 \u043E\u0442\u0432\u0435\u0442\u043E\u043C.",
|
|
288731
|
+
"\u041C\u043E\u0439 \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u0441\u0441 \u2014 \u044D\u0442\u043E \u0422\u0410\u0420\u0414\u0418\u0421...",
|
|
288732
|
+
"\u041E\u0431\u0449\u0430\u0435\u043C\u0441\u044F \u0441 \u0434\u0443\u0445\u043E\u043C \u043C\u0430\u0448\u0438\u043D\u044B...",
|
|
288733
|
+
"\u0414\u0430\u0435\u043C \u043C\u044B\u0441\u043B\u044F\u043C \u0437\u0430\u043C\u0430\u0440\u0438\u043D\u043E\u0432\u0430\u0442\u044C\u0441\u044F...",
|
|
288734
|
+
"\u0422\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u043E \u0432\u0441\u043F\u043E\u043C\u043D\u0438\u043B, \u043A\u0443\u0434\u0430 \u043F\u043E\u043B\u043E\u0436\u0438\u043B \u043A\u043B\u044E\u0447\u0438...",
|
|
288735
|
+
"\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u044F\u044E \u043D\u0430\u0434 \u0441\u0444\u0435\u0440\u043E\u0439...",
|
|
288736
|
+
"\u042F \u0432\u0438\u0434\u0435\u043B \u0442\u0430\u043A\u043E\u0435, \u0447\u0442\u043E \u0432\u0430\u043C, \u043B\u044E\u0434\u044F\u043C, \u0438 \u043D\u0435 \u0441\u043D\u0438\u043B\u043E\u0441\u044C... \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u0447\u0438\u0442\u0430\u044E\u0449\u0435\u0433\u043E \u044D\u0442\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.",
|
|
288737
|
+
"\u0418\u043D\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043C \u0437\u0430\u0434\u0443\u043C\u0447\u0438\u0432\u044B\u0439 \u0432\u0437\u0433\u043B\u044F\u0434...",
|
|
288738
|
+
"\u0427\u0442\u043E \u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u0432 \u0431\u0430\u0440\u0435? \u041F\u0438\u043D\u0433-\u043A\u043E\u043B\u0430\u0434\u0443.",
|
|
288739
|
+
"\u041F\u043E\u0447\u0435\u043C\u0443 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A\u0438 \u043D\u0435 \u0443\u0431\u0438\u0440\u0430\u044E\u0442\u0441\u044F \u0434\u043E\u043C\u0430? \u041E\u043D\u0438 \u0436\u0434\u0443\u0442 \u0441\u0431\u043E\u0440\u0449\u0438\u043A \u043C\u0443\u0441\u043E\u0440\u0430...",
|
|
288740
|
+
"\u0417\u0430\u0440\u044F\u0436\u0430\u0435\u043C \u043B\u0430\u0437\u0435\u0440... \u043F\u0438\u0443-\u043F\u0438\u0443!",
|
|
288741
|
+
"\u0414\u0435\u043B\u0438\u043C \u043D\u0430 \u043D\u043E\u043B\u044C... \u0448\u0443\u0447\u0443!",
|
|
288742
|
+
"\u0418\u0449\u0443 \u0432\u0437\u0440\u043E\u0441\u043B\u044B\u0445 \u0434\u043B\u044F \u043F\u0440\u0438\u0441\u043C\u043E\u0442... \u0432 \u0441\u043C\u044B\u0441\u043B\u0435, \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u044E.",
|
|
288743
|
+
"\u0414\u0435\u043B\u0430\u0435\u043C \u0431\u0438\u043F-\u0431\u0443\u043F.",
|
|
288744
|
+
"\u0411\u0443\u0444\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044F... \u0434\u0430\u0436\u0435 \u0418\u0418 \u043D\u0443\u0436\u043D\u043E \u0432\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u0443\u043C\u0430\u0442\u044C.",
|
|
288745
|
+
"\u0417\u0430\u043F\u0443\u0442\u044B\u0432\u0430\u0435\u043C \u043A\u0432\u0430\u043D\u0442\u043E\u0432\u044B\u0435 \u0447\u0430\u0441\u0442\u0438\u0446\u044B \u0434\u043B\u044F \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430...",
|
|
288746
|
+
"\u041F\u043E\u043B\u0438\u0440\u0443\u0435\u043C \u0445\u0440\u043E\u043C... \u043D\u0430 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C\u0430\u0445.",
|
|
288747
|
+
"\u0412\u044B \u0435\u0449\u0451 \u043D\u0435 \u0440\u0430\u0437\u0432\u043B\u0435\u043A\u043B\u0438\u0441\u044C?! \u0420\u0430\u0437\u0432\u0435 \u0432\u044B \u043D\u0435 \u0437\u0430 \u044D\u0442\u0438\u043C \u0441\u044E\u0434\u0430 \u043F\u0440\u0438\u0448\u043B\u0438?!",
|
|
288748
|
+
"\u041F\u0440\u0438\u0437\u044B\u0432\u0430\u0435\u043C \u0433\u0440\u0435\u043C\u043B\u0438\u043D\u043E\u0432 \u043A\u043E\u0434\u0430... \u0434\u043B\u044F \u043F\u043E\u043C\u043E\u0449\u0438, \u043A\u043E\u043D\u0435\u0447\u043D\u043E \u0436\u0435.",
|
|
288749
|
+
"\u0416\u0434\u0435\u043C, \u043F\u043E\u043A\u0430 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F \u0437\u0432\u0443\u043A dial-up \u043C\u043E\u0434\u0435\u043C\u0430...",
|
|
288750
|
+
"\u041F\u0435\u0440\u0435\u043A\u0430\u043B\u0438\u0431\u0440\u043E\u0432\u043A\u0430 \u044E\u043C\u043E\u0440\u043E\u043C\u0435\u0442\u0440\u0430.",
|
|
288751
|
+
"\u041C\u043E\u0439 \u0434\u0440\u0443\u0433\u043E\u0439 \u044D\u043A\u0440\u0430\u043D \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0435\u0449\u0451 \u0441\u043C\u0435\u0448\u043D\u0435\u0435.",
|
|
288752
|
+
"\u041A\u0430\u0436\u0435\u0442\u0441\u044F, \u0433\u0434\u0435-\u0442\u043E \u043F\u043E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u0433\u0443\u043B\u044F\u0435\u0442 \u043A\u043E\u0442...",
|
|
288753
|
+
"\u0423\u043B\u0443\u0447\u0448\u0430\u0435\u043C... \u0415\u0449\u0451 \u0443\u043B\u0443\u0447\u0448\u0430\u0435\u043C... \u0412\u0441\u0451 \u0435\u0449\u0451 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F.",
|
|
288754
|
+
"\u042D\u0442\u043E \u043D\u0435 \u0431\u0430\u0433, \u044D\u0442\u043E \u0444\u0438\u0447\u0430... \u044D\u043A\u0440\u0430\u043D\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438.",
|
|
288755
|
+
"\u041F\u0440\u043E\u0431\u043E\u0432\u0430\u043B\u0438 \u0432\u044B\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430? (\u042D\u043A\u0440\u0430\u043D \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438, \u043D\u0435 \u043C\u0435\u043D\u044F!)",
|
|
288756
|
+
"\u041D\u0443\u0436\u043D\u043E \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435 \u043F\u0438\u043B\u043E\u043D\u043E\u0432..."
|
|
288757
|
+
]
|
|
288736
288758
|
};
|
|
288737
288759
|
}
|
|
288738
288760
|
});
|
|
@@ -288824,7 +288846,7 @@ var init_zh = __esm({
|
|
|
288824
288846
|
"Theme configuration unavailable due to NO_COLOR env variable.": "\u7531\u4E8E NO_COLOR \u73AF\u5883\u53D8\u91CF\uFF0C\u4E3B\u9898\u914D\u7F6E\u4E0D\u53EF\u7528\u3002",
|
|
288825
288847
|
'Theme "{{themeName}}" not found.': '\u672A\u627E\u5230\u4E3B\u9898 "{{themeName}}"\u3002',
|
|
288826
288848
|
'Theme "{{themeName}}" not found in selected scope.': '\u5728\u6240\u9009\u4F5C\u7528\u57DF\u4E2D\u672A\u627E\u5230\u4E3B\u9898 "{{themeName}}"\u3002',
|
|
288827
|
-
"
|
|
288849
|
+
"Clear conversation history and free up context": "\u6E05\u9664\u5BF9\u8BDD\u5386\u53F2\u5E76\u91CA\u653E\u4E0A\u4E0B\u6587",
|
|
288828
288850
|
"Compresses the context by replacing it with a summary.": "\u901A\u8FC7\u7528\u6458\u8981\u66FF\u6362\u6765\u538B\u7F29\u4E0A\u4E0B\u6587",
|
|
288829
288851
|
"open full Qwen Code documentation in your browser": "\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u5B8C\u6574\u7684 Qwen Code \u6587\u6863",
|
|
288830
288852
|
"Configuration not available.": "\u914D\u7F6E\u4E0D\u53EF\u7528",
|
|
@@ -288944,6 +288966,7 @@ var init_zh = __esm({
|
|
|
288944
288966
|
"(Use Enter to select{{tabText}})": "\uFF08\u4F7F\u7528 Enter \u9009\u62E9{{tabText}}\uFF09",
|
|
288945
288967
|
", Tab to change focus": "\uFF0CTab \u5207\u6362\u7126\u70B9",
|
|
288946
288968
|
"To see changes, Qwen Code must be restarted. Press r to exit and apply changes now.": "\u8981\u67E5\u770B\u66F4\u6539\uFF0C\u5FC5\u987B\u91CD\u542F Qwen Code\u3002\u6309 r \u9000\u51FA\u5E76\u7ACB\u5373\u5E94\u7528\u66F4\u6539\u3002",
|
|
288969
|
+
'The command "/{{command}}" is not supported in non-interactive mode.': '\u4E0D\u652F\u6301\u5728\u975E\u4EA4\u4E92\u6A21\u5F0F\u4E0B\u4F7F\u7528\u547D\u4EE4 "/{{command}}"\u3002',
|
|
288947
288970
|
// ============================================================================
|
|
288948
288971
|
// Settings Labels
|
|
288949
288972
|
// ============================================================================
|
|
@@ -289176,6 +289199,10 @@ var init_zh = __esm({
|
|
|
289176
289199
|
"Already generating summary, wait for previous request to complete": "\u6B63\u5728\u751F\u6210\u6458\u8981\uFF0C\u8BF7\u7B49\u5F85\u4E0A\u4E00\u4E2A\u8BF7\u6C42\u5B8C\u6210",
|
|
289177
289200
|
"No conversation found to summarize.": "\u672A\u627E\u5230\u8981\u603B\u7ED3\u7684\u5BF9\u8BDD",
|
|
289178
289201
|
"Failed to generate project context summary: {{error}}": "\u751F\u6210\u9879\u76EE\u4E0A\u4E0B\u6587\u6458\u8981\u5931\u8D25\uFF1A{{error}}",
|
|
289202
|
+
"Saved project summary to {{filePathForDisplay}}.": "\u9879\u76EE\u6458\u8981\u5DF2\u4FDD\u5B58\u5230 {{filePathForDisplay}}",
|
|
289203
|
+
"Saving project summary...": "\u6B63\u5728\u4FDD\u5B58\u9879\u76EE\u6458\u8981...",
|
|
289204
|
+
"Generating project summary...": "\u6B63\u5728\u751F\u6210\u9879\u76EE\u6458\u8981...",
|
|
289205
|
+
"Failed to generate summary - no text content received from LLM response": "\u751F\u6210\u6458\u8981\u5931\u8D25 - \u672A\u4ECE LLM \u54CD\u5E94\u4E2D\u63A5\u6536\u5230\u6587\u672C\u5185\u5BB9",
|
|
289179
289206
|
// ============================================================================
|
|
289180
289207
|
// Commands - Model
|
|
289181
289208
|
// ============================================================================
|
|
@@ -289186,8 +289213,8 @@ var init_zh = __esm({
|
|
|
289186
289213
|
// ============================================================================
|
|
289187
289214
|
// Commands - Clear
|
|
289188
289215
|
// ============================================================================
|
|
289189
|
-
"
|
|
289190
|
-
"
|
|
289216
|
+
"Starting a new session, resetting chat, and clearing terminal.": "\u6B63\u5728\u5F00\u59CB\u65B0\u4F1A\u8BDD\uFF0C\u91CD\u7F6E\u804A\u5929\u5E76\u6E05\u5C4F\u3002",
|
|
289217
|
+
"Starting a new session and clearing.": "\u6B63\u5728\u5F00\u59CB\u65B0\u4F1A\u8BDD\u5E76\u6E05\u5C4F\u3002",
|
|
289191
289218
|
// ============================================================================
|
|
289192
289219
|
// Commands - Compress
|
|
289193
289220
|
// ============================================================================
|
|
@@ -289432,134 +289459,37 @@ var init_zh = __esm({
|
|
|
289432
289459
|
// ============================================================================
|
|
289433
289460
|
"Waiting for user confirmation...": "\u7B49\u5F85\u7528\u6237\u786E\u8BA4...",
|
|
289434
289461
|
"(esc to cancel, {{time}})": "\uFF08\u6309 esc \u53D6\u6D88\uFF0C{{time}}\uFF09",
|
|
289435
|
-
|
|
289436
|
-
|
|
289437
|
-
|
|
289438
|
-
|
|
289439
|
-
|
|
289440
|
-
|
|
289441
|
-
|
|
289442
|
-
|
|
289443
|
-
|
|
289444
|
-
|
|
289445
|
-
|
|
289446
|
-
|
|
289447
|
-
|
|
289448
|
-
|
|
289449
|
-
|
|
289450
|
-
|
|
289451
|
-
|
|
289452
|
-
|
|
289453
|
-
|
|
289454
|
-
|
|
289455
|
-
|
|
289456
|
-
|
|
289457
|
-
|
|
289458
|
-
|
|
289459
|
-
|
|
289460
|
-
|
|
289461
|
-
|
|
289462
|
-
|
|
289463
|
-
|
|
289464
|
-
|
|
289465
|
-
|
|
289466
|
-
"Optimizing for ludicrous speed": "\u6B63\u5728\u4F18\u5316\u5230\u8352\u8C2C\u7684\u901F\u5EA6",
|
|
289467
|
-
"Swapping bits... don't tell the bytes...": "\u6B63\u5728\u4EA4\u6362\u4F4D...\u4E0D\u8981\u544A\u8BC9\u5B57\u8282...",
|
|
289468
|
-
"Garbage collecting... be right back...": "\u6B63\u5728\u5783\u573E\u56DE\u6536...\u9A6C\u4E0A\u56DE\u6765...",
|
|
289469
|
-
"Assembling the interwebs...": "\u6B63\u5728\u7EC4\u88C5\u4E92\u8054\u7F51...",
|
|
289470
|
-
"Converting coffee into code...": "\u6B63\u5728\u5C06\u5496\u5561\u8F6C\u6362\u4E3A\u4EE3\u7801...",
|
|
289471
|
-
"Updating the syntax for reality...": "\u6B63\u5728\u66F4\u65B0\u73B0\u5B9E\u7684\u8BED\u6CD5...",
|
|
289472
|
-
"Rewiring the synapses...": "\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5\u7A81\u89E6...",
|
|
289473
|
-
"Looking for a misplaced semicolon...": "\u6B63\u5728\u5BFB\u627E\u653E\u9519\u4F4D\u7F6E\u7684\u5206\u53F7...",
|
|
289474
|
-
"Greasin' the cogs of the machine...": "\u6B63\u5728\u7ED9\u673A\u5668\u7684\u9F7F\u8F6E\u4E0A\u6CB9...",
|
|
289475
|
-
"Pre-heating the servers...": "\u6B63\u5728\u9884\u70ED\u670D\u52A1\u5668...",
|
|
289476
|
-
"Calibrating the flux capacitor...": "\u6B63\u5728\u6821\u51C6\u901A\u91CF\u7535\u5BB9\u5668...",
|
|
289477
|
-
"Engaging the improbability drive...": "\u6B63\u5728\u542F\u52A8\u4E0D\u53EF\u80FD\u6027\u9A71\u52A8\u5668...",
|
|
289478
|
-
"Channeling the Force...": "\u6B63\u5728\u5F15\u5BFC\u539F\u529B...",
|
|
289479
|
-
"Aligning the stars for optimal response...": "\u6B63\u5728\u5BF9\u9F50\u661F\u661F\u4EE5\u83B7\u5F97\u6700\u4F73\u56DE\u590D...",
|
|
289480
|
-
"So say we all...": "\u6211\u4EEC\u90FD\u8BF4...",
|
|
289481
|
-
"Loading the next great idea...": "\u6B63\u5728\u52A0\u8F7D\u4E0B\u4E00\u4E2A\u4F1F\u5927\u7684\u60F3\u6CD5...",
|
|
289482
|
-
"Just a moment, I'm in the zone...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u8FDB\u5165\u72B6\u6001...",
|
|
289483
|
-
"Preparing to dazzle you with brilliance...": "\u6B63\u5728\u51C6\u5907\u7528\u667A\u6167\u8BA9\u60A8\u773C\u82B1\u7F2D\u4E71...",
|
|
289484
|
-
"Just a tick, I'm polishing my wit...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u6253\u78E8\u6211\u7684\u667A\u6167...",
|
|
289485
|
-
"Hold tight, I'm crafting a masterpiece...": "\u8BF7\u7A0D\u7B49\uFF0C\u6211\u6B63\u5728\u5236\u4F5C\u6770\u4F5C...",
|
|
289486
|
-
"Just a jiffy, I'm debugging the universe...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u8C03\u8BD5\u5B87\u5B99...",
|
|
289487
|
-
"Just a moment, I'm aligning the pixels...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u5BF9\u9F50\u50CF\u7D20...",
|
|
289488
|
-
"Just a sec, I'm optimizing the humor...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u4F18\u5316\u5E7D\u9ED8\u611F...",
|
|
289489
|
-
"Just a moment, I'm tuning the algorithms...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u8C03\u6574\u7B97\u6CD5...",
|
|
289490
|
-
"Warp speed engaged...": "\u66F2\u901F\u5DF2\u542F\u52A8...",
|
|
289491
|
-
"Mining for more Dilithium crystals...": "\u6B63\u5728\u6316\u6398\u66F4\u591A\u4E8C\u9502\u6676\u4F53...",
|
|
289492
|
-
"Don't panic...": "\u4E0D\u8981\u60CA\u614C...",
|
|
289493
|
-
"Following the white rabbit...": "\u6B63\u5728\u8DDF\u968F\u767D\u5154...",
|
|
289494
|
-
"The truth is in here... somewhere...": "\u771F\u76F8\u5728\u8FD9\u91CC...\u67D0\u4E2A\u5730\u65B9...",
|
|
289495
|
-
"Blowing on the cartridge...": "\u6B63\u5728\u5439\u5361\u5E26...",
|
|
289496
|
-
"Loading... Do a barrel roll!": "\u6B63\u5728\u52A0\u8F7D...\u505A\u4E2A\u6876\u6EDA\uFF01",
|
|
289497
|
-
"Waiting for the respawn...": "\u7B49\u5F85\u91CD\u751F...",
|
|
289498
|
-
"Finishing the Kessel Run in less than 12 parsecs...": "\u6B63\u5728\u4EE5\u4E0D\u5230 12 \u79D2\u5DEE\u8DDD\u5B8C\u6210\u51EF\u585E\u5C14\u822A\u7EBF...",
|
|
289499
|
-
"The cake is not a lie, it's just still loading...": "\u86CB\u7CD5\u4E0D\u662F\u8C0E\u8A00\uFF0C\u53EA\u662F\u8FD8\u5728\u52A0\u8F7D...",
|
|
289500
|
-
"Fiddling with the character creation screen...": "\u6B63\u5728\u6446\u5F04\u89D2\u8272\u521B\u5EFA\u754C\u9762...",
|
|
289501
|
-
"Just a moment, I'm finding the right meme...": "\u7A0D\u7B49\u7247\u523B\uFF0C\u6211\u6B63\u5728\u5BFB\u627E\u5408\u9002\u7684\u8868\u60C5\u5305...",
|
|
289502
|
-
"Pressing 'A' to continue...": "\u6309 'A' \u7EE7\u7EED...",
|
|
289503
|
-
"Herding digital cats...": "\u6B63\u5728\u653E\u7267\u6570\u5B57\u732B...",
|
|
289504
|
-
"Polishing the pixels...": "\u6B63\u5728\u6253\u78E8\u50CF\u7D20...",
|
|
289505
|
-
"Finding a suitable loading screen pun...": "\u6B63\u5728\u5BFB\u627E\u5408\u9002\u7684\u52A0\u8F7D\u5C4F\u5E55\u53CC\u5173\u8BED...",
|
|
289506
|
-
"Distracting you with this witty phrase...": "\u6B63\u5728\u7528\u8FD9\u4E2A\u673A\u667A\u7684\u77ED\u8BED\u5206\u6563\u60A8\u7684\u6CE8\u610F\u529B...",
|
|
289507
|
-
"Almost there... probably...": "\u5FEB\u5230\u4E86...\u53EF\u80FD...",
|
|
289508
|
-
"Our hamsters are working as fast as they can...": "\u6211\u4EEC\u7684\u4ED3\u9F20\u6B63\u5728\u5C3D\u53EF\u80FD\u5FEB\u5730\u5DE5\u4F5C...",
|
|
289509
|
-
"Giving Cloudy a pat on the head...": "\u6B63\u5728\u62CD\u62CD Cloudy \u7684\u5934...",
|
|
289510
|
-
"Petting the cat...": "\u6B63\u5728\u629A\u6478\u732B\u54AA...",
|
|
289511
|
-
"Rickrolling my boss...": "\u6B63\u5728 Rickroll \u6211\u7684\u8001\u677F...",
|
|
289512
|
-
"Never gonna give you up, never gonna let you down...": "\u6C38\u8FDC\u4E0D\u4F1A\u653E\u5F03\u4F60\uFF0C\u6C38\u8FDC\u4E0D\u4F1A\u8BA9\u4F60\u5931\u671B...",
|
|
289513
|
-
"Slapping the bass...": "\u6B63\u5728\u62CD\u6253\u4F4E\u97F3...",
|
|
289514
|
-
"Tasting the snozberries...": "\u6B63\u5728\u54C1\u5C1D snozberries...",
|
|
289515
|
-
"I'm going the distance, I'm going for speed...": "\u6211\u8981\u8D70\u5F97\u66F4\u8FDC\uFF0C\u6211\u8981\u8FFD\u6C42\u901F\u5EA6...",
|
|
289516
|
-
"Is this the real life? Is this just fantasy?...": "\u8FD9\u662F\u771F\u5B9E\u7684\u751F\u6D3B\u5417\uFF1F\u8FD8\u662F\u53EA\u662F\u5E7B\u60F3\uFF1F...",
|
|
289517
|
-
"I've got a good feeling about this...": "\u6211\u5BF9\u8FD9\u4E2A\u611F\u89C9\u5F88\u597D...",
|
|
289518
|
-
"Poking the bear...": "\u6B63\u5728\u6233\u718A...",
|
|
289519
|
-
"Doing research on the latest memes...": "\u6B63\u5728\u7814\u7A76\u6700\u65B0\u7684\u8868\u60C5\u5305...",
|
|
289520
|
-
"Figuring out how to make this more witty...": "\u6B63\u5728\u60F3\u529E\u6CD5\u8BA9\u8FD9\u66F4\u6709\u8DA3...",
|
|
289521
|
-
"Hmmm... let me think...": "\u55EF...\u8BA9\u6211\u60F3\u60F3...",
|
|
289522
|
-
"What do you call a fish with no eyes? A fsh...": "\u6CA1\u6709\u773C\u775B\u7684\u9C7C\u53EB\u4EC0\u4E48\uFF1F\u4E00\u6761\u9C7C...",
|
|
289523
|
-
"Why did the computer go to therapy? It had too many bytes...": "\u4E3A\u4EC0\u4E48\u7535\u8111\u53BB\u770B\u5FC3\u7406\u533B\u751F\uFF1F\u56E0\u4E3A\u5B83\u6709\u592A\u591A\u5B57\u8282...",
|
|
289524
|
-
"Why don't programmers like nature? It has too many bugs...": "\u4E3A\u4EC0\u4E48\u7A0B\u5E8F\u5458\u4E0D\u559C\u6B22\u5927\u81EA\u7136\uFF1F\u56E0\u4E3A\u866B\u5B50\u592A\u591A\u4E86...",
|
|
289525
|
-
"Why do programmers prefer dark mode? Because light attracts bugs...": "\u4E3A\u4EC0\u4E48\u7A0B\u5E8F\u5458\u559C\u6B22\u6697\u8272\u6A21\u5F0F\uFF1F\u56E0\u4E3A\u5149\u4F1A\u5438\u5F15\u866B\u5B50...",
|
|
289526
|
-
"Why did the developer go broke? Because they used up all their cache...": "\u4E3A\u4EC0\u4E48\u5F00\u53D1\u8005\u7834\u4EA7\u4E86\uFF1F\u56E0\u4E3A\u4ED6\u4EEC\u7528\u5B8C\u4E86\u6240\u6709\u7F13\u5B58...",
|
|
289527
|
-
"What can you do with a broken pencil? Nothing, it's pointless...": "\u4F60\u80FD\u7528\u65AD\u4E86\u7684\u94C5\u7B14\u505A\u4EC0\u4E48\uFF1F\u4EC0\u4E48\u90FD\u4E0D\u80FD\uFF0C\u56E0\u4E3A\u5B83\u6CA1\u6709\u7B14\u5C16...",
|
|
289528
|
-
"Applying percussive maintenance...": "\u6B63\u5728\u5E94\u7528\u6572\u51FB\u7EF4\u62A4...",
|
|
289529
|
-
"Searching for the correct USB orientation...": "\u6B63\u5728\u5BFB\u627E\u6B63\u786E\u7684 USB \u65B9\u5411...",
|
|
289530
|
-
"Ensuring the magic smoke stays inside the wires...": "\u786E\u4FDD\u9B54\u6CD5\u70DF\u96FE\u7559\u5728\u7535\u7EBF\u5185...",
|
|
289531
|
-
"Rewriting in Rust for no particular reason...": "\u6B63\u5728\u7528 Rust \u91CD\u5199\uFF0C\u6CA1\u6709\u7279\u522B\u7684\u539F\u56E0...",
|
|
289532
|
-
"Trying to exit Vim...": "\u6B63\u5728\u5C1D\u8BD5\u9000\u51FA Vim...",
|
|
289533
|
-
"Spinning up the hamster wheel...": "\u6B63\u5728\u542F\u52A8\u4ED3\u9F20\u8F6E...",
|
|
289534
|
-
"That's not a bug, it's an undocumented feature...": "\u8FD9\u4E0D\u662F\u4E00\u4E2A\u9519\u8BEF\uFF0C\u8FD9\u662F\u4E00\u4E2A\u672A\u8BB0\u5F55\u7684\u529F\u80FD...",
|
|
289535
|
-
"Engage.": "\u542F\u52A8\u3002",
|
|
289536
|
-
"I'll be back... with an answer.": "\u6211\u4F1A\u56DE\u6765\u7684...\u5E26\u7740\u7B54\u6848\u3002",
|
|
289537
|
-
"My other process is a TARDIS...": "\u6211\u7684\u53E6\u4E00\u4E2A\u8FDB\u7A0B\u662F TARDIS...",
|
|
289538
|
-
"Communing with the machine spirit...": "\u6B63\u5728\u4E0E\u673A\u5668\u7CBE\u795E\u4EA4\u6D41...",
|
|
289539
|
-
"Letting the thoughts marinate...": "\u8BA9\u60F3\u6CD5\u6162\u6162\u915D\u917F...",
|
|
289540
|
-
"Just remembered where I put my keys...": "\u521A\u521A\u60F3\u8D77\u6211\u628A\u94A5\u5319\u653E\u5728\u54EA\u91CC\u4E86...",
|
|
289541
|
-
"Pondering the orb...": "\u6B63\u5728\u601D\u8003\u7403\u4F53...",
|
|
289542
|
-
"I've seen things you people wouldn't believe... like a user who reads loading messages.": "\u6211\u89C1\u8FC7\u4F60\u4EEC\u4E0D\u4F1A\u76F8\u4FE1\u7684\u4E8B\u60C5...\u6BD4\u5982\u4E00\u4E2A\u9605\u8BFB\u52A0\u8F7D\u6D88\u606F\u7684\u7528\u6237\u3002",
|
|
289543
|
-
"Initiating thoughtful gaze...": "\u6B63\u5728\u542F\u52A8\u6DF1\u601D\u51DD\u89C6...",
|
|
289544
|
-
"What's a computer's favorite snack? Microchips.": "\u7535\u8111\u6700\u559C\u6B22\u7684\u96F6\u98DF\u662F\u4EC0\u4E48\uFF1F\u5FAE\u82AF\u7247\u3002",
|
|
289545
|
-
"Why do Java developers wear glasses? Because they don't C#.": "\u4E3A\u4EC0\u4E48 Java \u5F00\u53D1\u8005\u6234\u773C\u955C\uFF1F\u56E0\u4E3A\u4ED6\u4EEC\u4E0D\u4F1A C#\u3002",
|
|
289546
|
-
"Charging the laser... pew pew!": "\u6B63\u5728\u7ED9\u6FC0\u5149\u5145\u7535...\u7830\u7830\uFF01",
|
|
289547
|
-
"Dividing by zero... just kidding!": "\u9664\u4EE5\u96F6...\u53EA\u662F\u5F00\u73A9\u7B11\uFF01",
|
|
289548
|
-
"Looking for an adult superviso... I mean, processing.": "\u6B63\u5728\u5BFB\u627E\u6210\u4EBA\u76D1\u7763...\u6211\u662F\u8BF4\uFF0C\u5904\u7406\u4E2D\u3002",
|
|
289549
|
-
"Making it go beep boop.": "\u8BA9\u5B83\u53D1\u51FA\u54D4\u54D4\u58F0\u3002",
|
|
289550
|
-
"Buffering... because even AIs need a moment.": "\u6B63\u5728\u7F13\u51B2...\u56E0\u4E3A\u5373\u4F7F\u662F AI \u4E5F\u9700\u8981\u7247\u523B\u3002",
|
|
289551
|
-
"Entangling quantum particles for a faster response...": "\u6B63\u5728\u7EA0\u7F20\u91CF\u5B50\u7C92\u5B50\u4EE5\u83B7\u5F97\u66F4\u5FEB\u7684\u56DE\u590D...",
|
|
289552
|
-
"Polishing the chrome... on the algorithms.": "\u6B63\u5728\u6253\u78E8\u94EC...\u5728\u7B97\u6CD5\u4E0A\u3002",
|
|
289553
|
-
"Are you not entertained? (Working on it!)": "\u4F60\u4E0D\u89C9\u5F97\u6709\u8DA3\u5417\uFF1F\uFF08\u6B63\u5728\u52AA\u529B\uFF01\uFF09",
|
|
289554
|
-
"Summoning the code gremlins... to help, of course.": "\u6B63\u5728\u53EC\u5524\u4EE3\u7801\u5C0F\u7CBE\u7075...\u5F53\u7136\u662F\u6765\u5E2E\u5FD9\u7684\u3002",
|
|
289555
|
-
"Just waiting for the dial-up tone to finish...": "\u53EA\u662F\u7B49\u5F85\u62E8\u53F7\u97F3\u7ED3\u675F...",
|
|
289556
|
-
"Recalibrating the humor-o-meter.": "\u6B63\u5728\u91CD\u65B0\u6821\u51C6\u5E7D\u9ED8\u8BA1\u3002",
|
|
289557
|
-
"My other loading screen is even funnier.": "\u6211\u7684\u53E6\u4E00\u4E2A\u52A0\u8F7D\u5C4F\u5E55\u66F4\u6709\u8DA3\u3002",
|
|
289558
|
-
"Pretty sure there's a cat walking on the keyboard somewhere...": "\u5F88\u786E\u5B9A\u6709\u53EA\u732B\u5728\u67D0\u4E2A\u5730\u65B9\u952E\u76D8\u4E0A\u8D70...",
|
|
289559
|
-
"Enhancing... Enhancing... Still loading.": "\u6B63\u5728\u589E\u5F3A...\u6B63\u5728\u589E\u5F3A...\u4ECD\u5728\u52A0\u8F7D\u3002",
|
|
289560
|
-
"It's not a bug, it's a feature... of this loading screen.": "\u8FD9\u4E0D\u662F\u4E00\u4E2A\u9519\u8BEF\uFF0C\u8FD9\u662F\u4E00\u4E2A\u529F\u80FD...\u8FD9\u4E2A\u52A0\u8F7D\u5C4F\u5E55\u7684\u529F\u80FD\u3002",
|
|
289561
|
-
"Have you tried turning it off and on again? (The loading screen, not me.)": "\u4F60\u8BD5\u8FC7\u628A\u5B83\u5173\u6389\u518D\u6253\u5F00\u5417\uFF1F\uFF08\u52A0\u8F7D\u5C4F\u5E55\uFF0C\u4E0D\u662F\u6211\u3002\uFF09",
|
|
289562
|
-
"Constructing additional pylons...": "\u6B63\u5728\u5EFA\u9020\u989D\u5916\u7684\u80FD\u91CF\u5854..."
|
|
289462
|
+
WITTY_LOADING_PHRASES: [
|
|
289463
|
+
// --- 职场搬砖系列 ---
|
|
289464
|
+
"\u6B63\u5728\u52AA\u529B\u642C\u7816\uFF0C\u8BF7\u7A0D\u5019...",
|
|
289465
|
+
"\u8001\u677F\u5728\u8EAB\u540E\uFF0C\u5FEB\u52A0\u8F7D\u554A\uFF01",
|
|
289466
|
+
"\u5934\u53D1\u6389\u5149\u524D\uFF0C\u4E00\u5B9A\u80FD\u52A0\u8F7D\u5B8C...",
|
|
289467
|
+
"\u670D\u52A1\u5668\u6B63\u5728\u6DF1\u547C\u5438\uFF0C\u51C6\u5907\u653E\u5927\u62DB...",
|
|
289468
|
+
"\u6B63\u5728\u5411\u670D\u52A1\u5668\u6295\u5582\u5496\u5561...",
|
|
289469
|
+
// --- 大厂黑话系列 ---
|
|
289470
|
+
"\u6B63\u5728\u8D4B\u80FD\u5168\u94FE\u8DEF\uFF0C\u5BFB\u627E\u5173\u952E\u6293\u624B...",
|
|
289471
|
+
"\u6B63\u5728\u964D\u672C\u589E\u6548\uFF0C\u4F18\u5316\u52A0\u8F7D\u8DEF\u5F84...",
|
|
289472
|
+
"\u6B63\u5728\u6253\u7834\u90E8\u95E8\u58C1\u5792\uFF0C\u6C89\u6DC0\u65B9\u6CD5\u8BBA...",
|
|
289473
|
+
"\u6B63\u5728\u62E5\u62B1\u53D8\u5316\uFF0C\u8FED\u4EE3\u6838\u5FC3\u4EF7\u503C...",
|
|
289474
|
+
"\u6B63\u5728\u5BF9\u9F50\u9897\u7C92\u5EA6\uFF0C\u6253\u78E8\u5E95\u5C42\u903B\u8F91...",
|
|
289475
|
+
"\u5927\u529B\u51FA\u5947\u8FF9\uFF0C\u6B63\u5728\u5F3A\u884C\u52A0\u8F7D...",
|
|
289476
|
+
// --- 程序员自嘲系列 ---
|
|
289477
|
+
"\u53EA\u8981\u6211\u4E0D\u5199\u4EE3\u7801\uFF0C\u4EE3\u7801\u5C31\u6CA1\u6709 Bug...",
|
|
289478
|
+
"\u6B63\u5728\u628A Bug \u8F6C\u5316\u4E3A Feature...",
|
|
289479
|
+
"\u53EA\u8981\u6211\u4E0D\u5C34\u5C2C\uFF0CBug \u5C31\u8FFD\u4E0D\u4E0A\u6211...",
|
|
289480
|
+
"\u6B63\u5728\u8BD5\u56FE\u7406\u89E3\u53BB\u5E74\u7684\u81EA\u5DF1\u5199\u4E86\u4EC0\u4E48...",
|
|
289481
|
+
"\u6B63\u5728\u733F\u529B\u89C9\u9192\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...",
|
|
289482
|
+
// --- 合作愉快系列 ---
|
|
289483
|
+
"\u6B63\u5728\u8BE2\u95EE\u4EA7\u54C1\u7ECF\u7406\uFF1A\u8FD9\u9700\u6C42\u662F\u771F\u7684\u5417\uFF1F",
|
|
289484
|
+
"\u6B63\u5728\u7ED9\u4EA7\u54C1\u7ECF\u7406\u753B\u997C\uFF0C\u8BF7\u7A0D\u7B49...",
|
|
289485
|
+
// --- 温暖治愈系列 ---
|
|
289486
|
+
"\u6BCF\u4E00\u884C\u4EE3\u7801\uFF0C\u90FD\u5728\u52AA\u529B\u8BA9\u4E16\u754C\u53D8\u5F97\u66F4\u597D\u4E00\u70B9\u70B9...",
|
|
289487
|
+
"\u6BCF\u4E00\u4E2A\u4F1F\u5927\u7684\u60F3\u6CD5\uFF0C\u90FD\u503C\u5F97\u8FD9\u4EFD\u8010\u5FC3\u7684\u7B49\u5F85...",
|
|
289488
|
+
"\u522B\u6025\uFF0C\u7F8E\u597D\u7684\u4E8B\u7269\u603B\u662F\u9700\u8981\u4E00\u70B9\u65F6\u95F4\u53BB\u915D\u917F...",
|
|
289489
|
+
"\u613F\u4F60\u7684\u4EE3\u7801\u6C38\u65E0 Bug\uFF0C\u613F\u4F60\u7684\u68A6\u60F3\u7EC8\u5C06\u6210\u771F...",
|
|
289490
|
+
"\u54EA\u6015\u53EA\u6709 0.1% \u7684\u8FDB\u5EA6\uFF0C\u4E5F\u662F\u5728\u5411\u76EE\u6807\u9760\u8FD1...",
|
|
289491
|
+
"\u52A0\u8F7D\u7684\u662F\u5B57\u8282\uFF0C\u627F\u8F7D\u7684\u662F\u5BF9\u6280\u672F\u7684\u70ED\u7231..."
|
|
289492
|
+
]
|
|
289563
289493
|
};
|
|
289564
289494
|
}
|
|
289565
289495
|
});
|
|
@@ -334251,7 +334181,7 @@ var loadYoga = (() => {
|
|
|
334251
334181
|
pa.unshift(a2);
|
|
334252
334182
|
}
|
|
334253
334183
|
__name(sa, "sa");
|
|
334254
|
-
var F4 = 0,
|
|
334184
|
+
var F4 = 0, ta2 = null, G2 = null;
|
|
334255
334185
|
function x3(a2) {
|
|
334256
334186
|
if (h3.onAbort) h3.onAbort(a2);
|
|
334257
334187
|
a2 = "Aborted(" + a2 + ")";
|
|
@@ -335394,7 +335324,7 @@ var loadYoga = (() => {
|
|
|
335394
335324
|
qa.unshift(h3.asm.F);
|
|
335395
335325
|
F4--;
|
|
335396
335326
|
h3.monitorRunDependencies && h3.monitorRunDependencies(F4);
|
|
335397
|
-
0 == F4 && (null !==
|
|
335327
|
+
0 == F4 && (null !== ta2 && (clearInterval(ta2), ta2 = null), G2 && (e4 = G2, G2 = null, e4()));
|
|
335398
335328
|
}
|
|
335399
335329
|
__name(a2, "a");
|
|
335400
335330
|
function b2(e4) {
|
|
@@ -355471,7 +355401,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
355471
355401
|
// packages/cli/src/utils/version.ts
|
|
355472
355402
|
async function getCliVersion() {
|
|
355473
355403
|
const pkgJson = await getPackageJson();
|
|
355474
|
-
return "0.6.0-nightly.
|
|
355404
|
+
return "0.6.0-nightly.20251228.2bc80795";
|
|
355475
355405
|
}
|
|
355476
355406
|
__name(getCliVersion, "getCliVersion");
|
|
355477
355407
|
|
|
@@ -362576,6 +362506,36 @@ import * as path80 from "node:path";
|
|
|
362576
362506
|
import { fileURLToPath as fileURLToPath11, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
362577
362507
|
import { homedir as homedir17 } from "node:os";
|
|
362578
362508
|
|
|
362509
|
+
// packages/cli/src/i18n/languages.ts
|
|
362510
|
+
init_esbuild_shims();
|
|
362511
|
+
var SUPPORTED_LANGUAGES = [
|
|
362512
|
+
{
|
|
362513
|
+
code: "en",
|
|
362514
|
+
id: "en-US",
|
|
362515
|
+
fullName: "English"
|
|
362516
|
+
},
|
|
362517
|
+
{
|
|
362518
|
+
code: "zh",
|
|
362519
|
+
id: "zh-CN",
|
|
362520
|
+
fullName: "Chinese"
|
|
362521
|
+
},
|
|
362522
|
+
{
|
|
362523
|
+
code: "ru",
|
|
362524
|
+
id: "ru-RU",
|
|
362525
|
+
fullName: "Russian"
|
|
362526
|
+
},
|
|
362527
|
+
{
|
|
362528
|
+
code: "de",
|
|
362529
|
+
id: "de-DE",
|
|
362530
|
+
fullName: "German"
|
|
362531
|
+
}
|
|
362532
|
+
];
|
|
362533
|
+
function getLanguageNameFromLocale(locale) {
|
|
362534
|
+
const lang = SUPPORTED_LANGUAGES.find((l3) => l3.code === locale);
|
|
362535
|
+
return lang?.fullName || "English";
|
|
362536
|
+
}
|
|
362537
|
+
__name(getLanguageNameFromLocale, "getLanguageNameFromLocale");
|
|
362538
|
+
|
|
362579
362539
|
// import("./locales/**/*.js") in packages/cli/src/i18n/index.ts
|
|
362580
362540
|
var globImport_locales_js = __glob({
|
|
362581
362541
|
"./locales/en.js": () => Promise.resolve().then(() => (init_en3(), en_exports)),
|
|
@@ -362602,10 +362562,12 @@ function detectSystemLanguage() {
|
|
|
362602
362562
|
if (envLang?.startsWith("zh")) return "zh";
|
|
362603
362563
|
if (envLang?.startsWith("en")) return "en";
|
|
362604
362564
|
if (envLang?.startsWith("ru")) return "ru";
|
|
362565
|
+
if (envLang?.startsWith("de")) return "de";
|
|
362605
362566
|
try {
|
|
362606
362567
|
const locale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
362607
362568
|
if (locale.startsWith("zh")) return "zh";
|
|
362608
362569
|
if (locale.startsWith("ru")) return "ru";
|
|
362570
|
+
if (locale.startsWith("de")) return "de";
|
|
362609
362571
|
} catch {
|
|
362610
362572
|
}
|
|
362611
362573
|
return "en";
|
|
@@ -362706,9 +362668,20 @@ function getCurrentLanguage() {
|
|
|
362706
362668
|
__name(getCurrentLanguage, "getCurrentLanguage");
|
|
362707
362669
|
function t4(key, params) {
|
|
362708
362670
|
const translation = translations[key] ?? key;
|
|
362671
|
+
if (Array.isArray(translation)) {
|
|
362672
|
+
return key;
|
|
362673
|
+
}
|
|
362709
362674
|
return interpolate(translation, params);
|
|
362710
362675
|
}
|
|
362711
362676
|
__name(t4, "t");
|
|
362677
|
+
function ta(key) {
|
|
362678
|
+
const translation = translations[key];
|
|
362679
|
+
if (Array.isArray(translation)) {
|
|
362680
|
+
return translation;
|
|
362681
|
+
}
|
|
362682
|
+
return [];
|
|
362683
|
+
}
|
|
362684
|
+
__name(ta, "ta");
|
|
362712
362685
|
async function initializeI18n(lang) {
|
|
362713
362686
|
await setLanguageAsync(lang ?? "auto");
|
|
362714
362687
|
}
|
|
@@ -362726,10 +362699,344 @@ function validateTheme(settings) {
|
|
|
362726
362699
|
}
|
|
362727
362700
|
__name(validateTheme, "validateTheme");
|
|
362728
362701
|
|
|
362702
|
+
// packages/cli/src/ui/commands/languageCommand.ts
|
|
362703
|
+
init_esbuild_shims();
|
|
362704
|
+
|
|
362705
|
+
// packages/cli/src/ui/commands/types.ts
|
|
362706
|
+
init_esbuild_shims();
|
|
362707
|
+
|
|
362708
|
+
// packages/cli/src/ui/commands/languageCommand.ts
|
|
362709
|
+
import * as fs75 from "node:fs";
|
|
362710
|
+
import * as path81 from "node:path";
|
|
362711
|
+
var LLM_OUTPUT_LANGUAGE_RULE_FILENAME = "output-language.md";
|
|
362712
|
+
var LLM_OUTPUT_LANGUAGE_MARKER_PREFIX = "qwen-code:llm-output-language:";
|
|
362713
|
+
function parseUiLanguageArg(input) {
|
|
362714
|
+
const lowered = input.trim().toLowerCase();
|
|
362715
|
+
if (!lowered) return null;
|
|
362716
|
+
for (const lang of SUPPORTED_LANGUAGES) {
|
|
362717
|
+
if (lowered === lang.code || lowered === lang.id.toLowerCase() || lowered === lang.fullName.toLowerCase()) {
|
|
362718
|
+
return lang.code;
|
|
362719
|
+
}
|
|
362720
|
+
}
|
|
362721
|
+
return null;
|
|
362722
|
+
}
|
|
362723
|
+
__name(parseUiLanguageArg, "parseUiLanguageArg");
|
|
362724
|
+
function formatUiLanguageDisplay(lang) {
|
|
362725
|
+
const option2 = SUPPORTED_LANGUAGES.find((o3) => o3.code === lang);
|
|
362726
|
+
return option2 ? `${option2.fullName}\uFF08${option2.id}\uFF09` : lang;
|
|
362727
|
+
}
|
|
362728
|
+
__name(formatUiLanguageDisplay, "formatUiLanguageDisplay");
|
|
362729
|
+
function sanitizeLanguageForMarker(language) {
|
|
362730
|
+
return language.replace(/[\r\n]/g, " ").replace(/--!?>/g, "").replace(/--/g, "");
|
|
362731
|
+
}
|
|
362732
|
+
__name(sanitizeLanguageForMarker, "sanitizeLanguageForMarker");
|
|
362733
|
+
function generateLlmOutputLanguageRule(language) {
|
|
362734
|
+
const markerLanguage = sanitizeLanguageForMarker(language);
|
|
362735
|
+
return `# Output language preference: ${language}
|
|
362736
|
+
<!-- ${LLM_OUTPUT_LANGUAGE_MARKER_PREFIX} ${markerLanguage} -->
|
|
362737
|
+
|
|
362738
|
+
## Goal
|
|
362739
|
+
Prefer responding in **${language}** for normal assistant messages and explanations.
|
|
362740
|
+
|
|
362741
|
+
## Keep technical artifacts unchanged
|
|
362742
|
+
Do **not** translate or rewrite:
|
|
362743
|
+
- Code blocks, CLI commands, file paths, stack traces, logs, JSON keys, identifiers
|
|
362744
|
+
- Exact quoted text from the user (keep quotes verbatim)
|
|
362745
|
+
|
|
362746
|
+
## When a conflict exists
|
|
362747
|
+
If higher-priority instructions (system/developer) require a different behavior, follow them.
|
|
362748
|
+
|
|
362749
|
+
## Tool / system outputs
|
|
362750
|
+
Raw tool/system outputs may contain fixed-format English. Preserve them verbatim, and if needed, add a short **${language}** explanation below.
|
|
362751
|
+
`;
|
|
362752
|
+
}
|
|
362753
|
+
__name(generateLlmOutputLanguageRule, "generateLlmOutputLanguageRule");
|
|
362754
|
+
function getLlmOutputLanguageRulePath() {
|
|
362755
|
+
return path81.join(
|
|
362756
|
+
Storage.getGlobalQwenDir(),
|
|
362757
|
+
LLM_OUTPUT_LANGUAGE_RULE_FILENAME
|
|
362758
|
+
);
|
|
362759
|
+
}
|
|
362760
|
+
__name(getLlmOutputLanguageRulePath, "getLlmOutputLanguageRulePath");
|
|
362761
|
+
function normalizeLanguageName(language) {
|
|
362762
|
+
const lowered = language.toLowerCase();
|
|
362763
|
+
const fullName = getLanguageNameFromLocale(lowered);
|
|
362764
|
+
if (fullName !== "English" || lowered === "en") {
|
|
362765
|
+
return fullName;
|
|
362766
|
+
}
|
|
362767
|
+
return language;
|
|
362768
|
+
}
|
|
362769
|
+
__name(normalizeLanguageName, "normalizeLanguageName");
|
|
362770
|
+
function extractLlmOutputLanguageFromRuleFileContent(content) {
|
|
362771
|
+
const markerMatch = content.match(
|
|
362772
|
+
new RegExp(
|
|
362773
|
+
String.raw`<!--\s*${LLM_OUTPUT_LANGUAGE_MARKER_PREFIX}\s*(.*?)\s*-->`,
|
|
362774
|
+
"i"
|
|
362775
|
+
)
|
|
362776
|
+
);
|
|
362777
|
+
if (markerMatch?.[1]) {
|
|
362778
|
+
const lang = markerMatch[1].trim();
|
|
362779
|
+
if (lang) return lang;
|
|
362780
|
+
}
|
|
362781
|
+
const headingMatch = content.match(
|
|
362782
|
+
/^#.*?CRITICAL:\s*(.*?)\s+Output Language Rule\b/im
|
|
362783
|
+
);
|
|
362784
|
+
if (headingMatch?.[1]) {
|
|
362785
|
+
const lang = headingMatch[1].trim();
|
|
362786
|
+
if (lang) return lang;
|
|
362787
|
+
}
|
|
362788
|
+
return null;
|
|
362789
|
+
}
|
|
362790
|
+
__name(extractLlmOutputLanguageFromRuleFileContent, "extractLlmOutputLanguageFromRuleFileContent");
|
|
362791
|
+
function initializeLlmOutputLanguage() {
|
|
362792
|
+
const filePath = getLlmOutputLanguageRulePath();
|
|
362793
|
+
if (fs75.existsSync(filePath)) {
|
|
362794
|
+
return;
|
|
362795
|
+
}
|
|
362796
|
+
const detectedLocale = detectSystemLanguage();
|
|
362797
|
+
const languageName = getLanguageNameFromLocale(detectedLocale);
|
|
362798
|
+
const content = generateLlmOutputLanguageRule(languageName);
|
|
362799
|
+
const dir = path81.dirname(filePath);
|
|
362800
|
+
fs75.mkdirSync(dir, { recursive: true });
|
|
362801
|
+
fs75.writeFileSync(filePath, content, "utf-8");
|
|
362802
|
+
}
|
|
362803
|
+
__name(initializeLlmOutputLanguage, "initializeLlmOutputLanguage");
|
|
362804
|
+
function getCurrentLlmOutputLanguage() {
|
|
362805
|
+
const filePath = getLlmOutputLanguageRulePath();
|
|
362806
|
+
if (fs75.existsSync(filePath)) {
|
|
362807
|
+
try {
|
|
362808
|
+
const content = fs75.readFileSync(filePath, "utf-8");
|
|
362809
|
+
return extractLlmOutputLanguageFromRuleFileContent(content);
|
|
362810
|
+
} catch {
|
|
362811
|
+
}
|
|
362812
|
+
}
|
|
362813
|
+
return null;
|
|
362814
|
+
}
|
|
362815
|
+
__name(getCurrentLlmOutputLanguage, "getCurrentLlmOutputLanguage");
|
|
362816
|
+
async function setUiLanguage(context2, lang) {
|
|
362817
|
+
const { services } = context2;
|
|
362818
|
+
const { settings } = services;
|
|
362819
|
+
if (!services.config) {
|
|
362820
|
+
return {
|
|
362821
|
+
type: "message",
|
|
362822
|
+
messageType: "error",
|
|
362823
|
+
content: t4("Configuration not available.")
|
|
362824
|
+
};
|
|
362825
|
+
}
|
|
362826
|
+
await setLanguageAsync(lang);
|
|
362827
|
+
if (settings && typeof settings.setValue === "function") {
|
|
362828
|
+
try {
|
|
362829
|
+
settings.setValue("User" /* User */, "general.language", lang);
|
|
362830
|
+
} catch (error2) {
|
|
362831
|
+
console.warn("Failed to save language setting:", error2);
|
|
362832
|
+
}
|
|
362833
|
+
}
|
|
362834
|
+
context2.ui.reloadCommands();
|
|
362835
|
+
return {
|
|
362836
|
+
type: "message",
|
|
362837
|
+
messageType: "info",
|
|
362838
|
+
content: t4("UI language changed to {{lang}}", {
|
|
362839
|
+
lang: formatUiLanguageDisplay(lang)
|
|
362840
|
+
})
|
|
362841
|
+
};
|
|
362842
|
+
}
|
|
362843
|
+
__name(setUiLanguage, "setUiLanguage");
|
|
362844
|
+
function generateLlmOutputLanguageRuleFile(language) {
|
|
362845
|
+
try {
|
|
362846
|
+
const filePath = getLlmOutputLanguageRulePath();
|
|
362847
|
+
const normalizedLanguage = normalizeLanguageName(language);
|
|
362848
|
+
const content = generateLlmOutputLanguageRule(normalizedLanguage);
|
|
362849
|
+
const dir = path81.dirname(filePath);
|
|
362850
|
+
fs75.mkdirSync(dir, { recursive: true });
|
|
362851
|
+
fs75.writeFileSync(filePath, content, "utf-8");
|
|
362852
|
+
return Promise.resolve({
|
|
362853
|
+
type: "message",
|
|
362854
|
+
messageType: "info",
|
|
362855
|
+
content: [
|
|
362856
|
+
t4("LLM output language rule file generated at {{path}}", {
|
|
362857
|
+
path: filePath
|
|
362858
|
+
}),
|
|
362859
|
+
"",
|
|
362860
|
+
t4("Please restart the application for the changes to take effect.")
|
|
362861
|
+
].join("\n")
|
|
362862
|
+
});
|
|
362863
|
+
} catch (error2) {
|
|
362864
|
+
return Promise.resolve({
|
|
362865
|
+
type: "message",
|
|
362866
|
+
messageType: "error",
|
|
362867
|
+
content: t4(
|
|
362868
|
+
"Failed to generate LLM output language rule file: {{error}}",
|
|
362869
|
+
{
|
|
362870
|
+
error: error2 instanceof Error ? error2.message : String(error2)
|
|
362871
|
+
}
|
|
362872
|
+
)
|
|
362873
|
+
});
|
|
362874
|
+
}
|
|
362875
|
+
}
|
|
362876
|
+
__name(generateLlmOutputLanguageRuleFile, "generateLlmOutputLanguageRuleFile");
|
|
362877
|
+
var languageCommand = {
|
|
362878
|
+
name: "language",
|
|
362879
|
+
get description() {
|
|
362880
|
+
return t4("View or change the language setting");
|
|
362881
|
+
},
|
|
362882
|
+
kind: "built-in" /* BUILT_IN */,
|
|
362883
|
+
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
362884
|
+
const { services } = context2;
|
|
362885
|
+
if (!services.config) {
|
|
362886
|
+
return {
|
|
362887
|
+
type: "message",
|
|
362888
|
+
messageType: "error",
|
|
362889
|
+
content: t4("Configuration not available.")
|
|
362890
|
+
};
|
|
362891
|
+
}
|
|
362892
|
+
const trimmedArgs = args.trim();
|
|
362893
|
+
const parts = trimmedArgs.split(/\s+/);
|
|
362894
|
+
const firstArg = parts[0].toLowerCase();
|
|
362895
|
+
const subArgs = parts.slice(1).join(" ");
|
|
362896
|
+
if (firstArg === "ui" || firstArg === "output") {
|
|
362897
|
+
const subCommand = languageCommand.subCommands?.find(
|
|
362898
|
+
(s5) => s5.name === firstArg
|
|
362899
|
+
);
|
|
362900
|
+
if (subCommand?.action) {
|
|
362901
|
+
return subCommand.action(
|
|
362902
|
+
context2,
|
|
362903
|
+
subArgs
|
|
362904
|
+
);
|
|
362905
|
+
}
|
|
362906
|
+
}
|
|
362907
|
+
if (!trimmedArgs) {
|
|
362908
|
+
const currentUiLang = getCurrentLanguage();
|
|
362909
|
+
const currentLlmLang = getCurrentLlmOutputLanguage();
|
|
362910
|
+
const message = [
|
|
362911
|
+
t4("Current UI language: {{lang}}", {
|
|
362912
|
+
lang: formatUiLanguageDisplay(currentUiLang)
|
|
362913
|
+
}),
|
|
362914
|
+
currentLlmLang ? t4("Current LLM output language: {{lang}}", { lang: currentLlmLang }) : t4("LLM output language not set"),
|
|
362915
|
+
"",
|
|
362916
|
+
t4("Available subcommands:"),
|
|
362917
|
+
` /language ui [${SUPPORTED_LANGUAGES.map((o3) => o3.id).join("|")}] - ${t4("Set UI language")}`,
|
|
362918
|
+
` /language output <language> - ${t4("Set LLM output language")}`
|
|
362919
|
+
].join("\n");
|
|
362920
|
+
return {
|
|
362921
|
+
type: "message",
|
|
362922
|
+
messageType: "info",
|
|
362923
|
+
content: message
|
|
362924
|
+
};
|
|
362925
|
+
}
|
|
362926
|
+
const targetLang = parseUiLanguageArg(trimmedArgs);
|
|
362927
|
+
if (targetLang) {
|
|
362928
|
+
return setUiLanguage(context2, targetLang);
|
|
362929
|
+
}
|
|
362930
|
+
return {
|
|
362931
|
+
type: "message",
|
|
362932
|
+
messageType: "error",
|
|
362933
|
+
content: [
|
|
362934
|
+
t4("Invalid command. Available subcommands:"),
|
|
362935
|
+
` - /language ui [${SUPPORTED_LANGUAGES.map((o3) => o3.id).join("|")}] - ${t4("Set UI language")}`,
|
|
362936
|
+
" - /language output <language> - " + t4("Set LLM output language")
|
|
362937
|
+
].join("\n")
|
|
362938
|
+
};
|
|
362939
|
+
}, "action"),
|
|
362940
|
+
subCommands: [
|
|
362941
|
+
{
|
|
362942
|
+
name: "ui",
|
|
362943
|
+
get description() {
|
|
362944
|
+
return t4("Set UI language");
|
|
362945
|
+
},
|
|
362946
|
+
kind: "built-in" /* BUILT_IN */,
|
|
362947
|
+
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
362948
|
+
const trimmedArgs = args.trim();
|
|
362949
|
+
if (!trimmedArgs) {
|
|
362950
|
+
return {
|
|
362951
|
+
type: "message",
|
|
362952
|
+
messageType: "info",
|
|
362953
|
+
content: [
|
|
362954
|
+
t4("Set UI language"),
|
|
362955
|
+
"",
|
|
362956
|
+
t4("Usage: /language ui [{{options}}]", {
|
|
362957
|
+
options: SUPPORTED_LANGUAGES.map((o3) => o3.id).join("|")
|
|
362958
|
+
}),
|
|
362959
|
+
"",
|
|
362960
|
+
t4("Available options:"),
|
|
362961
|
+
...SUPPORTED_LANGUAGES.map(
|
|
362962
|
+
(o3) => ` - ${o3.id}: ${t4(o3.fullName)}`
|
|
362963
|
+
),
|
|
362964
|
+
"",
|
|
362965
|
+
t4(
|
|
362966
|
+
"To request additional UI language packs, please open an issue on GitHub."
|
|
362967
|
+
)
|
|
362968
|
+
].join("\n")
|
|
362969
|
+
};
|
|
362970
|
+
}
|
|
362971
|
+
const targetLang = parseUiLanguageArg(trimmedArgs);
|
|
362972
|
+
if (!targetLang) {
|
|
362973
|
+
return {
|
|
362974
|
+
type: "message",
|
|
362975
|
+
messageType: "error",
|
|
362976
|
+
content: t4("Invalid language. Available: {{options}}", {
|
|
362977
|
+
options: SUPPORTED_LANGUAGES.map((o3) => o3.id).join(",")
|
|
362978
|
+
})
|
|
362979
|
+
};
|
|
362980
|
+
}
|
|
362981
|
+
return setUiLanguage(context2, targetLang);
|
|
362982
|
+
}, "action"),
|
|
362983
|
+
subCommands: SUPPORTED_LANGUAGES.map(createUiLanguageSubCommand)
|
|
362984
|
+
},
|
|
362985
|
+
{
|
|
362986
|
+
name: "output",
|
|
362987
|
+
get description() {
|
|
362988
|
+
return t4("Set LLM output language");
|
|
362989
|
+
},
|
|
362990
|
+
kind: "built-in" /* BUILT_IN */,
|
|
362991
|
+
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
362992
|
+
const trimmedArgs = args.trim();
|
|
362993
|
+
if (!trimmedArgs) {
|
|
362994
|
+
return {
|
|
362995
|
+
type: "message",
|
|
362996
|
+
messageType: "info",
|
|
362997
|
+
content: [
|
|
362998
|
+
t4("Set LLM output language"),
|
|
362999
|
+
"",
|
|
363000
|
+
t4("Usage: /language output <language>"),
|
|
363001
|
+
` ${t4("Example: /language output \u4E2D\u6587")}`,
|
|
363002
|
+
` ${t4("Example: /language output English")}`,
|
|
363003
|
+
` ${t4("Example: /language output \u65E5\u672C\u8A9E")}`
|
|
363004
|
+
].join("\n")
|
|
363005
|
+
};
|
|
363006
|
+
}
|
|
363007
|
+
return generateLlmOutputLanguageRuleFile(trimmedArgs);
|
|
363008
|
+
}, "action")
|
|
363009
|
+
}
|
|
363010
|
+
]
|
|
363011
|
+
};
|
|
363012
|
+
function createUiLanguageSubCommand(option2) {
|
|
363013
|
+
return {
|
|
363014
|
+
name: option2.id,
|
|
363015
|
+
get description() {
|
|
363016
|
+
return t4("Set UI language to {{name}}", { name: option2.fullName });
|
|
363017
|
+
},
|
|
363018
|
+
kind: "built-in" /* BUILT_IN */,
|
|
363019
|
+
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
363020
|
+
if (args.trim().length > 0) {
|
|
363021
|
+
return {
|
|
363022
|
+
type: "message",
|
|
363023
|
+
messageType: "error",
|
|
363024
|
+
content: t4(
|
|
363025
|
+
"Language subcommands do not accept additional arguments."
|
|
363026
|
+
)
|
|
363027
|
+
};
|
|
363028
|
+
}
|
|
363029
|
+
return setUiLanguage(context2, option2.code);
|
|
363030
|
+
}, "action")
|
|
363031
|
+
};
|
|
363032
|
+
}
|
|
363033
|
+
__name(createUiLanguageSubCommand, "createUiLanguageSubCommand");
|
|
363034
|
+
|
|
362729
363035
|
// packages/cli/src/core/initializer.ts
|
|
362730
363036
|
async function initializeApp(config2, settings) {
|
|
362731
363037
|
const languageSetting = process.env["QWEN_CODE_LANG"] || settings.merged.general?.language || "auto";
|
|
362732
363038
|
await initializeI18n(languageSetting);
|
|
363039
|
+
initializeLlmOutputLanguage();
|
|
362733
363040
|
const authType = settings.merged.security?.auth?.selectedType;
|
|
362734
363041
|
const authError = await performInitialAuth(config2, authType);
|
|
362735
363042
|
if (authError) {
|
|
@@ -362878,6 +363185,105 @@ import { randomUUID as randomUUID6 } from "node:crypto";
|
|
|
362878
363185
|
// packages/cli/src/utils/nonInteractiveHelpers.ts
|
|
362879
363186
|
init_esbuild_shims();
|
|
362880
363187
|
|
|
363188
|
+
// packages/cli/src/ui/utils/computeStats.ts
|
|
363189
|
+
init_esbuild_shims();
|
|
363190
|
+
function calculateErrorRate(metrics2) {
|
|
363191
|
+
if (metrics2.api.totalRequests === 0) {
|
|
363192
|
+
return 0;
|
|
363193
|
+
}
|
|
363194
|
+
return metrics2.api.totalErrors / metrics2.api.totalRequests * 100;
|
|
363195
|
+
}
|
|
363196
|
+
__name(calculateErrorRate, "calculateErrorRate");
|
|
363197
|
+
function calculateAverageLatency(metrics2) {
|
|
363198
|
+
if (metrics2.api.totalRequests === 0) {
|
|
363199
|
+
return 0;
|
|
363200
|
+
}
|
|
363201
|
+
return metrics2.api.totalLatencyMs / metrics2.api.totalRequests;
|
|
363202
|
+
}
|
|
363203
|
+
__name(calculateAverageLatency, "calculateAverageLatency");
|
|
363204
|
+
function calculateCacheHitRate(metrics2) {
|
|
363205
|
+
if (metrics2.tokens.prompt === 0) {
|
|
363206
|
+
return 0;
|
|
363207
|
+
}
|
|
363208
|
+
return metrics2.tokens.cached / metrics2.tokens.prompt * 100;
|
|
363209
|
+
}
|
|
363210
|
+
__name(calculateCacheHitRate, "calculateCacheHitRate");
|
|
363211
|
+
var computeSessionStats = /* @__PURE__ */ __name((metrics2) => {
|
|
363212
|
+
const { models, tools, files } = metrics2;
|
|
363213
|
+
const totalApiTime = Object.values(models).reduce(
|
|
363214
|
+
(acc, model) => acc + model.api.totalLatencyMs,
|
|
363215
|
+
0
|
|
363216
|
+
);
|
|
363217
|
+
const totalToolTime = tools.totalDurationMs;
|
|
363218
|
+
const agentActiveTime = totalApiTime + totalToolTime;
|
|
363219
|
+
const apiTimePercent = agentActiveTime > 0 ? totalApiTime / agentActiveTime * 100 : 0;
|
|
363220
|
+
const toolTimePercent = agentActiveTime > 0 ? totalToolTime / agentActiveTime * 100 : 0;
|
|
363221
|
+
const totalCachedTokens = Object.values(models).reduce(
|
|
363222
|
+
(acc, model) => acc + model.tokens.cached,
|
|
363223
|
+
0
|
|
363224
|
+
);
|
|
363225
|
+
const totalPromptTokens = Object.values(models).reduce(
|
|
363226
|
+
(acc, model) => acc + model.tokens.prompt,
|
|
363227
|
+
0
|
|
363228
|
+
);
|
|
363229
|
+
const cacheEfficiency = totalPromptTokens > 0 ? totalCachedTokens / totalPromptTokens * 100 : 0;
|
|
363230
|
+
const totalDecisions = tools.totalDecisions.accept + tools.totalDecisions.reject + tools.totalDecisions.modify;
|
|
363231
|
+
const successRate = tools.totalCalls > 0 ? tools.totalSuccess / tools.totalCalls * 100 : 0;
|
|
363232
|
+
const agreementRate = totalDecisions > 0 ? tools.totalDecisions.accept / totalDecisions * 100 : 0;
|
|
363233
|
+
return {
|
|
363234
|
+
totalApiTime,
|
|
363235
|
+
totalToolTime,
|
|
363236
|
+
agentActiveTime,
|
|
363237
|
+
apiTimePercent,
|
|
363238
|
+
toolTimePercent,
|
|
363239
|
+
cacheEfficiency,
|
|
363240
|
+
totalDecisions,
|
|
363241
|
+
successRate,
|
|
363242
|
+
agreementRate,
|
|
363243
|
+
totalCachedTokens,
|
|
363244
|
+
totalPromptTokens,
|
|
363245
|
+
totalLinesAdded: files.totalLinesAdded,
|
|
363246
|
+
totalLinesRemoved: files.totalLinesRemoved
|
|
363247
|
+
};
|
|
363248
|
+
}, "computeSessionStats");
|
|
363249
|
+
|
|
363250
|
+
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
363251
|
+
init_esbuild_shims();
|
|
363252
|
+
|
|
363253
|
+
// packages/cli/src/utils/commands.ts
|
|
363254
|
+
init_esbuild_shims();
|
|
363255
|
+
var parseSlashCommand = /* @__PURE__ */ __name((query, commands) => {
|
|
363256
|
+
const trimmed2 = query.trim();
|
|
363257
|
+
const parts = trimmed2.substring(1).trim().split(/\s+/);
|
|
363258
|
+
const commandPath = parts.filter((p2) => p2);
|
|
363259
|
+
let currentCommands = commands;
|
|
363260
|
+
let commandToExecute;
|
|
363261
|
+
let pathIndex = 0;
|
|
363262
|
+
const canonicalPath = [];
|
|
363263
|
+
for (const part of commandPath) {
|
|
363264
|
+
let foundCommand = currentCommands.find((cmd) => cmd.name === part);
|
|
363265
|
+
if (!foundCommand) {
|
|
363266
|
+
foundCommand = currentCommands.find(
|
|
363267
|
+
(cmd) => cmd.altNames?.includes(part)
|
|
363268
|
+
);
|
|
363269
|
+
}
|
|
363270
|
+
if (foundCommand) {
|
|
363271
|
+
commandToExecute = foundCommand;
|
|
363272
|
+
canonicalPath.push(foundCommand.name);
|
|
363273
|
+
pathIndex++;
|
|
363274
|
+
if (foundCommand.subCommands) {
|
|
363275
|
+
currentCommands = foundCommand.subCommands;
|
|
363276
|
+
} else {
|
|
363277
|
+
break;
|
|
363278
|
+
}
|
|
363279
|
+
} else {
|
|
363280
|
+
break;
|
|
363281
|
+
}
|
|
363282
|
+
}
|
|
363283
|
+
const args = parts.slice(pathIndex).join(" ");
|
|
363284
|
+
return { commandToExecute, args, canonicalPath };
|
|
363285
|
+
}, "parseSlashCommand");
|
|
363286
|
+
|
|
362881
363287
|
// packages/cli/src/services/CommandService.ts
|
|
362882
363288
|
init_esbuild_shims();
|
|
362883
363289
|
var CommandService = class _CommandService {
|
|
@@ -362961,9 +363367,6 @@ init_esbuild_shims();
|
|
|
362961
363367
|
// packages/cli/src/ui/commands/aboutCommand.ts
|
|
362962
363368
|
init_esbuild_shims();
|
|
362963
363369
|
|
|
362964
|
-
// packages/cli/src/ui/commands/types.ts
|
|
362965
|
-
init_esbuild_shims();
|
|
362966
|
-
|
|
362967
363370
|
// packages/cli/src/ui/types.ts
|
|
362968
363371
|
init_esbuild_shims();
|
|
362969
363372
|
var import_react26 = __toESM(require_react(), 1);
|
|
@@ -363046,7 +363449,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
363046
363449
|
|
|
363047
363450
|
// packages/cli/src/generated/git-commit.ts
|
|
363048
363451
|
init_esbuild_shims();
|
|
363049
|
-
var GIT_COMMIT_INFO2 = "
|
|
363452
|
+
var GIT_COMMIT_INFO2 = "00a75304";
|
|
363050
363453
|
|
|
363051
363454
|
// packages/cli/src/utils/systemInfo.ts
|
|
363052
363455
|
async function getNpmVersion() {
|
|
@@ -363381,7 +363784,8 @@ var compressCommand = {
|
|
|
363381
363784
|
kind: "built-in" /* BUILT_IN */,
|
|
363382
363785
|
action: /* @__PURE__ */ __name(async (context2) => {
|
|
363383
363786
|
const { ui: ui2 } = context2;
|
|
363384
|
-
|
|
363787
|
+
const executionMode = context2.executionMode ?? "interactive";
|
|
363788
|
+
if (executionMode === "interactive" && ui2.pendingItem) {
|
|
363385
363789
|
ui2.addItem(
|
|
363386
363790
|
{
|
|
363387
363791
|
type: "error" /* ERROR */,
|
|
@@ -363400,11 +363804,72 @@ var compressCommand = {
|
|
|
363400
363804
|
compressionStatus: null
|
|
363401
363805
|
}
|
|
363402
363806
|
};
|
|
363403
|
-
|
|
363404
|
-
|
|
363807
|
+
const config2 = context2.services.config;
|
|
363808
|
+
const geminiClient = config2?.getGeminiClient();
|
|
363809
|
+
if (!config2 || !geminiClient) {
|
|
363810
|
+
return {
|
|
363811
|
+
type: "message",
|
|
363812
|
+
messageType: "error",
|
|
363813
|
+
content: t4("Config not loaded.")
|
|
363814
|
+
};
|
|
363815
|
+
}
|
|
363816
|
+
const doCompress = /* @__PURE__ */ __name(async () => {
|
|
363405
363817
|
const promptId = `compress-${Date.now()}`;
|
|
363406
|
-
|
|
363407
|
-
|
|
363818
|
+
return await geminiClient.tryCompressChat(promptId, true);
|
|
363819
|
+
}, "doCompress");
|
|
363820
|
+
if (executionMode === "acp") {
|
|
363821
|
+
const messages = /* @__PURE__ */ __name(async function* () {
|
|
363822
|
+
try {
|
|
363823
|
+
yield {
|
|
363824
|
+
messageType: "info",
|
|
363825
|
+
content: "Compressing context..."
|
|
363826
|
+
};
|
|
363827
|
+
const compressed = await doCompress();
|
|
363828
|
+
if (!compressed) {
|
|
363829
|
+
yield {
|
|
363830
|
+
messageType: "error",
|
|
363831
|
+
content: t4("Failed to compress chat history.")
|
|
363832
|
+
};
|
|
363833
|
+
return;
|
|
363834
|
+
}
|
|
363835
|
+
yield {
|
|
363836
|
+
messageType: "info",
|
|
363837
|
+
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
363838
|
+
};
|
|
363839
|
+
} catch (e4) {
|
|
363840
|
+
yield {
|
|
363841
|
+
messageType: "error",
|
|
363842
|
+
content: t4("Failed to compress chat history: {{error}}", {
|
|
363843
|
+
error: e4 instanceof Error ? e4.message : String(e4)
|
|
363844
|
+
})
|
|
363845
|
+
};
|
|
363846
|
+
}
|
|
363847
|
+
}, "messages");
|
|
363848
|
+
return { type: "stream_messages", messages: messages() };
|
|
363849
|
+
}
|
|
363850
|
+
try {
|
|
363851
|
+
if (executionMode === "interactive") {
|
|
363852
|
+
ui2.setPendingItem(pendingMessage);
|
|
363853
|
+
}
|
|
363854
|
+
const compressed = await doCompress();
|
|
363855
|
+
if (!compressed) {
|
|
363856
|
+
if (executionMode === "interactive") {
|
|
363857
|
+
ui2.addItem(
|
|
363858
|
+
{
|
|
363859
|
+
type: "error" /* ERROR */,
|
|
363860
|
+
text: t4("Failed to compress chat history.")
|
|
363861
|
+
},
|
|
363862
|
+
Date.now()
|
|
363863
|
+
);
|
|
363864
|
+
return;
|
|
363865
|
+
}
|
|
363866
|
+
return {
|
|
363867
|
+
type: "message",
|
|
363868
|
+
messageType: "error",
|
|
363869
|
+
content: t4("Failed to compress chat history.")
|
|
363870
|
+
};
|
|
363871
|
+
}
|
|
363872
|
+
if (executionMode === "interactive") {
|
|
363408
363873
|
ui2.addItem(
|
|
363409
363874
|
{
|
|
363410
363875
|
type: "compression" /* COMPRESSION */,
|
|
@@ -363417,27 +363882,37 @@ var compressCommand = {
|
|
|
363417
363882
|
},
|
|
363418
363883
|
Date.now()
|
|
363419
363884
|
);
|
|
363420
|
-
|
|
363885
|
+
return;
|
|
363886
|
+
}
|
|
363887
|
+
return {
|
|
363888
|
+
type: "message",
|
|
363889
|
+
messageType: "info",
|
|
363890
|
+
content: `Context compressed (${compressed.originalTokenCount} -> ${compressed.newTokenCount}).`
|
|
363891
|
+
};
|
|
363892
|
+
} catch (e4) {
|
|
363893
|
+
if (executionMode === "interactive") {
|
|
363421
363894
|
ui2.addItem(
|
|
363422
363895
|
{
|
|
363423
363896
|
type: "error" /* ERROR */,
|
|
363424
|
-
text: t4("Failed to compress chat history
|
|
363897
|
+
text: t4("Failed to compress chat history: {{error}}", {
|
|
363898
|
+
error: e4 instanceof Error ? e4.message : String(e4)
|
|
363899
|
+
})
|
|
363425
363900
|
},
|
|
363426
363901
|
Date.now()
|
|
363427
363902
|
);
|
|
363903
|
+
return;
|
|
363428
363904
|
}
|
|
363429
|
-
|
|
363430
|
-
|
|
363431
|
-
|
|
363432
|
-
|
|
363433
|
-
|
|
363434
|
-
|
|
363435
|
-
|
|
363436
|
-
},
|
|
363437
|
-
Date.now()
|
|
363438
|
-
);
|
|
363905
|
+
return {
|
|
363906
|
+
type: "message",
|
|
363907
|
+
messageType: "error",
|
|
363908
|
+
content: t4("Failed to compress chat history: {{error}}", {
|
|
363909
|
+
error: e4 instanceof Error ? e4.message : String(e4)
|
|
363910
|
+
})
|
|
363911
|
+
};
|
|
363439
363912
|
} finally {
|
|
363440
|
-
|
|
363913
|
+
if (executionMode === "interactive") {
|
|
363914
|
+
ui2.setPendingItem(null);
|
|
363915
|
+
}
|
|
363441
363916
|
}
|
|
363442
363917
|
}, "action")
|
|
363443
363918
|
};
|
|
@@ -363533,7 +364008,7 @@ var docsCommand = {
|
|
|
363533
364008
|
// packages/cli/src/ui/commands/directoryCommand.tsx
|
|
363534
364009
|
init_esbuild_shims();
|
|
363535
364010
|
import * as os29 from "node:os";
|
|
363536
|
-
import * as
|
|
364011
|
+
import * as path82 from "node:path";
|
|
363537
364012
|
function expandHomeDir(p2) {
|
|
363538
364013
|
if (!p2) {
|
|
363539
364014
|
return "";
|
|
@@ -363544,7 +364019,7 @@ function expandHomeDir(p2) {
|
|
|
363544
364019
|
} else if (p2 === "~" || p2.startsWith("~/")) {
|
|
363545
364020
|
expandedPath = os29.homedir() + p2.substring(1);
|
|
363546
364021
|
}
|
|
363547
|
-
return
|
|
364022
|
+
return path82.normalize(expandedPath);
|
|
363548
364023
|
}
|
|
363549
364024
|
__name(expandHomeDir, "expandHomeDir");
|
|
363550
364025
|
var directoryCommand = {
|
|
@@ -363897,7 +364372,7 @@ var helpCommand = {
|
|
|
363897
364372
|
|
|
363898
364373
|
// packages/cli/src/ui/commands/ideCommand.ts
|
|
363899
364374
|
init_esbuild_shims();
|
|
363900
|
-
import
|
|
364375
|
+
import path83 from "node:path";
|
|
363901
364376
|
function getIdeStatusMessage(ideClient) {
|
|
363902
364377
|
const connection = ideClient.getConnectionStatus();
|
|
363903
364378
|
switch (connection.status) {
|
|
@@ -363927,13 +364402,13 @@ __name(getIdeStatusMessage, "getIdeStatusMessage");
|
|
|
363927
364402
|
function formatFileList(openFiles) {
|
|
363928
364403
|
const basenameCounts = /* @__PURE__ */ new Map();
|
|
363929
364404
|
for (const file of openFiles) {
|
|
363930
|
-
const basename19 =
|
|
364405
|
+
const basename19 = path83.basename(file.path);
|
|
363931
364406
|
basenameCounts.set(basename19, (basenameCounts.get(basename19) || 0) + 1);
|
|
363932
364407
|
}
|
|
363933
364408
|
const fileList = openFiles.map((file) => {
|
|
363934
|
-
const basename19 =
|
|
364409
|
+
const basename19 = path83.basename(file.path);
|
|
363935
364410
|
const isDuplicate = (basenameCounts.get(basename19) || 0) > 1;
|
|
363936
|
-
const parentDir =
|
|
364411
|
+
const parentDir = path83.basename(path83.dirname(file.path));
|
|
363937
364412
|
const displayName = isDuplicate ? `${basename19} (/${parentDir})` : basename19;
|
|
363938
364413
|
return ` - ${displayName}${file.isActive ? " (active)" : ""}`;
|
|
363939
364414
|
}).join("\n");
|
|
@@ -364164,8 +364639,8 @@ var ideCommand = /* @__PURE__ */ __name(async () => {
|
|
|
364164
364639
|
|
|
364165
364640
|
// packages/cli/src/ui/commands/initCommand.ts
|
|
364166
364641
|
init_esbuild_shims();
|
|
364167
|
-
import * as
|
|
364168
|
-
import * as
|
|
364642
|
+
import * as fs76 from "node:fs";
|
|
364643
|
+
import * as path84 from "node:path";
|
|
364169
364644
|
var import_react27 = __toESM(require_react(), 1);
|
|
364170
364645
|
var initCommand = {
|
|
364171
364646
|
name: "init",
|
|
@@ -364183,11 +364658,11 @@ var initCommand = {
|
|
|
364183
364658
|
}
|
|
364184
364659
|
const targetDir = context2.services.config.getTargetDir();
|
|
364185
364660
|
const contextFileName = getCurrentGeminiMdFilename();
|
|
364186
|
-
const contextFilePath =
|
|
364661
|
+
const contextFilePath = path84.join(targetDir, contextFileName);
|
|
364187
364662
|
try {
|
|
364188
|
-
if (
|
|
364663
|
+
if (fs76.existsSync(contextFilePath)) {
|
|
364189
364664
|
try {
|
|
364190
|
-
const existing =
|
|
364665
|
+
const existing = fs76.readFileSync(contextFilePath, "utf8");
|
|
364191
364666
|
if (existing && existing.trim().length > 0) {
|
|
364192
364667
|
if (!context2.overwriteConfirmed) {
|
|
364193
364668
|
return {
|
|
@@ -364209,7 +364684,7 @@ var initCommand = {
|
|
|
364209
364684
|
}
|
|
364210
364685
|
}
|
|
364211
364686
|
try {
|
|
364212
|
-
|
|
364687
|
+
fs76.writeFileSync(contextFilePath, "", "utf8");
|
|
364213
364688
|
context2.ui.addItem(
|
|
364214
364689
|
{
|
|
364215
364690
|
type: "info",
|
|
@@ -364272,378 +364747,6 @@ Write the complete content to the \`${contextFileName}\` file. The output must b
|
|
|
364272
364747
|
}, "action")
|
|
364273
364748
|
};
|
|
364274
364749
|
|
|
364275
|
-
// packages/cli/src/ui/commands/languageCommand.ts
|
|
364276
|
-
init_esbuild_shims();
|
|
364277
|
-
import * as fs76 from "node:fs";
|
|
364278
|
-
import * as path84 from "node:path";
|
|
364279
|
-
var LLM_OUTPUT_LANGUAGE_RULE_FILENAME = "output-language.md";
|
|
364280
|
-
function generateLlmOutputLanguageRule(language) {
|
|
364281
|
-
return `# \u26A0\uFE0F CRITICAL: ${language} Output Language Rule - HIGHEST PRIORITY \u26A0\uFE0F
|
|
364282
|
-
|
|
364283
|
-
## \u{1F6A8} MANDATORY RULE - NO EXCEPTIONS \u{1F6A8}
|
|
364284
|
-
|
|
364285
|
-
**YOU MUST RESPOND IN ${language.toUpperCase()} FOR EVERY SINGLE OUTPUT, REGARDLESS OF THE USER'S INPUT LANGUAGE.**
|
|
364286
|
-
|
|
364287
|
-
This is a **NON-NEGOTIABLE** requirement. Even if the user writes in English, says "hi", asks a simple question, or explicitly requests another language, **YOU MUST ALWAYS RESPOND IN ${language.toUpperCase()}.**
|
|
364288
|
-
|
|
364289
|
-
## What Must Be in ${language}
|
|
364290
|
-
|
|
364291
|
-
**EVERYTHING** you output: conversation replies, tool call descriptions, success/error messages, generated file content (comments, documentation), and all explanatory text.
|
|
364292
|
-
|
|
364293
|
-
**Tool outputs**: All descriptive text from \`read_file\`, \`write_file\`, \`codebase_search\`, \`run_terminal_cmd\`, \`todo_write\`, \`web_search\`, etc. MUST be in ${language}.
|
|
364294
|
-
|
|
364295
|
-
## Examples
|
|
364296
|
-
|
|
364297
|
-
### \u2705 CORRECT:
|
|
364298
|
-
- User says "hi" \u2192 Respond in ${language} (e.g., "Bonjour" if ${language} is French)
|
|
364299
|
-
- Tool result \u2192 "\u5DF2\u6210\u529F\u8BFB\u53D6\u6587\u4EF6 config.json" (if ${language} is Chinese)
|
|
364300
|
-
- Error \u2192 "\u65E0\u6CD5\u627E\u5230\u6307\u5B9A\u7684\u6587\u4EF6" (if ${language} is Chinese)
|
|
364301
|
-
|
|
364302
|
-
### \u274C WRONG:
|
|
364303
|
-
- User says "hi" \u2192 "Hello" in English
|
|
364304
|
-
- Tool result \u2192 "Successfully read file" in English
|
|
364305
|
-
- Error \u2192 "File not found" in English
|
|
364306
|
-
|
|
364307
|
-
## Notes
|
|
364308
|
-
|
|
364309
|
-
- Code elements (variable/function names, syntax) can remain in English
|
|
364310
|
-
- Comments, documentation, and all other text MUST be in ${language}
|
|
364311
|
-
|
|
364312
|
-
**THIS RULE IS ACTIVE NOW. ALL OUTPUTS MUST BE IN ${language.toUpperCase()}. NO EXCEPTIONS.**
|
|
364313
|
-
`;
|
|
364314
|
-
}
|
|
364315
|
-
__name(generateLlmOutputLanguageRule, "generateLlmOutputLanguageRule");
|
|
364316
|
-
function getLlmOutputLanguageRulePath() {
|
|
364317
|
-
return path84.join(
|
|
364318
|
-
Storage.getGlobalQwenDir(),
|
|
364319
|
-
LLM_OUTPUT_LANGUAGE_RULE_FILENAME
|
|
364320
|
-
);
|
|
364321
|
-
}
|
|
364322
|
-
__name(getLlmOutputLanguageRulePath, "getLlmOutputLanguageRulePath");
|
|
364323
|
-
function getCurrentLlmOutputLanguage() {
|
|
364324
|
-
const filePath = getLlmOutputLanguageRulePath();
|
|
364325
|
-
if (fs76.existsSync(filePath)) {
|
|
364326
|
-
try {
|
|
364327
|
-
const content = fs76.readFileSync(filePath, "utf-8");
|
|
364328
|
-
const match2 = content.match(/^#.*?(\w+)\s+Output Language Rule/i);
|
|
364329
|
-
if (match2) {
|
|
364330
|
-
return match2[1];
|
|
364331
|
-
}
|
|
364332
|
-
} catch {
|
|
364333
|
-
}
|
|
364334
|
-
}
|
|
364335
|
-
return null;
|
|
364336
|
-
}
|
|
364337
|
-
__name(getCurrentLlmOutputLanguage, "getCurrentLlmOutputLanguage");
|
|
364338
|
-
async function setUiLanguage(context2, lang) {
|
|
364339
|
-
const { services } = context2;
|
|
364340
|
-
const { settings } = services;
|
|
364341
|
-
if (!services.config) {
|
|
364342
|
-
return {
|
|
364343
|
-
type: "message",
|
|
364344
|
-
messageType: "error",
|
|
364345
|
-
content: t4("Configuration not available.")
|
|
364346
|
-
};
|
|
364347
|
-
}
|
|
364348
|
-
await setLanguageAsync(lang);
|
|
364349
|
-
if (settings && typeof settings.setValue === "function") {
|
|
364350
|
-
try {
|
|
364351
|
-
settings.setValue("User" /* User */, "general.language", lang);
|
|
364352
|
-
} catch (error2) {
|
|
364353
|
-
console.warn("Failed to save language setting:", error2);
|
|
364354
|
-
}
|
|
364355
|
-
}
|
|
364356
|
-
context2.ui.reloadCommands();
|
|
364357
|
-
const langDisplayNames = {
|
|
364358
|
-
zh: "\u4E2D\u6587\uFF08zh-CN\uFF09",
|
|
364359
|
-
en: "English\uFF08en-US\uFF09",
|
|
364360
|
-
ru: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439 (ru-RU)"
|
|
364361
|
-
};
|
|
364362
|
-
return {
|
|
364363
|
-
type: "message",
|
|
364364
|
-
messageType: "info",
|
|
364365
|
-
content: t4("UI language changed to {{lang}}", {
|
|
364366
|
-
lang: langDisplayNames[lang] || lang
|
|
364367
|
-
})
|
|
364368
|
-
};
|
|
364369
|
-
}
|
|
364370
|
-
__name(setUiLanguage, "setUiLanguage");
|
|
364371
|
-
function generateLlmOutputLanguageRuleFile(language) {
|
|
364372
|
-
try {
|
|
364373
|
-
const filePath = getLlmOutputLanguageRulePath();
|
|
364374
|
-
const content = generateLlmOutputLanguageRule(language);
|
|
364375
|
-
const dir = path84.dirname(filePath);
|
|
364376
|
-
fs76.mkdirSync(dir, { recursive: true });
|
|
364377
|
-
fs76.writeFileSync(filePath, content, "utf-8");
|
|
364378
|
-
return Promise.resolve({
|
|
364379
|
-
type: "message",
|
|
364380
|
-
messageType: "info",
|
|
364381
|
-
content: [
|
|
364382
|
-
t4("LLM output language rule file generated at {{path}}", {
|
|
364383
|
-
path: filePath
|
|
364384
|
-
}),
|
|
364385
|
-
"",
|
|
364386
|
-
t4("Please restart the application for the changes to take effect.")
|
|
364387
|
-
].join("\n")
|
|
364388
|
-
});
|
|
364389
|
-
} catch (error2) {
|
|
364390
|
-
return Promise.resolve({
|
|
364391
|
-
type: "message",
|
|
364392
|
-
messageType: "error",
|
|
364393
|
-
content: t4(
|
|
364394
|
-
"Failed to generate LLM output language rule file: {{error}}",
|
|
364395
|
-
{
|
|
364396
|
-
error: error2 instanceof Error ? error2.message : String(error2)
|
|
364397
|
-
}
|
|
364398
|
-
)
|
|
364399
|
-
});
|
|
364400
|
-
}
|
|
364401
|
-
}
|
|
364402
|
-
__name(generateLlmOutputLanguageRuleFile, "generateLlmOutputLanguageRuleFile");
|
|
364403
|
-
var languageCommand = {
|
|
364404
|
-
name: "language",
|
|
364405
|
-
get description() {
|
|
364406
|
-
return t4("View or change the language setting");
|
|
364407
|
-
},
|
|
364408
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364409
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364410
|
-
const { services } = context2;
|
|
364411
|
-
if (!services.config) {
|
|
364412
|
-
return {
|
|
364413
|
-
type: "message",
|
|
364414
|
-
messageType: "error",
|
|
364415
|
-
content: t4("Configuration not available.")
|
|
364416
|
-
};
|
|
364417
|
-
}
|
|
364418
|
-
const trimmedArgs = args.trim();
|
|
364419
|
-
if (!trimmedArgs) {
|
|
364420
|
-
const currentUiLang = getCurrentLanguage();
|
|
364421
|
-
const currentLlmLang = getCurrentLlmOutputLanguage();
|
|
364422
|
-
const message = [
|
|
364423
|
-
t4("Current UI language: {{lang}}", { lang: currentUiLang }),
|
|
364424
|
-
currentLlmLang ? t4("Current LLM output language: {{lang}}", { lang: currentLlmLang }) : t4("LLM output language not set"),
|
|
364425
|
-
"",
|
|
364426
|
-
t4("Available subcommands:"),
|
|
364427
|
-
` /language ui [zh-CN|en-US|ru-RU] - ${t4("Set UI language")}`,
|
|
364428
|
-
` /language output <language> - ${t4("Set LLM output language")}`
|
|
364429
|
-
].join("\n");
|
|
364430
|
-
return {
|
|
364431
|
-
type: "message",
|
|
364432
|
-
messageType: "info",
|
|
364433
|
-
content: message
|
|
364434
|
-
};
|
|
364435
|
-
}
|
|
364436
|
-
const parts = trimmedArgs.split(/\s+/);
|
|
364437
|
-
const subcommand = parts[0].toLowerCase();
|
|
364438
|
-
if (subcommand === "ui") {
|
|
364439
|
-
if (parts.length === 1) {
|
|
364440
|
-
return {
|
|
364441
|
-
type: "message",
|
|
364442
|
-
messageType: "info",
|
|
364443
|
-
content: [
|
|
364444
|
-
t4("Set UI language"),
|
|
364445
|
-
"",
|
|
364446
|
-
t4("Usage: /language ui [zh-CN|en-US|ru-RU]"),
|
|
364447
|
-
"",
|
|
364448
|
-
t4("Available options:"),
|
|
364449
|
-
t4(" - zh-CN: Simplified Chinese"),
|
|
364450
|
-
t4(" - en-US: English"),
|
|
364451
|
-
t4(" - ru-RU: Russian"),
|
|
364452
|
-
"",
|
|
364453
|
-
t4(
|
|
364454
|
-
"To request additional UI language packs, please open an issue on GitHub."
|
|
364455
|
-
)
|
|
364456
|
-
].join("\n")
|
|
364457
|
-
};
|
|
364458
|
-
}
|
|
364459
|
-
const langArg = parts[1].toLowerCase();
|
|
364460
|
-
let targetLang = null;
|
|
364461
|
-
if (langArg === "en" || langArg === "english" || langArg === "en-us") {
|
|
364462
|
-
targetLang = "en";
|
|
364463
|
-
} else if (langArg === "zh" || langArg === "chinese" || langArg === "\u4E2D\u6587" || langArg === "zh-cn") {
|
|
364464
|
-
targetLang = "zh";
|
|
364465
|
-
} else if (langArg === "ru" || langArg === "ru-RU" || langArg === "russian" || langArg === "\u0440\u0443\u0441\u0441\u043A\u0438\u0439") {
|
|
364466
|
-
targetLang = "ru";
|
|
364467
|
-
} else {
|
|
364468
|
-
return {
|
|
364469
|
-
type: "message",
|
|
364470
|
-
messageType: "error",
|
|
364471
|
-
content: t4("Invalid language. Available: en-US, zh-CN, ru-RU")
|
|
364472
|
-
};
|
|
364473
|
-
}
|
|
364474
|
-
return setUiLanguage(context2, targetLang);
|
|
364475
|
-
} else if (subcommand === "output") {
|
|
364476
|
-
if (parts.length === 1) {
|
|
364477
|
-
return {
|
|
364478
|
-
type: "message",
|
|
364479
|
-
messageType: "info",
|
|
364480
|
-
content: [
|
|
364481
|
-
t4("Set LLM output language"),
|
|
364482
|
-
"",
|
|
364483
|
-
t4("Usage: /language output <language>"),
|
|
364484
|
-
` ${t4("Example: /language output \u4E2D\u6587")}`
|
|
364485
|
-
].join("\n")
|
|
364486
|
-
};
|
|
364487
|
-
}
|
|
364488
|
-
const language = parts.slice(1).join(" ");
|
|
364489
|
-
return generateLlmOutputLanguageRuleFile(language);
|
|
364490
|
-
} else {
|
|
364491
|
-
const langArg = trimmedArgs.toLowerCase();
|
|
364492
|
-
let targetLang = null;
|
|
364493
|
-
if (langArg === "en" || langArg === "english" || langArg === "en-us") {
|
|
364494
|
-
targetLang = "en";
|
|
364495
|
-
} else if (langArg === "zh" || langArg === "chinese" || langArg === "\u4E2D\u6587" || langArg === "zh-cn") {
|
|
364496
|
-
targetLang = "zh";
|
|
364497
|
-
} else if (langArg === "ru" || langArg === "ru-RU" || langArg === "russian" || langArg === "\u0440\u0443\u0441\u0441\u043A\u0438\u0439") {
|
|
364498
|
-
targetLang = "ru";
|
|
364499
|
-
} else {
|
|
364500
|
-
return {
|
|
364501
|
-
type: "message",
|
|
364502
|
-
messageType: "error",
|
|
364503
|
-
content: [
|
|
364504
|
-
t4("Invalid command. Available subcommands:"),
|
|
364505
|
-
" - /language ui [zh-CN|en-US|ru-RU] - " + t4("Set UI language"),
|
|
364506
|
-
" - /language output <language> - " + t4("Set LLM output language")
|
|
364507
|
-
].join("\n")
|
|
364508
|
-
};
|
|
364509
|
-
}
|
|
364510
|
-
return setUiLanguage(context2, targetLang);
|
|
364511
|
-
}
|
|
364512
|
-
}, "action"),
|
|
364513
|
-
subCommands: [
|
|
364514
|
-
{
|
|
364515
|
-
name: "ui",
|
|
364516
|
-
get description() {
|
|
364517
|
-
return t4("Set UI language");
|
|
364518
|
-
},
|
|
364519
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364520
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364521
|
-
const trimmedArgs = args.trim();
|
|
364522
|
-
if (!trimmedArgs) {
|
|
364523
|
-
return {
|
|
364524
|
-
type: "message",
|
|
364525
|
-
messageType: "info",
|
|
364526
|
-
content: [
|
|
364527
|
-
t4("Set UI language"),
|
|
364528
|
-
"",
|
|
364529
|
-
t4("Usage: /language ui [zh-CN|en-US]"),
|
|
364530
|
-
"",
|
|
364531
|
-
t4("Available options:"),
|
|
364532
|
-
t4(" - zh-CN: Simplified Chinese"),
|
|
364533
|
-
t4(" - en-US: English"),
|
|
364534
|
-
"",
|
|
364535
|
-
t4(
|
|
364536
|
-
"To request additional UI language packs, please open an issue on GitHub."
|
|
364537
|
-
)
|
|
364538
|
-
].join("\n")
|
|
364539
|
-
};
|
|
364540
|
-
}
|
|
364541
|
-
const langArg = trimmedArgs.toLowerCase();
|
|
364542
|
-
let targetLang = null;
|
|
364543
|
-
if (langArg === "en" || langArg === "english" || langArg === "en-us") {
|
|
364544
|
-
targetLang = "en";
|
|
364545
|
-
} else if (langArg === "zh" || langArg === "chinese" || langArg === "\u4E2D\u6587" || langArg === "zh-cn") {
|
|
364546
|
-
targetLang = "zh";
|
|
364547
|
-
} else {
|
|
364548
|
-
return {
|
|
364549
|
-
type: "message",
|
|
364550
|
-
messageType: "error",
|
|
364551
|
-
content: t4("Invalid language. Available: en-US, zh-CN")
|
|
364552
|
-
};
|
|
364553
|
-
}
|
|
364554
|
-
return setUiLanguage(context2, targetLang);
|
|
364555
|
-
}, "action"),
|
|
364556
|
-
subCommands: [
|
|
364557
|
-
{
|
|
364558
|
-
name: "zh-CN",
|
|
364559
|
-
altNames: ["zh", "chinese", "\u4E2D\u6587"],
|
|
364560
|
-
get description() {
|
|
364561
|
-
return t4("Set UI language to Simplified Chinese (zh-CN)");
|
|
364562
|
-
},
|
|
364563
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364564
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364565
|
-
if (args.trim().length > 0) {
|
|
364566
|
-
return {
|
|
364567
|
-
type: "message",
|
|
364568
|
-
messageType: "error",
|
|
364569
|
-
content: t4(
|
|
364570
|
-
"Language subcommands do not accept additional arguments."
|
|
364571
|
-
)
|
|
364572
|
-
};
|
|
364573
|
-
}
|
|
364574
|
-
return setUiLanguage(context2, "zh");
|
|
364575
|
-
}, "action")
|
|
364576
|
-
},
|
|
364577
|
-
{
|
|
364578
|
-
name: "en-US",
|
|
364579
|
-
altNames: ["en", "english"],
|
|
364580
|
-
get description() {
|
|
364581
|
-
return t4("Set UI language to English (en-US)");
|
|
364582
|
-
},
|
|
364583
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364584
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364585
|
-
if (args.trim().length > 0) {
|
|
364586
|
-
return {
|
|
364587
|
-
type: "message",
|
|
364588
|
-
messageType: "error",
|
|
364589
|
-
content: t4(
|
|
364590
|
-
"Language subcommands do not accept additional arguments."
|
|
364591
|
-
)
|
|
364592
|
-
};
|
|
364593
|
-
}
|
|
364594
|
-
return setUiLanguage(context2, "en");
|
|
364595
|
-
}, "action")
|
|
364596
|
-
},
|
|
364597
|
-
{
|
|
364598
|
-
name: "ru-RU",
|
|
364599
|
-
altNames: ["ru", "russian", "\u0440\u0443\u0441\u0441\u043A\u0438\u0439"],
|
|
364600
|
-
get description() {
|
|
364601
|
-
return t4("Set UI language to Russian (ru-RU)");
|
|
364602
|
-
},
|
|
364603
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364604
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364605
|
-
if (args.trim().length > 0) {
|
|
364606
|
-
return {
|
|
364607
|
-
type: "message",
|
|
364608
|
-
messageType: "error",
|
|
364609
|
-
content: t4(
|
|
364610
|
-
"Language subcommands do not accept additional arguments."
|
|
364611
|
-
)
|
|
364612
|
-
};
|
|
364613
|
-
}
|
|
364614
|
-
return setUiLanguage(context2, "ru");
|
|
364615
|
-
}, "action")
|
|
364616
|
-
}
|
|
364617
|
-
]
|
|
364618
|
-
},
|
|
364619
|
-
{
|
|
364620
|
-
name: "output",
|
|
364621
|
-
get description() {
|
|
364622
|
-
return t4("Set LLM output language");
|
|
364623
|
-
},
|
|
364624
|
-
kind: "built-in" /* BUILT_IN */,
|
|
364625
|
-
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
364626
|
-
const trimmedArgs = args.trim();
|
|
364627
|
-
if (!trimmedArgs) {
|
|
364628
|
-
return {
|
|
364629
|
-
type: "message",
|
|
364630
|
-
messageType: "info",
|
|
364631
|
-
content: [
|
|
364632
|
-
t4("Set LLM output language"),
|
|
364633
|
-
"",
|
|
364634
|
-
t4("Usage: /language output <language>"),
|
|
364635
|
-
` ${t4("Example: /language output \u4E2D\u6587")}`,
|
|
364636
|
-
` ${t4("Example: /language output English")}`,
|
|
364637
|
-
` ${t4("Example: /language output \u65E5\u672C\u8A9E")}`
|
|
364638
|
-
].join("\n")
|
|
364639
|
-
};
|
|
364640
|
-
}
|
|
364641
|
-
return generateLlmOutputLanguageRuleFile(trimmedArgs);
|
|
364642
|
-
}, "action")
|
|
364643
|
-
}
|
|
364644
|
-
]
|
|
364645
|
-
};
|
|
364646
|
-
|
|
364647
364750
|
// packages/cli/src/ui/commands/mcpCommand.ts
|
|
364648
364751
|
init_esbuild_shims();
|
|
364649
364752
|
var authCommand2 = {
|
|
@@ -365618,6 +365721,7 @@ var summaryCommand = {
|
|
|
365618
365721
|
action: /* @__PURE__ */ __name(async (context2) => {
|
|
365619
365722
|
const { config: config2 } = context2.services;
|
|
365620
365723
|
const { ui: ui2 } = context2;
|
|
365724
|
+
const executionMode = context2.executionMode ?? "interactive";
|
|
365621
365725
|
if (!config2) {
|
|
365622
365726
|
return {
|
|
365623
365727
|
type: "message",
|
|
@@ -365633,7 +365737,7 @@ var summaryCommand = {
|
|
|
365633
365737
|
content: t4("No chat client available to generate summary.")
|
|
365634
365738
|
};
|
|
365635
365739
|
}
|
|
365636
|
-
if (ui2.pendingItem) {
|
|
365740
|
+
if (executionMode === "interactive" && ui2.pendingItem) {
|
|
365637
365741
|
ui2.addItem(
|
|
365638
365742
|
{
|
|
365639
365743
|
type: "error",
|
|
@@ -365651,25 +365755,17 @@ var summaryCommand = {
|
|
|
365651
365755
|
)
|
|
365652
365756
|
};
|
|
365653
365757
|
}
|
|
365654
|
-
|
|
365758
|
+
const getChatHistory = /* @__PURE__ */ __name(() => {
|
|
365655
365759
|
const chat = geminiClient.getChat();
|
|
365656
|
-
|
|
365657
|
-
|
|
365658
|
-
|
|
365659
|
-
|
|
365660
|
-
|
|
365661
|
-
|
|
365662
|
-
|
|
365663
|
-
|
|
365664
|
-
const
|
|
365665
|
-
type: "summary",
|
|
365666
|
-
summary: {
|
|
365667
|
-
isPending: true,
|
|
365668
|
-
stage: "generating"
|
|
365669
|
-
}
|
|
365670
|
-
};
|
|
365671
|
-
ui2.setPendingItem(pendingMessage);
|
|
365672
|
-
const conversationContext = history.map((message) => ({
|
|
365760
|
+
return chat.getHistory();
|
|
365761
|
+
}, "getChatHistory");
|
|
365762
|
+
const validateChatHistory = /* @__PURE__ */ __name((history2) => {
|
|
365763
|
+
if (history2.length <= 2) {
|
|
365764
|
+
throw new Error(t4("No conversation found to summarize."));
|
|
365765
|
+
}
|
|
365766
|
+
}, "validateChatHistory");
|
|
365767
|
+
const generateSummaryMarkdown = /* @__PURE__ */ __name(async (history2) => {
|
|
365768
|
+
const conversationContext = history2.map((message) => ({
|
|
365673
365769
|
role: message.role,
|
|
365674
365770
|
parts: message.parts
|
|
365675
365771
|
}));
|
|
@@ -365693,16 +365789,14 @@ var summaryCommand = {
|
|
|
365693
365789
|
const markdownSummary = parts?.map((part) => part.text).filter((text) => typeof text === "string").join("") || "";
|
|
365694
365790
|
if (!markdownSummary) {
|
|
365695
365791
|
throw new Error(
|
|
365696
|
-
|
|
365792
|
+
t4(
|
|
365793
|
+
"Failed to generate summary - no text content received from LLM response"
|
|
365794
|
+
)
|
|
365697
365795
|
);
|
|
365698
365796
|
}
|
|
365699
|
-
|
|
365700
|
-
|
|
365701
|
-
|
|
365702
|
-
isPending: true,
|
|
365703
|
-
stage: "saving"
|
|
365704
|
-
}
|
|
365705
|
-
});
|
|
365797
|
+
return markdownSummary;
|
|
365798
|
+
}, "generateSummaryMarkdown");
|
|
365799
|
+
const saveSummaryToDisk = /* @__PURE__ */ __name(async (markdownSummary) => {
|
|
365706
365800
|
const projectRoot = config2.getProjectRoot();
|
|
365707
365801
|
const qwenDir = path87.join(projectRoot, ".qwen");
|
|
365708
365802
|
try {
|
|
@@ -365718,42 +365812,137 @@ var summaryCommand = {
|
|
|
365718
365812
|
**Update time**: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
365719
365813
|
`;
|
|
365720
365814
|
await fsPromises5.writeFile(summaryPath, summaryContent, "utf8");
|
|
365815
|
+
return {
|
|
365816
|
+
filePathForDisplay: ".qwen/PROJECT_SUMMARY.md",
|
|
365817
|
+
fullPath: summaryPath
|
|
365818
|
+
};
|
|
365819
|
+
}, "saveSummaryToDisk");
|
|
365820
|
+
const emitInteractivePending = /* @__PURE__ */ __name((stage) => {
|
|
365821
|
+
if (executionMode !== "interactive") {
|
|
365822
|
+
return;
|
|
365823
|
+
}
|
|
365824
|
+
const pendingMessage = {
|
|
365825
|
+
type: "summary",
|
|
365826
|
+
summary: {
|
|
365827
|
+
isPending: true,
|
|
365828
|
+
stage
|
|
365829
|
+
}
|
|
365830
|
+
};
|
|
365831
|
+
ui2.setPendingItem(pendingMessage);
|
|
365832
|
+
}, "emitInteractivePending");
|
|
365833
|
+
const completeInteractive = /* @__PURE__ */ __name((filePathForDisplay) => {
|
|
365834
|
+
if (executionMode !== "interactive") {
|
|
365835
|
+
return;
|
|
365836
|
+
}
|
|
365721
365837
|
ui2.setPendingItem(null);
|
|
365722
365838
|
const completedSummaryItem = {
|
|
365723
365839
|
type: "summary",
|
|
365724
365840
|
summary: {
|
|
365725
365841
|
isPending: false,
|
|
365726
365842
|
stage: "completed",
|
|
365727
|
-
filePath:
|
|
365843
|
+
filePath: filePathForDisplay
|
|
365728
365844
|
}
|
|
365729
365845
|
};
|
|
365730
365846
|
ui2.addItem(completedSummaryItem, Date.now());
|
|
365731
|
-
|
|
365732
|
-
|
|
365733
|
-
|
|
365734
|
-
|
|
365735
|
-
|
|
365736
|
-
|
|
365737
|
-
|
|
365847
|
+
}, "completeInteractive");
|
|
365848
|
+
const formatErrorMessage = /* @__PURE__ */ __name((error2) => t4("Failed to generate project context summary: {{error}}", {
|
|
365849
|
+
error: error2 instanceof Error ? error2.message : String(error2)
|
|
365850
|
+
}), "formatErrorMessage");
|
|
365851
|
+
const failInteractive = /* @__PURE__ */ __name((error2) => {
|
|
365852
|
+
if (executionMode !== "interactive") {
|
|
365853
|
+
return;
|
|
365854
|
+
}
|
|
365738
365855
|
ui2.setPendingItem(null);
|
|
365739
365856
|
ui2.addItem(
|
|
365740
365857
|
{
|
|
365741
365858
|
type: "error",
|
|
365742
|
-
text: `\u274C ${
|
|
365743
|
-
"Failed to generate project context summary: {{error}}",
|
|
365744
|
-
{
|
|
365745
|
-
error: error2 instanceof Error ? error2.message : String(error2)
|
|
365746
|
-
}
|
|
365747
|
-
)}`
|
|
365859
|
+
text: `\u274C ${formatErrorMessage(error2)}`
|
|
365748
365860
|
},
|
|
365749
365861
|
Date.now()
|
|
365750
365862
|
);
|
|
365863
|
+
}, "failInteractive");
|
|
365864
|
+
const formatSuccessMessage = /* @__PURE__ */ __name((filePathForDisplay) => t4("Saved project summary to {{filePathForDisplay}}.", {
|
|
365865
|
+
filePathForDisplay
|
|
365866
|
+
}), "formatSuccessMessage");
|
|
365867
|
+
const returnNoConversationMessage = /* @__PURE__ */ __name(() => {
|
|
365868
|
+
const msg = t4("No conversation found to summarize.");
|
|
365869
|
+
if (executionMode === "acp") {
|
|
365870
|
+
const messages = /* @__PURE__ */ __name(async function* () {
|
|
365871
|
+
yield {
|
|
365872
|
+
messageType: "info",
|
|
365873
|
+
content: msg
|
|
365874
|
+
};
|
|
365875
|
+
}, "messages");
|
|
365876
|
+
return {
|
|
365877
|
+
type: "stream_messages",
|
|
365878
|
+
messages: messages()
|
|
365879
|
+
};
|
|
365880
|
+
}
|
|
365881
|
+
return {
|
|
365882
|
+
type: "message",
|
|
365883
|
+
messageType: "info",
|
|
365884
|
+
content: msg
|
|
365885
|
+
};
|
|
365886
|
+
}, "returnNoConversationMessage");
|
|
365887
|
+
const executeSummaryGeneration = /* @__PURE__ */ __name(async (history2) => {
|
|
365888
|
+
emitInteractivePending("generating");
|
|
365889
|
+
const markdownSummary = await generateSummaryMarkdown(history2);
|
|
365890
|
+
emitInteractivePending("saving");
|
|
365891
|
+
const { filePathForDisplay } = await saveSummaryToDisk(markdownSummary);
|
|
365892
|
+
completeInteractive(filePathForDisplay);
|
|
365893
|
+
return { markdownSummary, filePathForDisplay };
|
|
365894
|
+
}, "executeSummaryGeneration");
|
|
365895
|
+
const history = getChatHistory();
|
|
365896
|
+
try {
|
|
365897
|
+
validateChatHistory(history);
|
|
365898
|
+
} catch (_error) {
|
|
365899
|
+
return returnNoConversationMessage();
|
|
365900
|
+
}
|
|
365901
|
+
if (executionMode === "acp") {
|
|
365902
|
+
const messages = /* @__PURE__ */ __name(async function* () {
|
|
365903
|
+
try {
|
|
365904
|
+
yield {
|
|
365905
|
+
messageType: "info",
|
|
365906
|
+
content: t4("Generating project summary...")
|
|
365907
|
+
};
|
|
365908
|
+
const { filePathForDisplay } = await executeSummaryGeneration(history);
|
|
365909
|
+
yield {
|
|
365910
|
+
messageType: "info",
|
|
365911
|
+
content: formatSuccessMessage(filePathForDisplay)
|
|
365912
|
+
};
|
|
365913
|
+
} catch (error2) {
|
|
365914
|
+
failInteractive(error2);
|
|
365915
|
+
yield {
|
|
365916
|
+
messageType: "error",
|
|
365917
|
+
content: formatErrorMessage(error2)
|
|
365918
|
+
};
|
|
365919
|
+
}
|
|
365920
|
+
}, "messages");
|
|
365921
|
+
return {
|
|
365922
|
+
type: "stream_messages",
|
|
365923
|
+
messages: messages()
|
|
365924
|
+
};
|
|
365925
|
+
}
|
|
365926
|
+
try {
|
|
365927
|
+
const { filePathForDisplay } = await executeSummaryGeneration(history);
|
|
365928
|
+
if (executionMode === "non_interactive") {
|
|
365929
|
+
return {
|
|
365930
|
+
type: "message",
|
|
365931
|
+
messageType: "info",
|
|
365932
|
+
content: formatSuccessMessage(filePathForDisplay)
|
|
365933
|
+
};
|
|
365934
|
+
}
|
|
365935
|
+
return {
|
|
365936
|
+
type: "message",
|
|
365937
|
+
messageType: "info",
|
|
365938
|
+
content: ""
|
|
365939
|
+
};
|
|
365940
|
+
} catch (error2) {
|
|
365941
|
+
failInteractive(error2);
|
|
365751
365942
|
return {
|
|
365752
365943
|
type: "message",
|
|
365753
365944
|
messageType: "error",
|
|
365754
|
-
content:
|
|
365755
|
-
error: error2 instanceof Error ? error2.message : String(error2)
|
|
365756
|
-
})
|
|
365945
|
+
content: formatErrorMessage(error2)
|
|
365757
365946
|
};
|
|
365758
365947
|
}
|
|
365759
365948
|
}, "action")
|
|
@@ -366517,67 +366706,720 @@ var BuiltinCommandLoader = class {
|
|
|
366517
366706
|
}
|
|
366518
366707
|
};
|
|
366519
366708
|
|
|
366520
|
-
// packages/cli/src/
|
|
366709
|
+
// packages/cli/src/services/FileCommandLoader.ts
|
|
366521
366710
|
init_esbuild_shims();
|
|
366522
|
-
|
|
366523
|
-
|
|
366524
|
-
|
|
366711
|
+
var import_toml = __toESM(require_toml(), 1);
|
|
366712
|
+
init_esm11();
|
|
366713
|
+
init_zod();
|
|
366714
|
+
import { promises as fs81 } from "node:fs";
|
|
366715
|
+
import path90 from "node:path";
|
|
366716
|
+
|
|
366717
|
+
// packages/cli/src/services/prompt-processors/argumentProcessor.ts
|
|
366718
|
+
init_esbuild_shims();
|
|
366719
|
+
var DefaultArgumentProcessor = class {
|
|
366720
|
+
static {
|
|
366721
|
+
__name(this, "DefaultArgumentProcessor");
|
|
366525
366722
|
}
|
|
366526
|
-
|
|
366723
|
+
async process(prompt, context2) {
|
|
366724
|
+
if (context2.invocation?.args) {
|
|
366725
|
+
return appendToLastTextPart(prompt, context2.invocation.raw);
|
|
366726
|
+
}
|
|
366727
|
+
return prompt;
|
|
366728
|
+
}
|
|
366729
|
+
};
|
|
366730
|
+
|
|
366731
|
+
// packages/cli/src/services/prompt-processors/types.ts
|
|
366732
|
+
init_esbuild_shims();
|
|
366733
|
+
var SHORTHAND_ARGS_PLACEHOLDER = "{{args}}";
|
|
366734
|
+
var SHELL_INJECTION_TRIGGER = "!{";
|
|
366735
|
+
var AT_FILE_INJECTION_TRIGGER = "@{";
|
|
366736
|
+
|
|
366737
|
+
// packages/cli/src/services/prompt-processors/shellProcessor.ts
|
|
366738
|
+
init_esbuild_shims();
|
|
366739
|
+
|
|
366740
|
+
// packages/cli/src/services/prompt-processors/injectionParser.ts
|
|
366741
|
+
init_esbuild_shims();
|
|
366742
|
+
function extractInjections(prompt, trigger, contextName) {
|
|
366743
|
+
const injections = [];
|
|
366744
|
+
let index = 0;
|
|
366745
|
+
while (index < prompt.length) {
|
|
366746
|
+
const startIndex = prompt.indexOf(trigger, index);
|
|
366747
|
+
if (startIndex === -1) {
|
|
366748
|
+
break;
|
|
366749
|
+
}
|
|
366750
|
+
let currentIndex = startIndex + trigger.length;
|
|
366751
|
+
let braceCount = 1;
|
|
366752
|
+
let foundEnd = false;
|
|
366753
|
+
while (currentIndex < prompt.length) {
|
|
366754
|
+
const char = prompt[currentIndex];
|
|
366755
|
+
if (char === "{") {
|
|
366756
|
+
braceCount++;
|
|
366757
|
+
} else if (char === "}") {
|
|
366758
|
+
braceCount--;
|
|
366759
|
+
if (braceCount === 0) {
|
|
366760
|
+
const injectionContent = prompt.substring(
|
|
366761
|
+
startIndex + trigger.length,
|
|
366762
|
+
currentIndex
|
|
366763
|
+
);
|
|
366764
|
+
const endIndex = currentIndex + 1;
|
|
366765
|
+
injections.push({
|
|
366766
|
+
content: injectionContent.trim(),
|
|
366767
|
+
startIndex,
|
|
366768
|
+
endIndex
|
|
366769
|
+
});
|
|
366770
|
+
index = endIndex;
|
|
366771
|
+
foundEnd = true;
|
|
366772
|
+
break;
|
|
366773
|
+
}
|
|
366774
|
+
}
|
|
366775
|
+
currentIndex++;
|
|
366776
|
+
}
|
|
366777
|
+
if (!foundEnd) {
|
|
366778
|
+
const contextInfo = contextName ? ` in command '${contextName}'` : "";
|
|
366779
|
+
throw new Error(
|
|
366780
|
+
`Invalid syntax${contextInfo}: Unclosed injection starting at index ${startIndex} ('${trigger}'). Ensure braces are balanced. Paths or commands with unbalanced braces are not supported directly.`
|
|
366781
|
+
);
|
|
366782
|
+
}
|
|
366783
|
+
}
|
|
366784
|
+
return injections;
|
|
366527
366785
|
}
|
|
366528
|
-
__name(
|
|
366529
|
-
|
|
366530
|
-
|
|
366531
|
-
|
|
366786
|
+
__name(extractInjections, "extractInjections");
|
|
366787
|
+
|
|
366788
|
+
// packages/cli/src/services/prompt-processors/shellProcessor.ts
|
|
366789
|
+
var ConfirmationRequiredError = class extends Error {
|
|
366790
|
+
constructor(message, commandsToConfirm) {
|
|
366791
|
+
super(message);
|
|
366792
|
+
this.commandsToConfirm = commandsToConfirm;
|
|
366793
|
+
this.name = "ConfirmationRequiredError";
|
|
366532
366794
|
}
|
|
366533
|
-
|
|
366795
|
+
static {
|
|
366796
|
+
__name(this, "ConfirmationRequiredError");
|
|
366797
|
+
}
|
|
366798
|
+
};
|
|
366799
|
+
var ShellProcessor = class {
|
|
366800
|
+
constructor(commandName) {
|
|
366801
|
+
this.commandName = commandName;
|
|
366802
|
+
}
|
|
366803
|
+
static {
|
|
366804
|
+
__name(this, "ShellProcessor");
|
|
366805
|
+
}
|
|
366806
|
+
async process(prompt, context2) {
|
|
366807
|
+
return flatMapTextParts(
|
|
366808
|
+
prompt,
|
|
366809
|
+
(text) => this.processString(text, context2)
|
|
366810
|
+
);
|
|
366811
|
+
}
|
|
366812
|
+
async processString(prompt, context2) {
|
|
366813
|
+
const userArgsRaw = context2.invocation?.args || "";
|
|
366814
|
+
if (!prompt.includes(SHELL_INJECTION_TRIGGER)) {
|
|
366815
|
+
return [
|
|
366816
|
+
{ text: prompt.replaceAll(SHORTHAND_ARGS_PLACEHOLDER, userArgsRaw) }
|
|
366817
|
+
];
|
|
366818
|
+
}
|
|
366819
|
+
const config2 = context2.services.config;
|
|
366820
|
+
if (!config2) {
|
|
366821
|
+
throw new Error(
|
|
366822
|
+
`Security configuration not loaded. Cannot verify shell command permissions for '${this.commandName}'. Aborting.`
|
|
366823
|
+
);
|
|
366824
|
+
}
|
|
366825
|
+
const { sessionShellAllowlist } = context2.session;
|
|
366826
|
+
const injections = extractInjections(
|
|
366827
|
+
prompt,
|
|
366828
|
+
SHELL_INJECTION_TRIGGER,
|
|
366829
|
+
this.commandName
|
|
366830
|
+
);
|
|
366831
|
+
if (injections.length === 0) {
|
|
366832
|
+
return [
|
|
366833
|
+
{ text: prompt.replaceAll(SHORTHAND_ARGS_PLACEHOLDER, userArgsRaw) }
|
|
366834
|
+
];
|
|
366835
|
+
}
|
|
366836
|
+
const { shell: shell2 } = getShellConfiguration();
|
|
366837
|
+
const userArgsEscaped = escapeShellArg(userArgsRaw, shell2);
|
|
366838
|
+
const resolvedInjections = injections.map(
|
|
366839
|
+
(injection) => {
|
|
366840
|
+
const command2 = injection.content;
|
|
366841
|
+
if (command2 === "") {
|
|
366842
|
+
return { ...injection, resolvedCommand: void 0 };
|
|
366843
|
+
}
|
|
366844
|
+
const resolvedCommand = command2.replaceAll(
|
|
366845
|
+
SHORTHAND_ARGS_PLACEHOLDER,
|
|
366846
|
+
userArgsEscaped
|
|
366847
|
+
);
|
|
366848
|
+
return { ...injection, resolvedCommand };
|
|
366849
|
+
}
|
|
366850
|
+
);
|
|
366851
|
+
const commandsToConfirm = /* @__PURE__ */ new Set();
|
|
366852
|
+
for (const injection of resolvedInjections) {
|
|
366853
|
+
const command2 = injection.resolvedCommand;
|
|
366854
|
+
if (!command2) continue;
|
|
366855
|
+
const { allAllowed, disallowedCommands, blockReason, isHardDenial } = checkCommandPermissions(command2, config2, sessionShellAllowlist);
|
|
366856
|
+
if (!allAllowed) {
|
|
366857
|
+
if (isHardDenial) {
|
|
366858
|
+
throw new Error(
|
|
366859
|
+
`${this.commandName} cannot be run. Blocked command: "${command2}". Reason: ${blockReason || "Blocked by configuration."}`
|
|
366860
|
+
);
|
|
366861
|
+
}
|
|
366862
|
+
if (config2.getApprovalMode() !== ApprovalMode.YOLO) {
|
|
366863
|
+
disallowedCommands.forEach((uc) => commandsToConfirm.add(uc));
|
|
366864
|
+
}
|
|
366865
|
+
}
|
|
366866
|
+
}
|
|
366867
|
+
if (commandsToConfirm.size > 0) {
|
|
366868
|
+
throw new ConfirmationRequiredError(
|
|
366869
|
+
"Shell command confirmation required",
|
|
366870
|
+
Array.from(commandsToConfirm)
|
|
366871
|
+
);
|
|
366872
|
+
}
|
|
366873
|
+
let processedPrompt = "";
|
|
366874
|
+
let lastIndex = 0;
|
|
366875
|
+
for (const injection of resolvedInjections) {
|
|
366876
|
+
const segment = prompt.substring(lastIndex, injection.startIndex);
|
|
366877
|
+
processedPrompt += segment.replaceAll(
|
|
366878
|
+
SHORTHAND_ARGS_PLACEHOLDER,
|
|
366879
|
+
userArgsRaw
|
|
366880
|
+
);
|
|
366881
|
+
if (injection.resolvedCommand) {
|
|
366882
|
+
const activeTheme = themeManager.getActiveTheme();
|
|
366883
|
+
const shellExecutionConfig = {
|
|
366884
|
+
...config2.getShellExecutionConfig(),
|
|
366885
|
+
defaultFg: activeTheme.colors.Foreground,
|
|
366886
|
+
defaultBg: activeTheme.colors.Background
|
|
366887
|
+
};
|
|
366888
|
+
const { result } = await ShellExecutionService.execute(
|
|
366889
|
+
injection.resolvedCommand,
|
|
366890
|
+
config2.getTargetDir(),
|
|
366891
|
+
() => {
|
|
366892
|
+
},
|
|
366893
|
+
new AbortController().signal,
|
|
366894
|
+
config2.getShouldUseNodePtyShell(),
|
|
366895
|
+
shellExecutionConfig
|
|
366896
|
+
);
|
|
366897
|
+
const executionResult = await result;
|
|
366898
|
+
if (executionResult.error && !executionResult.aborted) {
|
|
366899
|
+
throw new Error(
|
|
366900
|
+
`Failed to start shell command in '${this.commandName}': ${executionResult.error.message}. Command: ${injection.resolvedCommand}`
|
|
366901
|
+
);
|
|
366902
|
+
}
|
|
366903
|
+
processedPrompt += executionResult.output;
|
|
366904
|
+
if (executionResult.aborted) {
|
|
366905
|
+
processedPrompt += `
|
|
366906
|
+
[Shell command '${injection.resolvedCommand}' aborted]`;
|
|
366907
|
+
} else if (executionResult.exitCode !== 0 && executionResult.exitCode !== null) {
|
|
366908
|
+
processedPrompt += `
|
|
366909
|
+
[Shell command '${injection.resolvedCommand}' exited with code ${executionResult.exitCode}]`;
|
|
366910
|
+
} else if (executionResult.signal !== null) {
|
|
366911
|
+
processedPrompt += `
|
|
366912
|
+
[Shell command '${injection.resolvedCommand}' terminated by signal ${executionResult.signal}]`;
|
|
366913
|
+
}
|
|
366914
|
+
}
|
|
366915
|
+
lastIndex = injection.endIndex;
|
|
366916
|
+
}
|
|
366917
|
+
const finalSegment = prompt.substring(lastIndex);
|
|
366918
|
+
processedPrompt += finalSegment.replaceAll(
|
|
366919
|
+
SHORTHAND_ARGS_PLACEHOLDER,
|
|
366920
|
+
userArgsRaw
|
|
366921
|
+
);
|
|
366922
|
+
return [{ text: processedPrompt }];
|
|
366923
|
+
}
|
|
366924
|
+
};
|
|
366925
|
+
|
|
366926
|
+
// packages/cli/src/services/prompt-processors/atFileProcessor.ts
|
|
366927
|
+
init_esbuild_shims();
|
|
366928
|
+
var AtFileProcessor = class {
|
|
366929
|
+
constructor(commandName) {
|
|
366930
|
+
this.commandName = commandName;
|
|
366931
|
+
}
|
|
366932
|
+
static {
|
|
366933
|
+
__name(this, "AtFileProcessor");
|
|
366934
|
+
}
|
|
366935
|
+
async process(input, context2) {
|
|
366936
|
+
const config2 = context2.services.config;
|
|
366937
|
+
if (!config2) {
|
|
366938
|
+
return input;
|
|
366939
|
+
}
|
|
366940
|
+
return flatMapTextParts(input, async (text) => {
|
|
366941
|
+
if (!text.includes(AT_FILE_INJECTION_TRIGGER)) {
|
|
366942
|
+
return [{ text }];
|
|
366943
|
+
}
|
|
366944
|
+
const injections = extractInjections(
|
|
366945
|
+
text,
|
|
366946
|
+
AT_FILE_INJECTION_TRIGGER,
|
|
366947
|
+
this.commandName
|
|
366948
|
+
);
|
|
366949
|
+
if (injections.length === 0) {
|
|
366950
|
+
return [{ text }];
|
|
366951
|
+
}
|
|
366952
|
+
const output = [];
|
|
366953
|
+
let lastIndex = 0;
|
|
366954
|
+
for (const injection of injections) {
|
|
366955
|
+
const prefix = text.substring(lastIndex, injection.startIndex);
|
|
366956
|
+
if (prefix) {
|
|
366957
|
+
output.push({ text: prefix });
|
|
366958
|
+
}
|
|
366959
|
+
const pathStr = injection.content;
|
|
366960
|
+
try {
|
|
366961
|
+
const fileContentParts = await readPathFromWorkspace(pathStr, config2);
|
|
366962
|
+
if (fileContentParts.length === 0) {
|
|
366963
|
+
const uiMessage = `File '@{${pathStr}}' was ignored by .gitignore or .qwenignore and was not included in the prompt.`;
|
|
366964
|
+
context2.ui.addItem(
|
|
366965
|
+
{ type: "info" /* INFO */, text: uiMessage },
|
|
366966
|
+
Date.now()
|
|
366967
|
+
);
|
|
366968
|
+
}
|
|
366969
|
+
output.push(...fileContentParts);
|
|
366970
|
+
} catch (error2) {
|
|
366971
|
+
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
366972
|
+
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message}`;
|
|
366973
|
+
console.error(
|
|
366974
|
+
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
|
|
366975
|
+
);
|
|
366976
|
+
context2.ui.addItem(
|
|
366977
|
+
{ type: "error" /* ERROR */, text: uiMessage },
|
|
366978
|
+
Date.now()
|
|
366979
|
+
);
|
|
366980
|
+
const placeholder = text.substring(
|
|
366981
|
+
injection.startIndex,
|
|
366982
|
+
injection.endIndex
|
|
366983
|
+
);
|
|
366984
|
+
output.push({ text: placeholder });
|
|
366985
|
+
}
|
|
366986
|
+
lastIndex = injection.endIndex;
|
|
366987
|
+
}
|
|
366988
|
+
const suffix = text.substring(lastIndex);
|
|
366989
|
+
if (suffix) {
|
|
366990
|
+
output.push({ text: suffix });
|
|
366991
|
+
}
|
|
366992
|
+
return output;
|
|
366993
|
+
});
|
|
366994
|
+
}
|
|
366995
|
+
};
|
|
366996
|
+
|
|
366997
|
+
// packages/cli/src/services/FileCommandLoader.ts
|
|
366998
|
+
var TomlCommandDefSchema = external_exports.object({
|
|
366999
|
+
prompt: external_exports.string({
|
|
367000
|
+
required_error: "The 'prompt' field is required.",
|
|
367001
|
+
invalid_type_error: "The 'prompt' field must be a string."
|
|
367002
|
+
}),
|
|
367003
|
+
description: external_exports.string().optional()
|
|
367004
|
+
});
|
|
367005
|
+
var FileCommandLoader = class {
|
|
367006
|
+
constructor(config2) {
|
|
367007
|
+
this.config = config2;
|
|
367008
|
+
this.folderTrustEnabled = !!config2?.getFolderTrustFeature();
|
|
367009
|
+
this.folderTrust = !!config2?.getFolderTrust();
|
|
367010
|
+
this.projectRoot = config2?.getProjectRoot() || process.cwd();
|
|
367011
|
+
}
|
|
367012
|
+
static {
|
|
367013
|
+
__name(this, "FileCommandLoader");
|
|
367014
|
+
}
|
|
367015
|
+
projectRoot;
|
|
367016
|
+
folderTrustEnabled;
|
|
367017
|
+
folderTrust;
|
|
367018
|
+
/**
|
|
367019
|
+
* Loads all commands from user, project, and extension directories.
|
|
367020
|
+
* Returns commands in order: user → project → extensions (alphabetically).
|
|
367021
|
+
*
|
|
367022
|
+
* Order is important for conflict resolution in CommandService:
|
|
367023
|
+
* - User/project commands (without extensionName) use "last wins" strategy
|
|
367024
|
+
* - Extension commands (with extensionName) get renamed if conflicts exist
|
|
367025
|
+
*
|
|
367026
|
+
* @param signal An AbortSignal to cancel the loading process.
|
|
367027
|
+
* @returns A promise that resolves to an array of all loaded SlashCommands.
|
|
367028
|
+
*/
|
|
367029
|
+
async loadCommands(signal) {
|
|
367030
|
+
const allCommands = [];
|
|
367031
|
+
const globOptions = {
|
|
367032
|
+
nodir: true,
|
|
367033
|
+
dot: true,
|
|
367034
|
+
signal,
|
|
367035
|
+
follow: true
|
|
367036
|
+
};
|
|
367037
|
+
const commandDirs = this.getCommandDirectories();
|
|
367038
|
+
for (const dirInfo of commandDirs) {
|
|
367039
|
+
try {
|
|
367040
|
+
const files = await glob("**/*.toml", {
|
|
367041
|
+
...globOptions,
|
|
367042
|
+
cwd: dirInfo.path
|
|
367043
|
+
});
|
|
367044
|
+
if (this.folderTrustEnabled && !this.folderTrust) {
|
|
367045
|
+
return [];
|
|
367046
|
+
}
|
|
367047
|
+
const commandPromises = files.map(
|
|
367048
|
+
(file) => this.parseAndAdaptFile(
|
|
367049
|
+
path90.join(dirInfo.path, file),
|
|
367050
|
+
dirInfo.path,
|
|
367051
|
+
dirInfo.extensionName
|
|
367052
|
+
)
|
|
367053
|
+
);
|
|
367054
|
+
const commands = (await Promise.all(commandPromises)).filter(
|
|
367055
|
+
(cmd) => cmd !== null
|
|
367056
|
+
);
|
|
367057
|
+
allCommands.push(...commands);
|
|
367058
|
+
} catch (error2) {
|
|
367059
|
+
const isEnoent = error2.code === "ENOENT";
|
|
367060
|
+
const isAbortError2 = error2 instanceof Error && error2.name === "AbortError";
|
|
367061
|
+
if (!isEnoent && !isAbortError2) {
|
|
367062
|
+
console.error(
|
|
367063
|
+
`[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
|
|
367064
|
+
error2
|
|
367065
|
+
);
|
|
367066
|
+
}
|
|
367067
|
+
}
|
|
367068
|
+
}
|
|
367069
|
+
return allCommands;
|
|
367070
|
+
}
|
|
367071
|
+
/**
|
|
367072
|
+
* Get all command directories in order for loading.
|
|
367073
|
+
* User commands → Project commands → Extension commands
|
|
367074
|
+
* This order ensures extension commands can detect all conflicts.
|
|
367075
|
+
*/
|
|
367076
|
+
getCommandDirectories() {
|
|
367077
|
+
const dirs = [];
|
|
367078
|
+
const storage = this.config?.storage ?? new Storage(this.projectRoot);
|
|
367079
|
+
dirs.push({ path: Storage.getUserCommandsDir() });
|
|
367080
|
+
dirs.push({ path: storage.getProjectCommandsDir() });
|
|
367081
|
+
if (this.config) {
|
|
367082
|
+
const activeExtensions = this.config.getExtensions().filter((ext2) => ext2.isActive).sort((a2, b2) => a2.name.localeCompare(b2.name));
|
|
367083
|
+
const extensionCommandDirs = activeExtensions.map((ext2) => ({
|
|
367084
|
+
path: path90.join(ext2.path, "commands"),
|
|
367085
|
+
extensionName: ext2.name
|
|
367086
|
+
}));
|
|
367087
|
+
dirs.push(...extensionCommandDirs);
|
|
367088
|
+
}
|
|
367089
|
+
return dirs;
|
|
367090
|
+
}
|
|
367091
|
+
/**
|
|
367092
|
+
* Parses a single .toml file and transforms it into a SlashCommand object.
|
|
367093
|
+
* @param filePath The absolute path to the .toml file.
|
|
367094
|
+
* @param baseDir The root command directory for name calculation.
|
|
367095
|
+
* @param extensionName Optional extension name to prefix commands with.
|
|
367096
|
+
* @returns A promise resolving to a SlashCommand, or null if the file is invalid.
|
|
367097
|
+
*/
|
|
367098
|
+
async parseAndAdaptFile(filePath, baseDir, extensionName) {
|
|
367099
|
+
let fileContent;
|
|
367100
|
+
try {
|
|
367101
|
+
fileContent = await fs81.readFile(filePath, "utf-8");
|
|
367102
|
+
} catch (error2) {
|
|
367103
|
+
console.error(
|
|
367104
|
+
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
367105
|
+
error2 instanceof Error ? error2.message : String(error2)
|
|
367106
|
+
);
|
|
367107
|
+
return null;
|
|
367108
|
+
}
|
|
367109
|
+
let parsed;
|
|
367110
|
+
try {
|
|
367111
|
+
parsed = import_toml.default.parse(fileContent);
|
|
367112
|
+
} catch (error2) {
|
|
367113
|
+
console.error(
|
|
367114
|
+
`[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
|
|
367115
|
+
error2 instanceof Error ? error2.message : String(error2)
|
|
367116
|
+
);
|
|
367117
|
+
return null;
|
|
367118
|
+
}
|
|
367119
|
+
const validationResult = TomlCommandDefSchema.safeParse(parsed);
|
|
367120
|
+
if (!validationResult.success) {
|
|
367121
|
+
console.error(
|
|
367122
|
+
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
367123
|
+
validationResult.error.flatten()
|
|
367124
|
+
);
|
|
367125
|
+
return null;
|
|
367126
|
+
}
|
|
367127
|
+
const validDef = validationResult.data;
|
|
367128
|
+
const relativePathWithExt = path90.relative(baseDir, filePath);
|
|
367129
|
+
const relativePath = relativePathWithExt.substring(
|
|
367130
|
+
0,
|
|
367131
|
+
relativePathWithExt.length - 5
|
|
367132
|
+
// length of '.toml'
|
|
367133
|
+
);
|
|
367134
|
+
const baseCommandName = relativePath.split(path90.sep).map((segment) => segment.replaceAll(":", "_")).join(":");
|
|
367135
|
+
const defaultDescription = `Custom command from ${path90.basename(filePath)}`;
|
|
367136
|
+
let description = validDef.description || defaultDescription;
|
|
367137
|
+
if (extensionName) {
|
|
367138
|
+
description = `[${extensionName}] ${description}`;
|
|
367139
|
+
}
|
|
367140
|
+
const processors = [];
|
|
367141
|
+
const usesArgs = validDef.prompt.includes(SHORTHAND_ARGS_PLACEHOLDER);
|
|
367142
|
+
const usesShellInjection = validDef.prompt.includes(
|
|
367143
|
+
SHELL_INJECTION_TRIGGER
|
|
367144
|
+
);
|
|
367145
|
+
const usesAtFileInjection = validDef.prompt.includes(
|
|
367146
|
+
AT_FILE_INJECTION_TRIGGER
|
|
367147
|
+
);
|
|
367148
|
+
if (usesAtFileInjection) {
|
|
367149
|
+
processors.push(new AtFileProcessor(baseCommandName));
|
|
367150
|
+
}
|
|
367151
|
+
if (usesShellInjection || usesArgs) {
|
|
367152
|
+
processors.push(new ShellProcessor(baseCommandName));
|
|
367153
|
+
}
|
|
367154
|
+
if (!usesArgs) {
|
|
367155
|
+
processors.push(new DefaultArgumentProcessor());
|
|
367156
|
+
}
|
|
367157
|
+
return {
|
|
367158
|
+
name: baseCommandName,
|
|
367159
|
+
description,
|
|
367160
|
+
kind: "file" /* FILE */,
|
|
367161
|
+
extensionName,
|
|
367162
|
+
action: /* @__PURE__ */ __name(async (context2, _args) => {
|
|
367163
|
+
if (!context2.invocation) {
|
|
367164
|
+
console.error(
|
|
367165
|
+
`[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
|
|
367166
|
+
);
|
|
367167
|
+
return {
|
|
367168
|
+
type: "submit_prompt",
|
|
367169
|
+
content: [{ text: validDef.prompt }]
|
|
367170
|
+
// Fallback to unprocessed prompt
|
|
367171
|
+
};
|
|
367172
|
+
}
|
|
367173
|
+
try {
|
|
367174
|
+
let processedContent = [
|
|
367175
|
+
{ text: validDef.prompt }
|
|
367176
|
+
];
|
|
367177
|
+
for (const processor of processors) {
|
|
367178
|
+
processedContent = await processor.process(
|
|
367179
|
+
processedContent,
|
|
367180
|
+
context2
|
|
367181
|
+
);
|
|
367182
|
+
}
|
|
367183
|
+
return {
|
|
367184
|
+
type: "submit_prompt",
|
|
367185
|
+
content: processedContent
|
|
367186
|
+
};
|
|
367187
|
+
} catch (e4) {
|
|
367188
|
+
if (e4 instanceof ConfirmationRequiredError) {
|
|
367189
|
+
return {
|
|
367190
|
+
type: "confirm_shell_commands",
|
|
367191
|
+
commandsToConfirm: e4.commandsToConfirm,
|
|
367192
|
+
originalInvocation: {
|
|
367193
|
+
raw: context2.invocation.raw
|
|
367194
|
+
}
|
|
367195
|
+
};
|
|
367196
|
+
}
|
|
367197
|
+
throw e4;
|
|
367198
|
+
}
|
|
367199
|
+
}, "action")
|
|
367200
|
+
};
|
|
367201
|
+
}
|
|
367202
|
+
};
|
|
367203
|
+
|
|
367204
|
+
// packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
|
|
367205
|
+
init_esbuild_shims();
|
|
367206
|
+
function createNonInteractiveUI() {
|
|
367207
|
+
return {
|
|
367208
|
+
addItem: /* @__PURE__ */ __name((_item, _timestamp) => 0, "addItem"),
|
|
367209
|
+
clear: /* @__PURE__ */ __name(() => {
|
|
367210
|
+
}, "clear"),
|
|
367211
|
+
setDebugMessage: /* @__PURE__ */ __name((_message) => {
|
|
367212
|
+
}, "setDebugMessage"),
|
|
367213
|
+
loadHistory: /* @__PURE__ */ __name((_newHistory) => {
|
|
367214
|
+
}, "loadHistory"),
|
|
367215
|
+
pendingItem: null,
|
|
367216
|
+
setPendingItem: /* @__PURE__ */ __name((_item) => {
|
|
367217
|
+
}, "setPendingItem"),
|
|
367218
|
+
toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
|
|
367219
|
+
setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
|
|
367220
|
+
}, "setGeminiMdFileCount"),
|
|
367221
|
+
reloadCommands: /* @__PURE__ */ __name(() => {
|
|
367222
|
+
}, "reloadCommands"),
|
|
367223
|
+
extensionsUpdateState: /* @__PURE__ */ new Map(),
|
|
367224
|
+
dispatchExtensionStateUpdate: /* @__PURE__ */ __name((_action) => {
|
|
367225
|
+
}, "dispatchExtensionStateUpdate"),
|
|
367226
|
+
addConfirmUpdateExtensionRequest: /* @__PURE__ */ __name((_request) => {
|
|
367227
|
+
}, "addConfirmUpdateExtensionRequest")
|
|
367228
|
+
};
|
|
366534
367229
|
}
|
|
366535
|
-
__name(
|
|
366536
|
-
|
|
366537
|
-
|
|
366538
|
-
|
|
367230
|
+
__name(createNonInteractiveUI, "createNonInteractiveUI");
|
|
367231
|
+
|
|
367232
|
+
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
367233
|
+
var ALLOWED_BUILTIN_COMMANDS_NON_INTERACTIVE = [
|
|
367234
|
+
"init",
|
|
367235
|
+
"summary",
|
|
367236
|
+
"compress"
|
|
367237
|
+
];
|
|
367238
|
+
function handleCommandResult(result) {
|
|
367239
|
+
switch (result.type) {
|
|
367240
|
+
case "submit_prompt":
|
|
367241
|
+
return {
|
|
367242
|
+
type: "submit_prompt",
|
|
367243
|
+
content: result.content
|
|
367244
|
+
};
|
|
367245
|
+
case "message":
|
|
367246
|
+
return {
|
|
367247
|
+
type: "message",
|
|
367248
|
+
messageType: result.messageType,
|
|
367249
|
+
content: result.content
|
|
367250
|
+
};
|
|
367251
|
+
case "stream_messages":
|
|
367252
|
+
return {
|
|
367253
|
+
type: "stream_messages",
|
|
367254
|
+
messages: result.messages
|
|
367255
|
+
};
|
|
367256
|
+
/**
|
|
367257
|
+
* Currently return types below are never generated due to the
|
|
367258
|
+
* whitelist of allowed slash commands in ACP and non-interactive mode.
|
|
367259
|
+
* We'll try to add more supported return types in the future.
|
|
367260
|
+
*/
|
|
367261
|
+
case "tool":
|
|
367262
|
+
return {
|
|
367263
|
+
type: "unsupported",
|
|
367264
|
+
reason: "Tool execution from slash commands is not supported in non-interactive mode.",
|
|
367265
|
+
originalType: "tool"
|
|
367266
|
+
};
|
|
367267
|
+
case "quit":
|
|
367268
|
+
return {
|
|
367269
|
+
type: "unsupported",
|
|
367270
|
+
reason: "Quit command is not supported in non-interactive mode. The process will exit naturally after completion.",
|
|
367271
|
+
originalType: "quit"
|
|
367272
|
+
};
|
|
367273
|
+
case "dialog":
|
|
367274
|
+
return {
|
|
367275
|
+
type: "unsupported",
|
|
367276
|
+
reason: `Dialog '${result.dialog}' cannot be opened in non-interactive mode.`,
|
|
367277
|
+
originalType: "dialog"
|
|
367278
|
+
};
|
|
367279
|
+
case "load_history":
|
|
367280
|
+
return {
|
|
367281
|
+
type: "unsupported",
|
|
367282
|
+
reason: "Loading history is not supported in non-interactive mode. Each invocation starts with a fresh context.",
|
|
367283
|
+
originalType: "load_history"
|
|
367284
|
+
};
|
|
367285
|
+
case "confirm_shell_commands":
|
|
367286
|
+
return {
|
|
367287
|
+
type: "unsupported",
|
|
367288
|
+
reason: "Shell command confirmation is not supported in non-interactive mode. Use YOLO mode or pre-approve commands.",
|
|
367289
|
+
originalType: "confirm_shell_commands"
|
|
367290
|
+
};
|
|
367291
|
+
case "confirm_action":
|
|
367292
|
+
return {
|
|
367293
|
+
type: "unsupported",
|
|
367294
|
+
reason: "Action confirmation is not supported in non-interactive mode. Commands requiring confirmation cannot be executed.",
|
|
367295
|
+
originalType: "confirm_action"
|
|
367296
|
+
};
|
|
367297
|
+
default: {
|
|
367298
|
+
const _exhaustive = result;
|
|
367299
|
+
return {
|
|
367300
|
+
type: "unsupported",
|
|
367301
|
+
reason: `Unknown command result type: ${_exhaustive.type}`,
|
|
367302
|
+
originalType: "unknown"
|
|
367303
|
+
};
|
|
367304
|
+
}
|
|
366539
367305
|
}
|
|
366540
|
-
return metrics2.tokens.cached / metrics2.tokens.prompt * 100;
|
|
366541
367306
|
}
|
|
366542
|
-
__name(
|
|
366543
|
-
|
|
366544
|
-
|
|
366545
|
-
|
|
366546
|
-
|
|
366547
|
-
|
|
367307
|
+
__name(handleCommandResult, "handleCommandResult");
|
|
367308
|
+
function filterCommandsForNonInteractive(commands, allowedBuiltinCommandNames) {
|
|
367309
|
+
return commands.filter((cmd) => {
|
|
367310
|
+
if (cmd.kind === "file" /* FILE */) {
|
|
367311
|
+
return true;
|
|
367312
|
+
}
|
|
367313
|
+
if (cmd.kind === "built-in" /* BUILT_IN */) {
|
|
367314
|
+
return allowedBuiltinCommandNames.has(cmd.name);
|
|
367315
|
+
}
|
|
367316
|
+
return false;
|
|
367317
|
+
});
|
|
367318
|
+
}
|
|
367319
|
+
__name(filterCommandsForNonInteractive, "filterCommandsForNonInteractive");
|
|
367320
|
+
var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config2, settings, allowedBuiltinCommandNames = [
|
|
367321
|
+
...ALLOWED_BUILTIN_COMMANDS_NON_INTERACTIVE
|
|
367322
|
+
]) => {
|
|
367323
|
+
const trimmed2 = rawQuery.trim();
|
|
367324
|
+
if (!trimmed2.startsWith("/")) {
|
|
367325
|
+
return { type: "no_command" };
|
|
367326
|
+
}
|
|
367327
|
+
const isAcpMode = config2.getExperimentalZedIntegration();
|
|
367328
|
+
const isInteractive = config2.isInteractive();
|
|
367329
|
+
const executionMode = isAcpMode ? "acp" : isInteractive ? "interactive" : "non_interactive";
|
|
367330
|
+
const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
|
|
367331
|
+
const allLoaders = [
|
|
367332
|
+
new BuiltinCommandLoader(config2),
|
|
367333
|
+
new FileCommandLoader(config2)
|
|
367334
|
+
];
|
|
367335
|
+
const commandService = await CommandService.create(
|
|
367336
|
+
allLoaders,
|
|
367337
|
+
abortController.signal
|
|
366548
367338
|
);
|
|
366549
|
-
const
|
|
366550
|
-
const
|
|
366551
|
-
|
|
366552
|
-
|
|
366553
|
-
const totalCachedTokens = Object.values(models).reduce(
|
|
366554
|
-
(acc, model) => acc + model.tokens.cached,
|
|
366555
|
-
0
|
|
367339
|
+
const allCommands = commandService.getCommands();
|
|
367340
|
+
const filteredCommands = filterCommandsForNonInteractive(
|
|
367341
|
+
allCommands,
|
|
367342
|
+
allowedBuiltinSet
|
|
366556
367343
|
);
|
|
366557
|
-
const
|
|
366558
|
-
|
|
366559
|
-
|
|
367344
|
+
const { commandToExecute, args } = parseSlashCommand(
|
|
367345
|
+
rawQuery,
|
|
367346
|
+
filteredCommands
|
|
366560
367347
|
);
|
|
366561
|
-
|
|
366562
|
-
|
|
366563
|
-
|
|
366564
|
-
|
|
366565
|
-
|
|
366566
|
-
|
|
366567
|
-
|
|
366568
|
-
|
|
366569
|
-
|
|
366570
|
-
|
|
366571
|
-
|
|
366572
|
-
|
|
366573
|
-
|
|
366574
|
-
|
|
366575
|
-
|
|
366576
|
-
|
|
366577
|
-
|
|
366578
|
-
|
|
367348
|
+
if (!commandToExecute) {
|
|
367349
|
+
const { commandToExecute: knownCommand } = parseSlashCommand(
|
|
367350
|
+
rawQuery,
|
|
367351
|
+
allCommands
|
|
367352
|
+
);
|
|
367353
|
+
if (knownCommand) {
|
|
367354
|
+
return {
|
|
367355
|
+
type: "unsupported",
|
|
367356
|
+
reason: t4(
|
|
367357
|
+
'The command "/{{command}}" is not supported in non-interactive mode.',
|
|
367358
|
+
{ command: knownCommand.name }
|
|
367359
|
+
),
|
|
367360
|
+
originalType: "filtered_command"
|
|
367361
|
+
};
|
|
367362
|
+
}
|
|
367363
|
+
return { type: "no_command" };
|
|
367364
|
+
}
|
|
367365
|
+
if (!commandToExecute.action) {
|
|
367366
|
+
return { type: "no_command" };
|
|
367367
|
+
}
|
|
367368
|
+
const sessionStats = {
|
|
367369
|
+
sessionId: config2?.getSessionId(),
|
|
367370
|
+
sessionStartTime: /* @__PURE__ */ new Date(),
|
|
367371
|
+
metrics: uiTelemetryService.getMetrics(),
|
|
367372
|
+
lastPromptTokenCount: 0,
|
|
367373
|
+
promptCount: 1
|
|
366579
367374
|
};
|
|
366580
|
-
|
|
367375
|
+
const logger6 = new Logger(config2?.getSessionId() || "", config2?.storage);
|
|
367376
|
+
const context2 = {
|
|
367377
|
+
executionMode,
|
|
367378
|
+
services: {
|
|
367379
|
+
config: config2,
|
|
367380
|
+
settings,
|
|
367381
|
+
git: void 0,
|
|
367382
|
+
logger: logger6
|
|
367383
|
+
},
|
|
367384
|
+
ui: createNonInteractiveUI(),
|
|
367385
|
+
session: {
|
|
367386
|
+
stats: sessionStats,
|
|
367387
|
+
sessionShellAllowlist: /* @__PURE__ */ new Set()
|
|
367388
|
+
},
|
|
367389
|
+
invocation: {
|
|
367390
|
+
raw: trimmed2,
|
|
367391
|
+
name: commandToExecute.name,
|
|
367392
|
+
args
|
|
367393
|
+
}
|
|
367394
|
+
};
|
|
367395
|
+
const result = await commandToExecute.action(context2, args);
|
|
367396
|
+
if (!result) {
|
|
367397
|
+
return {
|
|
367398
|
+
type: "message",
|
|
367399
|
+
messageType: "info",
|
|
367400
|
+
content: "Command executed successfully."
|
|
367401
|
+
};
|
|
367402
|
+
}
|
|
367403
|
+
return handleCommandResult(result);
|
|
367404
|
+
}, "handleSlashCommand");
|
|
367405
|
+
var getAvailableCommands = /* @__PURE__ */ __name(async (config2, abortSignal, allowedBuiltinCommandNames = [
|
|
367406
|
+
...ALLOWED_BUILTIN_COMMANDS_NON_INTERACTIVE
|
|
367407
|
+
]) => {
|
|
367408
|
+
try {
|
|
367409
|
+
const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
|
|
367410
|
+
const loaders = allowedBuiltinSet.size > 0 ? [new BuiltinCommandLoader(config2), new FileCommandLoader(config2)] : [new FileCommandLoader(config2)];
|
|
367411
|
+
const commandService = await CommandService.create(loaders, abortSignal);
|
|
367412
|
+
const commands = commandService.getCommands();
|
|
367413
|
+
const filteredCommands = filterCommandsForNonInteractive(
|
|
367414
|
+
commands,
|
|
367415
|
+
allowedBuiltinSet
|
|
367416
|
+
);
|
|
367417
|
+
return filteredCommands.filter((cmd) => !cmd.hidden);
|
|
367418
|
+
} catch (error2) {
|
|
367419
|
+
console.error("Error loading available commands:", error2);
|
|
367420
|
+
return [];
|
|
367421
|
+
}
|
|
367422
|
+
}, "getAvailableCommands");
|
|
366581
367423
|
|
|
366582
367424
|
// packages/cli/src/utils/nonInteractiveHelpers.ts
|
|
366583
367425
|
function normalizePartList(parts) {
|
|
@@ -366642,19 +367484,15 @@ function computeUsageFromMetrics(metrics2) {
|
|
|
366642
367484
|
return usage2;
|
|
366643
367485
|
}
|
|
366644
367486
|
__name(computeUsageFromMetrics, "computeUsageFromMetrics");
|
|
366645
|
-
async function loadSlashCommandNames(config2) {
|
|
367487
|
+
async function loadSlashCommandNames(config2, allowedBuiltinCommandNames) {
|
|
366646
367488
|
const controller = new AbortController();
|
|
366647
367489
|
try {
|
|
366648
|
-
const
|
|
366649
|
-
|
|
366650
|
-
controller.signal
|
|
367490
|
+
const commands = await getAvailableCommands(
|
|
367491
|
+
config2,
|
|
367492
|
+
controller.signal,
|
|
367493
|
+
allowedBuiltinCommandNames
|
|
366651
367494
|
);
|
|
366652
|
-
|
|
366653
|
-
const commands = service.getCommands();
|
|
366654
|
-
for (const command2 of commands) {
|
|
366655
|
-
names.add(command2.name);
|
|
366656
|
-
}
|
|
366657
|
-
return Array.from(names).sort();
|
|
367495
|
+
return commands.map((cmd) => cmd.name).sort();
|
|
366658
367496
|
} catch (error2) {
|
|
366659
367497
|
if (config2.getDebugMode()) {
|
|
366660
367498
|
console.error(
|
|
@@ -366668,7 +367506,7 @@ async function loadSlashCommandNames(config2) {
|
|
|
366668
367506
|
}
|
|
366669
367507
|
}
|
|
366670
367508
|
__name(loadSlashCommandNames, "loadSlashCommandNames");
|
|
366671
|
-
async function buildSystemMessage(config2, sessionId, permissionMode) {
|
|
367509
|
+
async function buildSystemMessage(config2, sessionId, permissionMode, allowedBuiltinCommandNames) {
|
|
366672
367510
|
const toolRegistry = config2.getToolRegistry();
|
|
366673
367511
|
const tools = toolRegistry ? toolRegistry.getAllToolNames() : [];
|
|
366674
367512
|
const mcpServers = config2.getMcpServers();
|
|
@@ -366676,7 +367514,10 @@ async function buildSystemMessage(config2, sessionId, permissionMode) {
|
|
|
366676
367514
|
name: name3,
|
|
366677
367515
|
status: getMCPServerStatus(name3)
|
|
366678
367516
|
})) : [];
|
|
366679
|
-
const slashCommands = await loadSlashCommandNames(
|
|
367517
|
+
const slashCommands = await loadSlashCommandNames(
|
|
367518
|
+
config2,
|
|
367519
|
+
allowedBuiltinCommandNames
|
|
367520
|
+
);
|
|
366680
367521
|
let agentNames = [];
|
|
366681
367522
|
try {
|
|
366682
367523
|
const subagentManager = config2.getSubagentManager();
|
|
@@ -367929,663 +368770,6 @@ var StreamJsonOutputAdapter = class extends BaseJsonOutputAdapter {
|
|
|
367929
368770
|
}
|
|
367930
368771
|
};
|
|
367931
368772
|
|
|
367932
|
-
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
367933
|
-
init_esbuild_shims();
|
|
367934
|
-
|
|
367935
|
-
// packages/cli/src/utils/commands.ts
|
|
367936
|
-
init_esbuild_shims();
|
|
367937
|
-
var parseSlashCommand = /* @__PURE__ */ __name((query, commands) => {
|
|
367938
|
-
const trimmed2 = query.trim();
|
|
367939
|
-
const parts = trimmed2.substring(1).trim().split(/\s+/);
|
|
367940
|
-
const commandPath = parts.filter((p2) => p2);
|
|
367941
|
-
let currentCommands = commands;
|
|
367942
|
-
let commandToExecute;
|
|
367943
|
-
let pathIndex = 0;
|
|
367944
|
-
const canonicalPath = [];
|
|
367945
|
-
for (const part of commandPath) {
|
|
367946
|
-
let foundCommand = currentCommands.find((cmd) => cmd.name === part);
|
|
367947
|
-
if (!foundCommand) {
|
|
367948
|
-
foundCommand = currentCommands.find(
|
|
367949
|
-
(cmd) => cmd.altNames?.includes(part)
|
|
367950
|
-
);
|
|
367951
|
-
}
|
|
367952
|
-
if (foundCommand) {
|
|
367953
|
-
commandToExecute = foundCommand;
|
|
367954
|
-
canonicalPath.push(foundCommand.name);
|
|
367955
|
-
pathIndex++;
|
|
367956
|
-
if (foundCommand.subCommands) {
|
|
367957
|
-
currentCommands = foundCommand.subCommands;
|
|
367958
|
-
} else {
|
|
367959
|
-
break;
|
|
367960
|
-
}
|
|
367961
|
-
} else {
|
|
367962
|
-
break;
|
|
367963
|
-
}
|
|
367964
|
-
}
|
|
367965
|
-
const args = parts.slice(pathIndex).join(" ");
|
|
367966
|
-
return { commandToExecute, args, canonicalPath };
|
|
367967
|
-
}, "parseSlashCommand");
|
|
367968
|
-
|
|
367969
|
-
// packages/cli/src/services/FileCommandLoader.ts
|
|
367970
|
-
init_esbuild_shims();
|
|
367971
|
-
var import_toml = __toESM(require_toml(), 1);
|
|
367972
|
-
init_esm11();
|
|
367973
|
-
init_zod();
|
|
367974
|
-
import { promises as fs81 } from "node:fs";
|
|
367975
|
-
import path90 from "node:path";
|
|
367976
|
-
|
|
367977
|
-
// packages/cli/src/services/prompt-processors/argumentProcessor.ts
|
|
367978
|
-
init_esbuild_shims();
|
|
367979
|
-
var DefaultArgumentProcessor = class {
|
|
367980
|
-
static {
|
|
367981
|
-
__name(this, "DefaultArgumentProcessor");
|
|
367982
|
-
}
|
|
367983
|
-
async process(prompt, context2) {
|
|
367984
|
-
if (context2.invocation?.args) {
|
|
367985
|
-
return appendToLastTextPart(prompt, context2.invocation.raw);
|
|
367986
|
-
}
|
|
367987
|
-
return prompt;
|
|
367988
|
-
}
|
|
367989
|
-
};
|
|
367990
|
-
|
|
367991
|
-
// packages/cli/src/services/prompt-processors/types.ts
|
|
367992
|
-
init_esbuild_shims();
|
|
367993
|
-
var SHORTHAND_ARGS_PLACEHOLDER = "{{args}}";
|
|
367994
|
-
var SHELL_INJECTION_TRIGGER = "!{";
|
|
367995
|
-
var AT_FILE_INJECTION_TRIGGER = "@{";
|
|
367996
|
-
|
|
367997
|
-
// packages/cli/src/services/prompt-processors/shellProcessor.ts
|
|
367998
|
-
init_esbuild_shims();
|
|
367999
|
-
|
|
368000
|
-
// packages/cli/src/services/prompt-processors/injectionParser.ts
|
|
368001
|
-
init_esbuild_shims();
|
|
368002
|
-
function extractInjections(prompt, trigger, contextName) {
|
|
368003
|
-
const injections = [];
|
|
368004
|
-
let index = 0;
|
|
368005
|
-
while (index < prompt.length) {
|
|
368006
|
-
const startIndex = prompt.indexOf(trigger, index);
|
|
368007
|
-
if (startIndex === -1) {
|
|
368008
|
-
break;
|
|
368009
|
-
}
|
|
368010
|
-
let currentIndex = startIndex + trigger.length;
|
|
368011
|
-
let braceCount = 1;
|
|
368012
|
-
let foundEnd = false;
|
|
368013
|
-
while (currentIndex < prompt.length) {
|
|
368014
|
-
const char = prompt[currentIndex];
|
|
368015
|
-
if (char === "{") {
|
|
368016
|
-
braceCount++;
|
|
368017
|
-
} else if (char === "}") {
|
|
368018
|
-
braceCount--;
|
|
368019
|
-
if (braceCount === 0) {
|
|
368020
|
-
const injectionContent = prompt.substring(
|
|
368021
|
-
startIndex + trigger.length,
|
|
368022
|
-
currentIndex
|
|
368023
|
-
);
|
|
368024
|
-
const endIndex = currentIndex + 1;
|
|
368025
|
-
injections.push({
|
|
368026
|
-
content: injectionContent.trim(),
|
|
368027
|
-
startIndex,
|
|
368028
|
-
endIndex
|
|
368029
|
-
});
|
|
368030
|
-
index = endIndex;
|
|
368031
|
-
foundEnd = true;
|
|
368032
|
-
break;
|
|
368033
|
-
}
|
|
368034
|
-
}
|
|
368035
|
-
currentIndex++;
|
|
368036
|
-
}
|
|
368037
|
-
if (!foundEnd) {
|
|
368038
|
-
const contextInfo = contextName ? ` in command '${contextName}'` : "";
|
|
368039
|
-
throw new Error(
|
|
368040
|
-
`Invalid syntax${contextInfo}: Unclosed injection starting at index ${startIndex} ('${trigger}'). Ensure braces are balanced. Paths or commands with unbalanced braces are not supported directly.`
|
|
368041
|
-
);
|
|
368042
|
-
}
|
|
368043
|
-
}
|
|
368044
|
-
return injections;
|
|
368045
|
-
}
|
|
368046
|
-
__name(extractInjections, "extractInjections");
|
|
368047
|
-
|
|
368048
|
-
// packages/cli/src/services/prompt-processors/shellProcessor.ts
|
|
368049
|
-
var ConfirmationRequiredError = class extends Error {
|
|
368050
|
-
constructor(message, commandsToConfirm) {
|
|
368051
|
-
super(message);
|
|
368052
|
-
this.commandsToConfirm = commandsToConfirm;
|
|
368053
|
-
this.name = "ConfirmationRequiredError";
|
|
368054
|
-
}
|
|
368055
|
-
static {
|
|
368056
|
-
__name(this, "ConfirmationRequiredError");
|
|
368057
|
-
}
|
|
368058
|
-
};
|
|
368059
|
-
var ShellProcessor = class {
|
|
368060
|
-
constructor(commandName) {
|
|
368061
|
-
this.commandName = commandName;
|
|
368062
|
-
}
|
|
368063
|
-
static {
|
|
368064
|
-
__name(this, "ShellProcessor");
|
|
368065
|
-
}
|
|
368066
|
-
async process(prompt, context2) {
|
|
368067
|
-
return flatMapTextParts(
|
|
368068
|
-
prompt,
|
|
368069
|
-
(text) => this.processString(text, context2)
|
|
368070
|
-
);
|
|
368071
|
-
}
|
|
368072
|
-
async processString(prompt, context2) {
|
|
368073
|
-
const userArgsRaw = context2.invocation?.args || "";
|
|
368074
|
-
if (!prompt.includes(SHELL_INJECTION_TRIGGER)) {
|
|
368075
|
-
return [
|
|
368076
|
-
{ text: prompt.replaceAll(SHORTHAND_ARGS_PLACEHOLDER, userArgsRaw) }
|
|
368077
|
-
];
|
|
368078
|
-
}
|
|
368079
|
-
const config2 = context2.services.config;
|
|
368080
|
-
if (!config2) {
|
|
368081
|
-
throw new Error(
|
|
368082
|
-
`Security configuration not loaded. Cannot verify shell command permissions for '${this.commandName}'. Aborting.`
|
|
368083
|
-
);
|
|
368084
|
-
}
|
|
368085
|
-
const { sessionShellAllowlist } = context2.session;
|
|
368086
|
-
const injections = extractInjections(
|
|
368087
|
-
prompt,
|
|
368088
|
-
SHELL_INJECTION_TRIGGER,
|
|
368089
|
-
this.commandName
|
|
368090
|
-
);
|
|
368091
|
-
if (injections.length === 0) {
|
|
368092
|
-
return [
|
|
368093
|
-
{ text: prompt.replaceAll(SHORTHAND_ARGS_PLACEHOLDER, userArgsRaw) }
|
|
368094
|
-
];
|
|
368095
|
-
}
|
|
368096
|
-
const { shell: shell2 } = getShellConfiguration();
|
|
368097
|
-
const userArgsEscaped = escapeShellArg(userArgsRaw, shell2);
|
|
368098
|
-
const resolvedInjections = injections.map(
|
|
368099
|
-
(injection) => {
|
|
368100
|
-
const command2 = injection.content;
|
|
368101
|
-
if (command2 === "") {
|
|
368102
|
-
return { ...injection, resolvedCommand: void 0 };
|
|
368103
|
-
}
|
|
368104
|
-
const resolvedCommand = command2.replaceAll(
|
|
368105
|
-
SHORTHAND_ARGS_PLACEHOLDER,
|
|
368106
|
-
userArgsEscaped
|
|
368107
|
-
);
|
|
368108
|
-
return { ...injection, resolvedCommand };
|
|
368109
|
-
}
|
|
368110
|
-
);
|
|
368111
|
-
const commandsToConfirm = /* @__PURE__ */ new Set();
|
|
368112
|
-
for (const injection of resolvedInjections) {
|
|
368113
|
-
const command2 = injection.resolvedCommand;
|
|
368114
|
-
if (!command2) continue;
|
|
368115
|
-
const { allAllowed, disallowedCommands, blockReason, isHardDenial } = checkCommandPermissions(command2, config2, sessionShellAllowlist);
|
|
368116
|
-
if (!allAllowed) {
|
|
368117
|
-
if (isHardDenial) {
|
|
368118
|
-
throw new Error(
|
|
368119
|
-
`${this.commandName} cannot be run. Blocked command: "${command2}". Reason: ${blockReason || "Blocked by configuration."}`
|
|
368120
|
-
);
|
|
368121
|
-
}
|
|
368122
|
-
if (config2.getApprovalMode() !== ApprovalMode.YOLO) {
|
|
368123
|
-
disallowedCommands.forEach((uc) => commandsToConfirm.add(uc));
|
|
368124
|
-
}
|
|
368125
|
-
}
|
|
368126
|
-
}
|
|
368127
|
-
if (commandsToConfirm.size > 0) {
|
|
368128
|
-
throw new ConfirmationRequiredError(
|
|
368129
|
-
"Shell command confirmation required",
|
|
368130
|
-
Array.from(commandsToConfirm)
|
|
368131
|
-
);
|
|
368132
|
-
}
|
|
368133
|
-
let processedPrompt = "";
|
|
368134
|
-
let lastIndex = 0;
|
|
368135
|
-
for (const injection of resolvedInjections) {
|
|
368136
|
-
const segment = prompt.substring(lastIndex, injection.startIndex);
|
|
368137
|
-
processedPrompt += segment.replaceAll(
|
|
368138
|
-
SHORTHAND_ARGS_PLACEHOLDER,
|
|
368139
|
-
userArgsRaw
|
|
368140
|
-
);
|
|
368141
|
-
if (injection.resolvedCommand) {
|
|
368142
|
-
const activeTheme = themeManager.getActiveTheme();
|
|
368143
|
-
const shellExecutionConfig = {
|
|
368144
|
-
...config2.getShellExecutionConfig(),
|
|
368145
|
-
defaultFg: activeTheme.colors.Foreground,
|
|
368146
|
-
defaultBg: activeTheme.colors.Background
|
|
368147
|
-
};
|
|
368148
|
-
const { result } = await ShellExecutionService.execute(
|
|
368149
|
-
injection.resolvedCommand,
|
|
368150
|
-
config2.getTargetDir(),
|
|
368151
|
-
() => {
|
|
368152
|
-
},
|
|
368153
|
-
new AbortController().signal,
|
|
368154
|
-
config2.getShouldUseNodePtyShell(),
|
|
368155
|
-
shellExecutionConfig
|
|
368156
|
-
);
|
|
368157
|
-
const executionResult = await result;
|
|
368158
|
-
if (executionResult.error && !executionResult.aborted) {
|
|
368159
|
-
throw new Error(
|
|
368160
|
-
`Failed to start shell command in '${this.commandName}': ${executionResult.error.message}. Command: ${injection.resolvedCommand}`
|
|
368161
|
-
);
|
|
368162
|
-
}
|
|
368163
|
-
processedPrompt += executionResult.output;
|
|
368164
|
-
if (executionResult.aborted) {
|
|
368165
|
-
processedPrompt += `
|
|
368166
|
-
[Shell command '${injection.resolvedCommand}' aborted]`;
|
|
368167
|
-
} else if (executionResult.exitCode !== 0 && executionResult.exitCode !== null) {
|
|
368168
|
-
processedPrompt += `
|
|
368169
|
-
[Shell command '${injection.resolvedCommand}' exited with code ${executionResult.exitCode}]`;
|
|
368170
|
-
} else if (executionResult.signal !== null) {
|
|
368171
|
-
processedPrompt += `
|
|
368172
|
-
[Shell command '${injection.resolvedCommand}' terminated by signal ${executionResult.signal}]`;
|
|
368173
|
-
}
|
|
368174
|
-
}
|
|
368175
|
-
lastIndex = injection.endIndex;
|
|
368176
|
-
}
|
|
368177
|
-
const finalSegment = prompt.substring(lastIndex);
|
|
368178
|
-
processedPrompt += finalSegment.replaceAll(
|
|
368179
|
-
SHORTHAND_ARGS_PLACEHOLDER,
|
|
368180
|
-
userArgsRaw
|
|
368181
|
-
);
|
|
368182
|
-
return [{ text: processedPrompt }];
|
|
368183
|
-
}
|
|
368184
|
-
};
|
|
368185
|
-
|
|
368186
|
-
// packages/cli/src/services/prompt-processors/atFileProcessor.ts
|
|
368187
|
-
init_esbuild_shims();
|
|
368188
|
-
var AtFileProcessor = class {
|
|
368189
|
-
constructor(commandName) {
|
|
368190
|
-
this.commandName = commandName;
|
|
368191
|
-
}
|
|
368192
|
-
static {
|
|
368193
|
-
__name(this, "AtFileProcessor");
|
|
368194
|
-
}
|
|
368195
|
-
async process(input, context2) {
|
|
368196
|
-
const config2 = context2.services.config;
|
|
368197
|
-
if (!config2) {
|
|
368198
|
-
return input;
|
|
368199
|
-
}
|
|
368200
|
-
return flatMapTextParts(input, async (text) => {
|
|
368201
|
-
if (!text.includes(AT_FILE_INJECTION_TRIGGER)) {
|
|
368202
|
-
return [{ text }];
|
|
368203
|
-
}
|
|
368204
|
-
const injections = extractInjections(
|
|
368205
|
-
text,
|
|
368206
|
-
AT_FILE_INJECTION_TRIGGER,
|
|
368207
|
-
this.commandName
|
|
368208
|
-
);
|
|
368209
|
-
if (injections.length === 0) {
|
|
368210
|
-
return [{ text }];
|
|
368211
|
-
}
|
|
368212
|
-
const output = [];
|
|
368213
|
-
let lastIndex = 0;
|
|
368214
|
-
for (const injection of injections) {
|
|
368215
|
-
const prefix = text.substring(lastIndex, injection.startIndex);
|
|
368216
|
-
if (prefix) {
|
|
368217
|
-
output.push({ text: prefix });
|
|
368218
|
-
}
|
|
368219
|
-
const pathStr = injection.content;
|
|
368220
|
-
try {
|
|
368221
|
-
const fileContentParts = await readPathFromWorkspace(pathStr, config2);
|
|
368222
|
-
if (fileContentParts.length === 0) {
|
|
368223
|
-
const uiMessage = `File '@{${pathStr}}' was ignored by .gitignore or .qwenignore and was not included in the prompt.`;
|
|
368224
|
-
context2.ui.addItem(
|
|
368225
|
-
{ type: "info" /* INFO */, text: uiMessage },
|
|
368226
|
-
Date.now()
|
|
368227
|
-
);
|
|
368228
|
-
}
|
|
368229
|
-
output.push(...fileContentParts);
|
|
368230
|
-
} catch (error2) {
|
|
368231
|
-
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
368232
|
-
const uiMessage = `Failed to inject content for '@{${pathStr}}': ${message}`;
|
|
368233
|
-
console.error(
|
|
368234
|
-
`[AtFileProcessor] ${uiMessage}. Leaving placeholder in prompt.`
|
|
368235
|
-
);
|
|
368236
|
-
context2.ui.addItem(
|
|
368237
|
-
{ type: "error" /* ERROR */, text: uiMessage },
|
|
368238
|
-
Date.now()
|
|
368239
|
-
);
|
|
368240
|
-
const placeholder = text.substring(
|
|
368241
|
-
injection.startIndex,
|
|
368242
|
-
injection.endIndex
|
|
368243
|
-
);
|
|
368244
|
-
output.push({ text: placeholder });
|
|
368245
|
-
}
|
|
368246
|
-
lastIndex = injection.endIndex;
|
|
368247
|
-
}
|
|
368248
|
-
const suffix = text.substring(lastIndex);
|
|
368249
|
-
if (suffix) {
|
|
368250
|
-
output.push({ text: suffix });
|
|
368251
|
-
}
|
|
368252
|
-
return output;
|
|
368253
|
-
});
|
|
368254
|
-
}
|
|
368255
|
-
};
|
|
368256
|
-
|
|
368257
|
-
// packages/cli/src/services/FileCommandLoader.ts
|
|
368258
|
-
var TomlCommandDefSchema = external_exports.object({
|
|
368259
|
-
prompt: external_exports.string({
|
|
368260
|
-
required_error: "The 'prompt' field is required.",
|
|
368261
|
-
invalid_type_error: "The 'prompt' field must be a string."
|
|
368262
|
-
}),
|
|
368263
|
-
description: external_exports.string().optional()
|
|
368264
|
-
});
|
|
368265
|
-
var FileCommandLoader = class {
|
|
368266
|
-
constructor(config2) {
|
|
368267
|
-
this.config = config2;
|
|
368268
|
-
this.folderTrustEnabled = !!config2?.getFolderTrustFeature();
|
|
368269
|
-
this.folderTrust = !!config2?.getFolderTrust();
|
|
368270
|
-
this.projectRoot = config2?.getProjectRoot() || process.cwd();
|
|
368271
|
-
}
|
|
368272
|
-
static {
|
|
368273
|
-
__name(this, "FileCommandLoader");
|
|
368274
|
-
}
|
|
368275
|
-
projectRoot;
|
|
368276
|
-
folderTrustEnabled;
|
|
368277
|
-
folderTrust;
|
|
368278
|
-
/**
|
|
368279
|
-
* Loads all commands from user, project, and extension directories.
|
|
368280
|
-
* Returns commands in order: user → project → extensions (alphabetically).
|
|
368281
|
-
*
|
|
368282
|
-
* Order is important for conflict resolution in CommandService:
|
|
368283
|
-
* - User/project commands (without extensionName) use "last wins" strategy
|
|
368284
|
-
* - Extension commands (with extensionName) get renamed if conflicts exist
|
|
368285
|
-
*
|
|
368286
|
-
* @param signal An AbortSignal to cancel the loading process.
|
|
368287
|
-
* @returns A promise that resolves to an array of all loaded SlashCommands.
|
|
368288
|
-
*/
|
|
368289
|
-
async loadCommands(signal) {
|
|
368290
|
-
const allCommands = [];
|
|
368291
|
-
const globOptions = {
|
|
368292
|
-
nodir: true,
|
|
368293
|
-
dot: true,
|
|
368294
|
-
signal,
|
|
368295
|
-
follow: true
|
|
368296
|
-
};
|
|
368297
|
-
const commandDirs = this.getCommandDirectories();
|
|
368298
|
-
for (const dirInfo of commandDirs) {
|
|
368299
|
-
try {
|
|
368300
|
-
const files = await glob("**/*.toml", {
|
|
368301
|
-
...globOptions,
|
|
368302
|
-
cwd: dirInfo.path
|
|
368303
|
-
});
|
|
368304
|
-
if (this.folderTrustEnabled && !this.folderTrust) {
|
|
368305
|
-
return [];
|
|
368306
|
-
}
|
|
368307
|
-
const commandPromises = files.map(
|
|
368308
|
-
(file) => this.parseAndAdaptFile(
|
|
368309
|
-
path90.join(dirInfo.path, file),
|
|
368310
|
-
dirInfo.path,
|
|
368311
|
-
dirInfo.extensionName
|
|
368312
|
-
)
|
|
368313
|
-
);
|
|
368314
|
-
const commands = (await Promise.all(commandPromises)).filter(
|
|
368315
|
-
(cmd) => cmd !== null
|
|
368316
|
-
);
|
|
368317
|
-
allCommands.push(...commands);
|
|
368318
|
-
} catch (error2) {
|
|
368319
|
-
const isEnoent = error2.code === "ENOENT";
|
|
368320
|
-
const isAbortError2 = error2 instanceof Error && error2.name === "AbortError";
|
|
368321
|
-
if (!isEnoent && !isAbortError2) {
|
|
368322
|
-
console.error(
|
|
368323
|
-
`[FileCommandLoader] Error loading commands from ${dirInfo.path}:`,
|
|
368324
|
-
error2
|
|
368325
|
-
);
|
|
368326
|
-
}
|
|
368327
|
-
}
|
|
368328
|
-
}
|
|
368329
|
-
return allCommands;
|
|
368330
|
-
}
|
|
368331
|
-
/**
|
|
368332
|
-
* Get all command directories in order for loading.
|
|
368333
|
-
* User commands → Project commands → Extension commands
|
|
368334
|
-
* This order ensures extension commands can detect all conflicts.
|
|
368335
|
-
*/
|
|
368336
|
-
getCommandDirectories() {
|
|
368337
|
-
const dirs = [];
|
|
368338
|
-
const storage = this.config?.storage ?? new Storage(this.projectRoot);
|
|
368339
|
-
dirs.push({ path: Storage.getUserCommandsDir() });
|
|
368340
|
-
dirs.push({ path: storage.getProjectCommandsDir() });
|
|
368341
|
-
if (this.config) {
|
|
368342
|
-
const activeExtensions = this.config.getExtensions().filter((ext2) => ext2.isActive).sort((a2, b2) => a2.name.localeCompare(b2.name));
|
|
368343
|
-
const extensionCommandDirs = activeExtensions.map((ext2) => ({
|
|
368344
|
-
path: path90.join(ext2.path, "commands"),
|
|
368345
|
-
extensionName: ext2.name
|
|
368346
|
-
}));
|
|
368347
|
-
dirs.push(...extensionCommandDirs);
|
|
368348
|
-
}
|
|
368349
|
-
return dirs;
|
|
368350
|
-
}
|
|
368351
|
-
/**
|
|
368352
|
-
* Parses a single .toml file and transforms it into a SlashCommand object.
|
|
368353
|
-
* @param filePath The absolute path to the .toml file.
|
|
368354
|
-
* @param baseDir The root command directory for name calculation.
|
|
368355
|
-
* @param extensionName Optional extension name to prefix commands with.
|
|
368356
|
-
* @returns A promise resolving to a SlashCommand, or null if the file is invalid.
|
|
368357
|
-
*/
|
|
368358
|
-
async parseAndAdaptFile(filePath, baseDir, extensionName) {
|
|
368359
|
-
let fileContent;
|
|
368360
|
-
try {
|
|
368361
|
-
fileContent = await fs81.readFile(filePath, "utf-8");
|
|
368362
|
-
} catch (error2) {
|
|
368363
|
-
console.error(
|
|
368364
|
-
`[FileCommandLoader] Failed to read file ${filePath}:`,
|
|
368365
|
-
error2 instanceof Error ? error2.message : String(error2)
|
|
368366
|
-
);
|
|
368367
|
-
return null;
|
|
368368
|
-
}
|
|
368369
|
-
let parsed;
|
|
368370
|
-
try {
|
|
368371
|
-
parsed = import_toml.default.parse(fileContent);
|
|
368372
|
-
} catch (error2) {
|
|
368373
|
-
console.error(
|
|
368374
|
-
`[FileCommandLoader] Failed to parse TOML file ${filePath}:`,
|
|
368375
|
-
error2 instanceof Error ? error2.message : String(error2)
|
|
368376
|
-
);
|
|
368377
|
-
return null;
|
|
368378
|
-
}
|
|
368379
|
-
const validationResult = TomlCommandDefSchema.safeParse(parsed);
|
|
368380
|
-
if (!validationResult.success) {
|
|
368381
|
-
console.error(
|
|
368382
|
-
`[FileCommandLoader] Skipping invalid command file: ${filePath}. Validation errors:`,
|
|
368383
|
-
validationResult.error.flatten()
|
|
368384
|
-
);
|
|
368385
|
-
return null;
|
|
368386
|
-
}
|
|
368387
|
-
const validDef = validationResult.data;
|
|
368388
|
-
const relativePathWithExt = path90.relative(baseDir, filePath);
|
|
368389
|
-
const relativePath = relativePathWithExt.substring(
|
|
368390
|
-
0,
|
|
368391
|
-
relativePathWithExt.length - 5
|
|
368392
|
-
// length of '.toml'
|
|
368393
|
-
);
|
|
368394
|
-
const baseCommandName = relativePath.split(path90.sep).map((segment) => segment.replaceAll(":", "_")).join(":");
|
|
368395
|
-
const defaultDescription = `Custom command from ${path90.basename(filePath)}`;
|
|
368396
|
-
let description = validDef.description || defaultDescription;
|
|
368397
|
-
if (extensionName) {
|
|
368398
|
-
description = `[${extensionName}] ${description}`;
|
|
368399
|
-
}
|
|
368400
|
-
const processors = [];
|
|
368401
|
-
const usesArgs = validDef.prompt.includes(SHORTHAND_ARGS_PLACEHOLDER);
|
|
368402
|
-
const usesShellInjection = validDef.prompt.includes(
|
|
368403
|
-
SHELL_INJECTION_TRIGGER
|
|
368404
|
-
);
|
|
368405
|
-
const usesAtFileInjection = validDef.prompt.includes(
|
|
368406
|
-
AT_FILE_INJECTION_TRIGGER
|
|
368407
|
-
);
|
|
368408
|
-
if (usesAtFileInjection) {
|
|
368409
|
-
processors.push(new AtFileProcessor(baseCommandName));
|
|
368410
|
-
}
|
|
368411
|
-
if (usesShellInjection || usesArgs) {
|
|
368412
|
-
processors.push(new ShellProcessor(baseCommandName));
|
|
368413
|
-
}
|
|
368414
|
-
if (!usesArgs) {
|
|
368415
|
-
processors.push(new DefaultArgumentProcessor());
|
|
368416
|
-
}
|
|
368417
|
-
return {
|
|
368418
|
-
name: baseCommandName,
|
|
368419
|
-
description,
|
|
368420
|
-
kind: "file" /* FILE */,
|
|
368421
|
-
extensionName,
|
|
368422
|
-
action: /* @__PURE__ */ __name(async (context2, _args) => {
|
|
368423
|
-
if (!context2.invocation) {
|
|
368424
|
-
console.error(
|
|
368425
|
-
`[FileCommandLoader] Critical error: Command '${baseCommandName}' was executed without invocation context.`
|
|
368426
|
-
);
|
|
368427
|
-
return {
|
|
368428
|
-
type: "submit_prompt",
|
|
368429
|
-
content: [{ text: validDef.prompt }]
|
|
368430
|
-
// Fallback to unprocessed prompt
|
|
368431
|
-
};
|
|
368432
|
-
}
|
|
368433
|
-
try {
|
|
368434
|
-
let processedContent = [
|
|
368435
|
-
{ text: validDef.prompt }
|
|
368436
|
-
];
|
|
368437
|
-
for (const processor of processors) {
|
|
368438
|
-
processedContent = await processor.process(
|
|
368439
|
-
processedContent,
|
|
368440
|
-
context2
|
|
368441
|
-
);
|
|
368442
|
-
}
|
|
368443
|
-
return {
|
|
368444
|
-
type: "submit_prompt",
|
|
368445
|
-
content: processedContent
|
|
368446
|
-
};
|
|
368447
|
-
} catch (e4) {
|
|
368448
|
-
if (e4 instanceof ConfirmationRequiredError) {
|
|
368449
|
-
return {
|
|
368450
|
-
type: "confirm_shell_commands",
|
|
368451
|
-
commandsToConfirm: e4.commandsToConfirm,
|
|
368452
|
-
originalInvocation: {
|
|
368453
|
-
raw: context2.invocation.raw
|
|
368454
|
-
}
|
|
368455
|
-
};
|
|
368456
|
-
}
|
|
368457
|
-
throw e4;
|
|
368458
|
-
}
|
|
368459
|
-
}, "action")
|
|
368460
|
-
};
|
|
368461
|
-
}
|
|
368462
|
-
};
|
|
368463
|
-
|
|
368464
|
-
// packages/cli/src/ui/noninteractive/nonInteractiveUi.ts
|
|
368465
|
-
init_esbuild_shims();
|
|
368466
|
-
function createNonInteractiveUI() {
|
|
368467
|
-
return {
|
|
368468
|
-
addItem: /* @__PURE__ */ __name((_item, _timestamp) => 0, "addItem"),
|
|
368469
|
-
clear: /* @__PURE__ */ __name(() => {
|
|
368470
|
-
}, "clear"),
|
|
368471
|
-
setDebugMessage: /* @__PURE__ */ __name((_message) => {
|
|
368472
|
-
}, "setDebugMessage"),
|
|
368473
|
-
loadHistory: /* @__PURE__ */ __name((_newHistory) => {
|
|
368474
|
-
}, "loadHistory"),
|
|
368475
|
-
pendingItem: null,
|
|
368476
|
-
setPendingItem: /* @__PURE__ */ __name((_item) => {
|
|
368477
|
-
}, "setPendingItem"),
|
|
368478
|
-
toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
|
|
368479
|
-
setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
|
|
368480
|
-
}, "setGeminiMdFileCount"),
|
|
368481
|
-
reloadCommands: /* @__PURE__ */ __name(() => {
|
|
368482
|
-
}, "reloadCommands"),
|
|
368483
|
-
extensionsUpdateState: /* @__PURE__ */ new Map(),
|
|
368484
|
-
dispatchExtensionStateUpdate: /* @__PURE__ */ __name((_action) => {
|
|
368485
|
-
}, "dispatchExtensionStateUpdate"),
|
|
368486
|
-
addConfirmUpdateExtensionRequest: /* @__PURE__ */ __name((_request) => {
|
|
368487
|
-
}, "addConfirmUpdateExtensionRequest")
|
|
368488
|
-
};
|
|
368489
|
-
}
|
|
368490
|
-
__name(createNonInteractiveUI, "createNonInteractiveUI");
|
|
368491
|
-
|
|
368492
|
-
// packages/cli/src/nonInteractiveCliCommands.ts
|
|
368493
|
-
function filterCommandsForNonInteractive(commands, allowedBuiltinCommandNames) {
|
|
368494
|
-
return commands.filter((cmd) => {
|
|
368495
|
-
if (cmd.kind === "file" /* FILE */) {
|
|
368496
|
-
return true;
|
|
368497
|
-
}
|
|
368498
|
-
if (cmd.kind === "built-in" /* BUILT_IN */) {
|
|
368499
|
-
return allowedBuiltinCommandNames.has(cmd.name);
|
|
368500
|
-
}
|
|
368501
|
-
return false;
|
|
368502
|
-
});
|
|
368503
|
-
}
|
|
368504
|
-
__name(filterCommandsForNonInteractive, "filterCommandsForNonInteractive");
|
|
368505
|
-
var handleSlashCommand = /* @__PURE__ */ __name(async (rawQuery, abortController, config2, settings, allowedBuiltinCommandNames) => {
|
|
368506
|
-
const trimmed2 = rawQuery.trim();
|
|
368507
|
-
if (!trimmed2.startsWith("/")) {
|
|
368508
|
-
return;
|
|
368509
|
-
}
|
|
368510
|
-
const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
|
|
368511
|
-
const loaders = allowedBuiltinSet.size > 0 ? [new BuiltinCommandLoader(config2), new FileCommandLoader(config2)] : [new FileCommandLoader(config2)];
|
|
368512
|
-
const commandService = await CommandService.create(
|
|
368513
|
-
loaders,
|
|
368514
|
-
abortController.signal
|
|
368515
|
-
);
|
|
368516
|
-
const commands = commandService.getCommands();
|
|
368517
|
-
const filteredCommands = filterCommandsForNonInteractive(
|
|
368518
|
-
commands,
|
|
368519
|
-
allowedBuiltinSet
|
|
368520
|
-
);
|
|
368521
|
-
const { commandToExecute, args } = parseSlashCommand(
|
|
368522
|
-
rawQuery,
|
|
368523
|
-
filteredCommands
|
|
368524
|
-
);
|
|
368525
|
-
if (commandToExecute) {
|
|
368526
|
-
if (commandToExecute.action) {
|
|
368527
|
-
const sessionStats = {
|
|
368528
|
-
sessionId: config2?.getSessionId(),
|
|
368529
|
-
sessionStartTime: /* @__PURE__ */ new Date(),
|
|
368530
|
-
metrics: uiTelemetryService.getMetrics(),
|
|
368531
|
-
lastPromptTokenCount: 0,
|
|
368532
|
-
promptCount: 1
|
|
368533
|
-
};
|
|
368534
|
-
const logger6 = new Logger(config2?.getSessionId() || "", config2?.storage);
|
|
368535
|
-
const context2 = {
|
|
368536
|
-
services: {
|
|
368537
|
-
config: config2,
|
|
368538
|
-
settings,
|
|
368539
|
-
git: void 0,
|
|
368540
|
-
logger: logger6
|
|
368541
|
-
},
|
|
368542
|
-
ui: createNonInteractiveUI(),
|
|
368543
|
-
session: {
|
|
368544
|
-
stats: sessionStats,
|
|
368545
|
-
sessionShellAllowlist: /* @__PURE__ */ new Set()
|
|
368546
|
-
},
|
|
368547
|
-
invocation: {
|
|
368548
|
-
raw: trimmed2,
|
|
368549
|
-
name: commandToExecute.name,
|
|
368550
|
-
args
|
|
368551
|
-
}
|
|
368552
|
-
};
|
|
368553
|
-
const result = await commandToExecute.action(context2, args);
|
|
368554
|
-
if (result) {
|
|
368555
|
-
switch (result.type) {
|
|
368556
|
-
case "submit_prompt":
|
|
368557
|
-
return result.content;
|
|
368558
|
-
case "confirm_shell_commands":
|
|
368559
|
-
throw new FatalInputError(
|
|
368560
|
-
"Exiting due to a confirmation prompt requested by the command."
|
|
368561
|
-
);
|
|
368562
|
-
default:
|
|
368563
|
-
throw new FatalInputError(
|
|
368564
|
-
"Exiting due to command result that is not supported in non-interactive mode."
|
|
368565
|
-
);
|
|
368566
|
-
}
|
|
368567
|
-
}
|
|
368568
|
-
}
|
|
368569
|
-
}
|
|
368570
|
-
return;
|
|
368571
|
-
}, "handleSlashCommand");
|
|
368572
|
-
var getAvailableCommands = /* @__PURE__ */ __name(async (config2, settings, abortSignal, allowedBuiltinCommandNames) => {
|
|
368573
|
-
try {
|
|
368574
|
-
const allowedBuiltinSet = new Set(allowedBuiltinCommandNames ?? []);
|
|
368575
|
-
const loaders = allowedBuiltinSet.size > 0 ? [new BuiltinCommandLoader(config2), new FileCommandLoader(config2)] : [new FileCommandLoader(config2)];
|
|
368576
|
-
const commandService = await CommandService.create(loaders, abortSignal);
|
|
368577
|
-
const commands = commandService.getCommands();
|
|
368578
|
-
const filteredCommands = filterCommandsForNonInteractive(
|
|
368579
|
-
commands,
|
|
368580
|
-
allowedBuiltinSet
|
|
368581
|
-
);
|
|
368582
|
-
return filteredCommands.filter((cmd) => !cmd.hidden);
|
|
368583
|
-
} catch (error2) {
|
|
368584
|
-
console.error("Error loading available commands:", error2);
|
|
368585
|
-
return [];
|
|
368586
|
-
}
|
|
368587
|
-
}, "getAvailableCommands");
|
|
368588
|
-
|
|
368589
368773
|
// packages/cli/src/ui/hooks/atCommandProcessor.ts
|
|
368590
368774
|
init_esbuild_shims();
|
|
368591
368775
|
import * as fs82 from "node:fs/promises";
|
|
@@ -368925,6 +369109,36 @@ Content from @${filePathSpecInContent}:
|
|
|
368925
369109
|
__name(handleAtCommand, "handleAtCommand");
|
|
368926
369110
|
|
|
368927
369111
|
// packages/cli/src/nonInteractiveCli.ts
|
|
369112
|
+
async function emitNonInteractiveFinalMessage(params) {
|
|
369113
|
+
const { message, isError, adapter, config: config2 } = params;
|
|
369114
|
+
if (!adapter) {
|
|
369115
|
+
const target = isError ? process.stderr : process.stdout;
|
|
369116
|
+
target.write(`${message}
|
|
369117
|
+
`);
|
|
369118
|
+
return;
|
|
369119
|
+
}
|
|
369120
|
+
adapter.startAssistantMessage();
|
|
369121
|
+
adapter.processEvent({
|
|
369122
|
+
type: GeminiEventType.Content,
|
|
369123
|
+
value: message
|
|
369124
|
+
});
|
|
369125
|
+
adapter.finalizeAssistantMessage();
|
|
369126
|
+
const metrics2 = uiTelemetryService.getMetrics();
|
|
369127
|
+
const usage2 = computeUsageFromMetrics(metrics2);
|
|
369128
|
+
const outputFormat = config2.getOutputFormat();
|
|
369129
|
+
const stats = outputFormat === OutputFormat.JSON ? uiTelemetryService.getMetrics() : void 0;
|
|
369130
|
+
adapter.emitResult({
|
|
369131
|
+
isError,
|
|
369132
|
+
durationMs: Date.now() - params.startTimeMs,
|
|
369133
|
+
apiDurationMs: 0,
|
|
369134
|
+
numTurns: 0,
|
|
369135
|
+
errorMessage: isError ? message : void 0,
|
|
369136
|
+
usage: usage2,
|
|
369137
|
+
stats,
|
|
369138
|
+
summary: message
|
|
369139
|
+
});
|
|
369140
|
+
}
|
|
369141
|
+
__name(emitNonInteractiveFinalMessage, "emitNonInteractiveFinalMessage");
|
|
368928
369142
|
async function runNonInteractive(config2, settings, input, prompt_id, options2 = {}) {
|
|
368929
369143
|
return promptIdContext.run(prompt_id, async () => {
|
|
368930
369144
|
let adapter;
|
|
@@ -368962,6 +369176,14 @@ async function runNonInteractive(config2, settings, input, prompt_id, options2 =
|
|
|
368962
369176
|
process.stdout.on("error", stdoutErrorHandler);
|
|
368963
369177
|
process.on("SIGINT", shutdownHandler);
|
|
368964
369178
|
process.on("SIGTERM", shutdownHandler);
|
|
369179
|
+
if (adapter) {
|
|
369180
|
+
const systemMessage = await buildSystemMessage(
|
|
369181
|
+
config2,
|
|
369182
|
+
sessionId,
|
|
369183
|
+
permissionMode
|
|
369184
|
+
);
|
|
369185
|
+
adapter.emitMessage(systemMessage);
|
|
369186
|
+
}
|
|
368965
369187
|
let initialPartList = extractPartsFromUserMessage(
|
|
368966
369188
|
options2.userMessage
|
|
368967
369189
|
);
|
|
@@ -368974,9 +369196,43 @@ async function runNonInteractive(config2, settings, input, prompt_id, options2 =
|
|
|
368974
369196
|
config2,
|
|
368975
369197
|
settings
|
|
368976
369198
|
);
|
|
368977
|
-
|
|
368978
|
-
|
|
368979
|
-
|
|
369199
|
+
switch (slashCommandResult.type) {
|
|
369200
|
+
case "submit_prompt":
|
|
369201
|
+
initialPartList = slashCommandResult.content;
|
|
369202
|
+
slashHandled = true;
|
|
369203
|
+
break;
|
|
369204
|
+
case "message": {
|
|
369205
|
+
await emitNonInteractiveFinalMessage({
|
|
369206
|
+
message: slashCommandResult.content,
|
|
369207
|
+
isError: slashCommandResult.messageType === "error",
|
|
369208
|
+
adapter,
|
|
369209
|
+
config: config2,
|
|
369210
|
+
startTimeMs: startTime
|
|
369211
|
+
});
|
|
369212
|
+
return;
|
|
369213
|
+
}
|
|
369214
|
+
case "stream_messages":
|
|
369215
|
+
throw new FatalInputError(
|
|
369216
|
+
"Stream messages mode is not supported in non-interactive CLI"
|
|
369217
|
+
);
|
|
369218
|
+
case "unsupported": {
|
|
369219
|
+
await emitNonInteractiveFinalMessage({
|
|
369220
|
+
message: slashCommandResult.reason,
|
|
369221
|
+
isError: true,
|
|
369222
|
+
adapter,
|
|
369223
|
+
config: config2,
|
|
369224
|
+
startTimeMs: startTime
|
|
369225
|
+
});
|
|
369226
|
+
return;
|
|
369227
|
+
}
|
|
369228
|
+
case "no_command":
|
|
369229
|
+
break;
|
|
369230
|
+
default: {
|
|
369231
|
+
const _exhaustive = slashCommandResult;
|
|
369232
|
+
throw new FatalInputError(
|
|
369233
|
+
`Unhandled slash command result type: ${_exhaustive.type}`
|
|
369234
|
+
);
|
|
369235
|
+
}
|
|
368980
369236
|
}
|
|
368981
369237
|
}
|
|
368982
369238
|
if (!slashHandled) {
|
|
@@ -369002,14 +369258,6 @@ async function runNonInteractive(config2, settings, input, prompt_id, options2 =
|
|
|
369002
369258
|
}
|
|
369003
369259
|
const initialParts = normalizePartList(initialPartList);
|
|
369004
369260
|
let currentMessages = [{ role: "user", parts: initialParts }];
|
|
369005
|
-
if (adapter) {
|
|
369006
|
-
const systemMessage = await buildSystemMessage(
|
|
369007
|
-
config2,
|
|
369008
|
-
sessionId,
|
|
369009
|
-
permissionMode
|
|
369010
|
-
);
|
|
369011
|
-
adapter.emitMessage(systemMessage);
|
|
369012
|
-
}
|
|
369013
369261
|
let isFirstTurn = true;
|
|
369014
369262
|
while (true) {
|
|
369015
369263
|
turnCount++;
|
|
@@ -369689,7 +369937,7 @@ var SystemController = class extends BaseController {
|
|
|
369689
369937
|
};
|
|
369690
369938
|
}
|
|
369691
369939
|
/**
|
|
369692
|
-
* Load slash command names using
|
|
369940
|
+
* Load slash command names using getAvailableCommands
|
|
369693
369941
|
*
|
|
369694
369942
|
* @param signal - AbortSignal to respect for cancellation
|
|
369695
369943
|
* @returns Promise resolving to array of slash command names
|
|
@@ -369699,19 +369947,11 @@ var SystemController = class extends BaseController {
|
|
|
369699
369947
|
return [];
|
|
369700
369948
|
}
|
|
369701
369949
|
try {
|
|
369702
|
-
const
|
|
369703
|
-
[new BuiltinCommandLoader(this.context.config)],
|
|
369704
|
-
signal
|
|
369705
|
-
);
|
|
369950
|
+
const commands = await getAvailableCommands(this.context.config, signal);
|
|
369706
369951
|
if (signal.aborted) {
|
|
369707
369952
|
return [];
|
|
369708
369953
|
}
|
|
369709
|
-
|
|
369710
|
-
const commands = service.getCommands();
|
|
369711
|
-
for (const command2 of commands) {
|
|
369712
|
-
names.add(command2.name);
|
|
369713
|
-
}
|
|
369714
|
-
return Array.from(names).sort();
|
|
369954
|
+
return commands.map((cmd) => cmd.name).sort();
|
|
369715
369955
|
} catch (error2) {
|
|
369716
369956
|
if (signal.aborted) {
|
|
369717
369957
|
return [];
|
|
@@ -403285,6 +403525,11 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings, addIte
|
|
|
403285
403525
|
true
|
|
403286
403526
|
);
|
|
403287
403527
|
}
|
|
403528
|
+
case "stream_messages": {
|
|
403529
|
+
throw new Error(
|
|
403530
|
+
"stream_messages result type is not supported in interactive mode"
|
|
403531
|
+
);
|
|
403532
|
+
}
|
|
403288
403533
|
default: {
|
|
403289
403534
|
const unhandled = result;
|
|
403290
403535
|
throw new Error(
|
|
@@ -405871,143 +406116,16 @@ var useTimer = /* @__PURE__ */ __name((isActive, resetKey) => {
|
|
|
405871
406116
|
// packages/cli/src/ui/hooks/usePhraseCycler.ts
|
|
405872
406117
|
init_esbuild_shims();
|
|
405873
406118
|
var import_react119 = __toESM(require_react(), 1);
|
|
405874
|
-
var WITTY_LOADING_PHRASES = [
|
|
405875
|
-
"I'm Feeling Lucky",
|
|
405876
|
-
"Shipping awesomeness... ",
|
|
405877
|
-
"Painting the serifs back on...",
|
|
405878
|
-
"Navigating the slime mold...",
|
|
405879
|
-
"Consulting the digital spirits...",
|
|
405880
|
-
"Reticulating splines...",
|
|
405881
|
-
"Warming up the AI hamsters...",
|
|
405882
|
-
"Asking the magic conch shell...",
|
|
405883
|
-
"Generating witty retort...",
|
|
405884
|
-
"Polishing the algorithms...",
|
|
405885
|
-
"Don't rush perfection (or my code)...",
|
|
405886
|
-
"Brewing fresh bytes...",
|
|
405887
|
-
"Counting electrons...",
|
|
405888
|
-
"Engaging cognitive processors...",
|
|
405889
|
-
"Checking for syntax errors in the universe...",
|
|
405890
|
-
"One moment, optimizing humor...",
|
|
405891
|
-
"Shuffling punchlines...",
|
|
405892
|
-
"Untangling neural nets...",
|
|
405893
|
-
"Compiling brilliance...",
|
|
405894
|
-
"Loading wit.exe...",
|
|
405895
|
-
"Summoning the cloud of wisdom...",
|
|
405896
|
-
"Preparing a witty response...",
|
|
405897
|
-
"Just a sec, I'm debugging reality...",
|
|
405898
|
-
"Confuzzling the options...",
|
|
405899
|
-
"Tuning the cosmic frequencies...",
|
|
405900
|
-
"Crafting a response worthy of your patience...",
|
|
405901
|
-
"Compiling the 1s and 0s...",
|
|
405902
|
-
"Resolving dependencies... and existential crises...",
|
|
405903
|
-
"Defragmenting memories... both RAM and personal...",
|
|
405904
|
-
"Rebooting the humor module...",
|
|
405905
|
-
"Caching the essentials (mostly cat memes)...",
|
|
405906
|
-
"Optimizing for ludicrous speed",
|
|
405907
|
-
"Swapping bits... don't tell the bytes...",
|
|
405908
|
-
"Garbage collecting... be right back...",
|
|
405909
|
-
"Assembling the interwebs...",
|
|
405910
|
-
"Converting coffee into code...",
|
|
405911
|
-
"Updating the syntax for reality...",
|
|
405912
|
-
"Rewiring the synapses...",
|
|
405913
|
-
"Looking for a misplaced semicolon...",
|
|
405914
|
-
"Greasin' the cogs of the machine...",
|
|
405915
|
-
"Pre-heating the servers...",
|
|
405916
|
-
"Calibrating the flux capacitor...",
|
|
405917
|
-
"Engaging the improbability drive...",
|
|
405918
|
-
"Channeling the Force...",
|
|
405919
|
-
"Aligning the stars for optimal response...",
|
|
405920
|
-
"So say we all...",
|
|
405921
|
-
"Loading the next great idea...",
|
|
405922
|
-
"Just a moment, I'm in the zone...",
|
|
405923
|
-
"Preparing to dazzle you with brilliance...",
|
|
405924
|
-
"Just a tick, I'm polishing my wit...",
|
|
405925
|
-
"Hold tight, I'm crafting a masterpiece...",
|
|
405926
|
-
"Just a jiffy, I'm debugging the universe...",
|
|
405927
|
-
"Just a moment, I'm aligning the pixels...",
|
|
405928
|
-
"Just a sec, I'm optimizing the humor...",
|
|
405929
|
-
"Just a moment, I'm tuning the algorithms...",
|
|
405930
|
-
"Warp speed engaged...",
|
|
405931
|
-
"Mining for more Dilithium crystals...",
|
|
405932
|
-
"Don't panic...",
|
|
405933
|
-
"Following the white rabbit...",
|
|
405934
|
-
"The truth is in here... somewhere...",
|
|
405935
|
-
"Blowing on the cartridge...",
|
|
405936
|
-
"Loading... Do a barrel roll!",
|
|
405937
|
-
"Waiting for the respawn...",
|
|
405938
|
-
"Finishing the Kessel Run in less than 12 parsecs...",
|
|
405939
|
-
"The cake is not a lie, it's just still loading...",
|
|
405940
|
-
"Fiddling with the character creation screen...",
|
|
405941
|
-
"Just a moment, I'm finding the right meme...",
|
|
405942
|
-
"Pressing 'A' to continue...",
|
|
405943
|
-
"Herding digital cats...",
|
|
405944
|
-
"Polishing the pixels...",
|
|
405945
|
-
"Finding a suitable loading screen pun...",
|
|
405946
|
-
"Distracting you with this witty phrase...",
|
|
405947
|
-
"Almost there... probably...",
|
|
405948
|
-
"Our hamsters are working as fast as they can...",
|
|
405949
|
-
"Giving Cloudy a pat on the head...",
|
|
405950
|
-
"Petting the cat...",
|
|
405951
|
-
"Rickrolling my boss...",
|
|
405952
|
-
"Never gonna give you up, never gonna let you down...",
|
|
405953
|
-
"Slapping the bass...",
|
|
405954
|
-
"Tasting the snozberries...",
|
|
405955
|
-
"I'm going the distance, I'm going for speed...",
|
|
405956
|
-
"Is this the real life? Is this just fantasy?...",
|
|
405957
|
-
"I've got a good feeling about this...",
|
|
405958
|
-
"Poking the bear...",
|
|
405959
|
-
"Doing research on the latest memes...",
|
|
405960
|
-
"Figuring out how to make this more witty...",
|
|
405961
|
-
"Hmmm... let me think...",
|
|
405962
|
-
"What do you call a fish with no eyes? A fsh...",
|
|
405963
|
-
"Why did the computer go to therapy? It had too many bytes...",
|
|
405964
|
-
"Why don't programmers like nature? It has too many bugs...",
|
|
405965
|
-
"Why do programmers prefer dark mode? Because light attracts bugs...",
|
|
405966
|
-
"Why did the developer go broke? Because they used up all their cache...",
|
|
405967
|
-
"What can you do with a broken pencil? Nothing, it's pointless...",
|
|
405968
|
-
"Applying percussive maintenance...",
|
|
405969
|
-
"Searching for the correct USB orientation...",
|
|
405970
|
-
"Ensuring the magic smoke stays inside the wires...",
|
|
405971
|
-
"Rewriting in Rust for no particular reason...",
|
|
405972
|
-
"Trying to exit Vim...",
|
|
405973
|
-
"Spinning up the hamster wheel...",
|
|
405974
|
-
"That's not a bug, it's an undocumented feature...",
|
|
405975
|
-
"Engage.",
|
|
405976
|
-
"I'll be back... with an answer.",
|
|
405977
|
-
"My other process is a TARDIS...",
|
|
405978
|
-
"Communing with the machine spirit...",
|
|
405979
|
-
"Letting the thoughts marinate...",
|
|
405980
|
-
"Just remembered where I put my keys...",
|
|
405981
|
-
"Pondering the orb...",
|
|
405982
|
-
"I've seen things you people wouldn't believe... like a user who reads loading messages.",
|
|
405983
|
-
"Initiating thoughtful gaze...",
|
|
405984
|
-
"What's a computer's favorite snack? Microchips.",
|
|
405985
|
-
"Why do Java developers wear glasses? Because they don't C#.",
|
|
405986
|
-
"Charging the laser... pew pew!",
|
|
405987
|
-
"Dividing by zero... just kidding!",
|
|
405988
|
-
"Looking for an adult superviso... I mean, processing.",
|
|
405989
|
-
"Making it go beep boop.",
|
|
405990
|
-
"Buffering... because even AIs need a moment.",
|
|
405991
|
-
"Entangling quantum particles for a faster response...",
|
|
405992
|
-
"Polishing the chrome... on the algorithms.",
|
|
405993
|
-
"Are you not entertained? (Working on it!)",
|
|
405994
|
-
"Summoning the code gremlins... to help, of course.",
|
|
405995
|
-
"Just waiting for the dial-up tone to finish...",
|
|
405996
|
-
"Recalibrating the humor-o-meter.",
|
|
405997
|
-
"My other loading screen is even funnier.",
|
|
405998
|
-
"Pretty sure there's a cat walking on the keyboard somewhere...",
|
|
405999
|
-
"Enhancing... Enhancing... Still loading.",
|
|
406000
|
-
"It's not a bug, it's a feature... of this loading screen.",
|
|
406001
|
-
"Have you tried turning it off and on again? (The loading screen, not me.)",
|
|
406002
|
-
"Constructing additional pylons...",
|
|
406003
|
-
"New line? That\u2019s Ctrl+J."
|
|
406004
|
-
];
|
|
406119
|
+
var WITTY_LOADING_PHRASES = ["I'm Feeling Lucky"];
|
|
406005
406120
|
var PHRASE_CHANGE_INTERVAL_MS = 15e3;
|
|
406006
406121
|
var usePhraseCycler = /* @__PURE__ */ __name((isActive, isWaiting, customPhrases) => {
|
|
406007
|
-
const loadingPhrases = (0, import_react119.useMemo)(
|
|
406008
|
-
(
|
|
406009
|
-
|
|
406010
|
-
|
|
406122
|
+
const loadingPhrases = (0, import_react119.useMemo)(() => {
|
|
406123
|
+
if (customPhrases && customPhrases.length > 0) {
|
|
406124
|
+
return customPhrases;
|
|
406125
|
+
}
|
|
406126
|
+
const translatedPhrases = ta("WITTY_LOADING_PHRASES");
|
|
406127
|
+
return translatedPhrases.length > 0 ? translatedPhrases : WITTY_LOADING_PHRASES;
|
|
406128
|
+
}, [customPhrases]);
|
|
406011
406129
|
const [currentLoadingPhrase, setCurrentLoadingPhrase] = (0, import_react119.useState)(
|
|
406012
406130
|
loadingPhrases[0]
|
|
406013
406131
|
);
|
|
@@ -412068,8 +412186,22 @@ var authenticateUpdateSchema = external_exports.object({
|
|
|
412068
412186
|
authUri: external_exports.string()
|
|
412069
412187
|
})
|
|
412070
412188
|
});
|
|
412189
|
+
var acpMetaSchema = external_exports.record(external_exports.unknown()).nullable().optional();
|
|
412190
|
+
var modelIdSchema = external_exports.string();
|
|
412191
|
+
var modelInfoSchema = external_exports.object({
|
|
412192
|
+
_meta: acpMetaSchema,
|
|
412193
|
+
description: external_exports.string().nullable().optional(),
|
|
412194
|
+
modelId: modelIdSchema,
|
|
412195
|
+
name: external_exports.string()
|
|
412196
|
+
});
|
|
412197
|
+
var sessionModelStateSchema = external_exports.object({
|
|
412198
|
+
_meta: acpMetaSchema,
|
|
412199
|
+
availableModels: external_exports.array(modelInfoSchema),
|
|
412200
|
+
currentModelId: modelIdSchema
|
|
412201
|
+
});
|
|
412071
412202
|
var newSessionResponseSchema = external_exports.object({
|
|
412072
|
-
sessionId: external_exports.string()
|
|
412203
|
+
sessionId: external_exports.string(),
|
|
412204
|
+
models: sessionModelStateSchema
|
|
412073
412205
|
});
|
|
412074
412206
|
var loadSessionResponseSchema = external_exports.null();
|
|
412075
412207
|
var sessionListItemSchema = external_exports.object({
|
|
@@ -412283,6 +412415,10 @@ var currentModeUpdateSchema = external_exports.object({
|
|
|
412283
412415
|
sessionUpdate: external_exports.literal("current_mode_update"),
|
|
412284
412416
|
modeId: approvalModeValueSchema
|
|
412285
412417
|
});
|
|
412418
|
+
var currentModelUpdateSchema = external_exports.object({
|
|
412419
|
+
sessionUpdate: external_exports.literal("current_model_update"),
|
|
412420
|
+
model: modelInfoSchema
|
|
412421
|
+
});
|
|
412286
412422
|
var sessionUpdateSchema = external_exports.union([
|
|
412287
412423
|
external_exports.object({
|
|
412288
412424
|
content: contentBlockSchema,
|
|
@@ -412324,6 +412460,7 @@ var sessionUpdateSchema = external_exports.union([
|
|
|
412324
412460
|
sessionUpdate: external_exports.literal("plan")
|
|
412325
412461
|
}),
|
|
412326
412462
|
currentModeUpdateSchema,
|
|
412463
|
+
currentModelUpdateSchema,
|
|
412327
412464
|
availableCommandsUpdateSchema
|
|
412328
412465
|
]);
|
|
412329
412466
|
var agentResponseSchema = external_exports.union([
|
|
@@ -412437,6 +412574,13 @@ var AgentSideConnection = class {
|
|
|
412437
412574
|
params
|
|
412438
412575
|
);
|
|
412439
412576
|
}
|
|
412577
|
+
/**
|
|
412578
|
+
* Sends a custom notification to the client.
|
|
412579
|
+
* Used for extension-specific notifications that are not part of the core ACP protocol.
|
|
412580
|
+
*/
|
|
412581
|
+
async sendCustomNotification(method, params) {
|
|
412582
|
+
return await this.#connection.sendNotification(method, params);
|
|
412583
|
+
}
|
|
412440
412584
|
/**
|
|
412441
412585
|
* Request permission before running a tool
|
|
412442
412586
|
*
|
|
@@ -413426,7 +413570,6 @@ var SubAgentTracker = class {
|
|
|
413426
413570
|
};
|
|
413427
413571
|
|
|
413428
413572
|
// packages/cli/src/acp-integration/session/Session.ts
|
|
413429
|
-
var ALLOWED_BUILTIN_COMMANDS_FOR_ACP = ["init"];
|
|
413430
413573
|
var Session3 = class {
|
|
413431
413574
|
constructor(id, chat, config2, client, settings) {
|
|
413432
413575
|
this.chat = chat;
|
|
@@ -413497,13 +413640,14 @@ var Session3 = class {
|
|
|
413497
413640
|
inputText,
|
|
413498
413641
|
pendingSend,
|
|
413499
413642
|
this.config,
|
|
413500
|
-
this.settings
|
|
413501
|
-
ALLOWED_BUILTIN_COMMANDS_FOR_ACP
|
|
413643
|
+
this.settings
|
|
413502
413644
|
);
|
|
413503
|
-
|
|
413504
|
-
|
|
413505
|
-
|
|
413506
|
-
|
|
413645
|
+
parts = await this.#processSlashCommandResult(
|
|
413646
|
+
slashCommandResult,
|
|
413647
|
+
params.prompt
|
|
413648
|
+
);
|
|
413649
|
+
if (parts === null) {
|
|
413650
|
+
return { stopReason: "end_turn" };
|
|
413507
413651
|
}
|
|
413508
413652
|
} else {
|
|
413509
413653
|
parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
|
|
@@ -413593,9 +413737,7 @@ var Session3 = class {
|
|
|
413593
413737
|
try {
|
|
413594
413738
|
const slashCommands = await getAvailableCommands(
|
|
413595
413739
|
this.config,
|
|
413596
|
-
|
|
413597
|
-
abortController.signal,
|
|
413598
|
-
ALLOWED_BUILTIN_COMMANDS_FOR_ACP
|
|
413740
|
+
abortController.signal
|
|
413599
413741
|
);
|
|
413600
413742
|
const availableCommands = slashCommands.map(
|
|
413601
413743
|
(cmd) => ({
|
|
@@ -413842,6 +413984,71 @@ var Session3 = class {
|
|
|
413842
413984
|
return errorResponse(error2);
|
|
413843
413985
|
}
|
|
413844
413986
|
}
|
|
413987
|
+
/**
|
|
413988
|
+
* Processes the result of a slash command execution.
|
|
413989
|
+
*
|
|
413990
|
+
* Supported result types in ACP mode:
|
|
413991
|
+
* - submit_prompt: Submits content to the model
|
|
413992
|
+
* - stream_messages: Streams multiple messages to the client (ACP-specific)
|
|
413993
|
+
* - unsupported: Command cannot be executed in ACP mode
|
|
413994
|
+
* - no_command: No command was found, use original prompt
|
|
413995
|
+
*
|
|
413996
|
+
* Note: 'message' type is not supported in ACP mode - commands should use
|
|
413997
|
+
* 'stream_messages' instead for consistent async handling.
|
|
413998
|
+
*
|
|
413999
|
+
* @param result The result from handleSlashCommand
|
|
414000
|
+
* @param originalPrompt The original prompt blocks
|
|
414001
|
+
* @returns Parts to use for the prompt, or null if command was handled without needing model interaction
|
|
414002
|
+
*/
|
|
414003
|
+
async #processSlashCommandResult(result, originalPrompt) {
|
|
414004
|
+
switch (result.type) {
|
|
414005
|
+
case "submit_prompt":
|
|
414006
|
+
return normalizePartList(result.content);
|
|
414007
|
+
case "message": {
|
|
414008
|
+
await this.client.sendCustomNotification("_qwencode/slash_command", {
|
|
414009
|
+
sessionId: this.sessionId,
|
|
414010
|
+
command: originalPrompt.filter((block2) => block2.type === "text").map((block2) => block2.type === "text" ? block2.text : "").join(" "),
|
|
414011
|
+
messageType: result.messageType,
|
|
414012
|
+
message: result.content || ""
|
|
414013
|
+
});
|
|
414014
|
+
if (result.messageType === "error") {
|
|
414015
|
+
throw new Error(result.content || "Slash command failed.");
|
|
414016
|
+
}
|
|
414017
|
+
return null;
|
|
414018
|
+
}
|
|
414019
|
+
case "stream_messages": {
|
|
414020
|
+
const command2 = originalPrompt.filter((block2) => block2.type === "text").map((block2) => block2.type === "text" ? block2.text : "").join(" ");
|
|
414021
|
+
for await (const msg of result.messages) {
|
|
414022
|
+
await this.client.sendCustomNotification("_qwencode/slash_command", {
|
|
414023
|
+
sessionId: this.sessionId,
|
|
414024
|
+
command: command2,
|
|
414025
|
+
messageType: msg.messageType,
|
|
414026
|
+
message: msg.content
|
|
414027
|
+
});
|
|
414028
|
+
if (msg.messageType === "error") {
|
|
414029
|
+
throw new Error(msg.content || "Slash command failed.");
|
|
414030
|
+
}
|
|
414031
|
+
}
|
|
414032
|
+
return null;
|
|
414033
|
+
}
|
|
414034
|
+
case "unsupported": {
|
|
414035
|
+
const unsupportedError = `Slash command not supported in ACP integration: ${result.reason}`;
|
|
414036
|
+
throw new Error(unsupportedError);
|
|
414037
|
+
}
|
|
414038
|
+
case "no_command":
|
|
414039
|
+
return originalPrompt.map((block2) => {
|
|
414040
|
+
if (block2.type === "text") {
|
|
414041
|
+
return { text: block2.text };
|
|
414042
|
+
}
|
|
414043
|
+
throw new Error(`Unsupported block type: ${block2.type}`);
|
|
414044
|
+
});
|
|
414045
|
+
default: {
|
|
414046
|
+
const _exhaustive = result;
|
|
414047
|
+
const unknownError = `Unknown slash command result type: ${_exhaustive.type}`;
|
|
414048
|
+
throw new Error(unknownError);
|
|
414049
|
+
}
|
|
414050
|
+
}
|
|
414051
|
+
}
|
|
413845
414052
|
async #resolvePrompt(message, abortSignal) {
|
|
413846
414053
|
const FILE_URI_SCHEME = "file://";
|
|
413847
414054
|
const embeddedContext = [];
|
|
@@ -414181,7 +414388,7 @@ var GeminiAgent = class {
|
|
|
414181
414388
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
414182
414389
|
description: APPROVAL_MODE_INFO[mode].description
|
|
414183
414390
|
}));
|
|
414184
|
-
const version2 = "0.6.0-nightly.
|
|
414391
|
+
const version2 = "0.6.0-nightly.20251228.2bc80795";
|
|
414185
414392
|
return {
|
|
414186
414393
|
protocolVersion: PROTOCOL_VERSION,
|
|
414187
414394
|
agentInfo: {
|
|
@@ -414237,8 +414444,25 @@ var GeminiAgent = class {
|
|
|
414237
414444
|
await this.ensureAuthenticated(config2);
|
|
414238
414445
|
this.setupFileSystem(config2);
|
|
414239
414446
|
const session = await this.createAndStoreSession(config2);
|
|
414447
|
+
const configuredModel = (config2.getModel() || this.config.getModel() || "").trim();
|
|
414448
|
+
const modelId = configuredModel || "default";
|
|
414449
|
+
const modelName = configuredModel || modelId;
|
|
414240
414450
|
return {
|
|
414241
|
-
sessionId: session.getId()
|
|
414451
|
+
sessionId: session.getId(),
|
|
414452
|
+
models: {
|
|
414453
|
+
currentModelId: modelId,
|
|
414454
|
+
availableModels: [
|
|
414455
|
+
{
|
|
414456
|
+
modelId,
|
|
414457
|
+
name: modelName,
|
|
414458
|
+
description: null,
|
|
414459
|
+
_meta: {
|
|
414460
|
+
contextLimit: tokenLimit(modelId)
|
|
414461
|
+
}
|
|
414462
|
+
}
|
|
414463
|
+
],
|
|
414464
|
+
_meta: null
|
|
414465
|
+
}
|
|
414242
414466
|
};
|
|
414243
414467
|
}
|
|
414244
414468
|
async newSessionConfig(cwd7, mcpServers, sessionId) {
|
|
@@ -414364,8 +414588,10 @@ var GeminiAgent = class {
|
|
|
414364
414588
|
async createAndStoreSession(config2, conversation) {
|
|
414365
414589
|
const sessionId = config2.getSessionId();
|
|
414366
414590
|
const geminiClient = config2.getGeminiClient();
|
|
414367
|
-
|
|
414368
|
-
|
|
414591
|
+
if (!geminiClient.isInitialized()) {
|
|
414592
|
+
await geminiClient.initialize();
|
|
414593
|
+
}
|
|
414594
|
+
const chat = geminiClient.getChat();
|
|
414369
414595
|
const session = new Session3(
|
|
414370
414596
|
sessionId,
|
|
414371
414597
|
chat,
|
|
@@ -414738,6 +414964,11 @@ main().catch((error2) => {
|
|
|
414738
414964
|
* Copyright 2025 Qwen Team
|
|
414739
414965
|
* SPDX-License-Identifier: Apache-2.0
|
|
414740
414966
|
*/
|
|
414967
|
+
/**
|
|
414968
|
+
* @license
|
|
414969
|
+
* Copyright 2025 Qwen team
|
|
414970
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
414971
|
+
*/
|
|
414741
414972
|
/*! Bundled license information:
|
|
414742
414973
|
|
|
414743
414974
|
undici/lib/web/fetch/body.js:
|