flavor-code 1.3.10 → 1.3.12
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/dist/agent/types.d.ts +3 -0
- package/dist/{app-YSBW7GXH.js → app-Z7D7XPVE.js} +118 -206
- package/dist/{chunk-KKIBYDJI.js → chunk-2BF7CVWZ.js} +5 -7
- package/dist/{chunk-T2ARW6CZ.js → chunk-EZNIDHFZ.js} +1 -1
- package/dist/{chunk-IG4Z23CL.js → chunk-JFKRX2KG.js} +7 -0
- package/dist/{chunk-Y3DPUAEJ.js → chunk-QC5OYQTB.js} +508 -39
- package/dist/cli.js +6 -6
- package/dist/config/schema.d.ts +12 -0
- package/dist/desktop/main.js +297 -38
- package/dist/desktop-renderer/assets/index-CE6mw-at.js +154 -0
- package/dist/desktop-renderer/assets/index-DHTr_Acb.css +1 -0
- package/dist/desktop-renderer/assets/{interactive-terminal-BwS6MvIe.js → interactive-terminal-DcaRc1vO.js} +1 -1
- package/dist/desktop-renderer/index.html +2 -2
- package/dist/{load-GKA7P6RJ.js → load-LTTKVPJZ.js} +1 -1
- package/dist/models/anthropic.d.ts +7 -0
- package/dist/models/openai.d.ts +3 -0
- package/dist/models/structured.d.ts +13 -4
- package/dist/models/types.d.ts +19 -0
- package/dist/production.d.ts +2 -0
- package/dist/sdk/index.js +3 -3
- package/dist/tools/runtime.d.ts +5 -0
- package/dist/ui/char-width.d.ts +12 -0
- package/dist/ui/commands.d.ts +7 -3
- package/dist/ui/session.d.ts +5 -0
- package/dist/ui/thinking-line.d.ts +42 -0
- package/dist/ui/transcript.d.ts +2 -0
- package/package.json +1 -1
- package/dist/desktop-renderer/assets/index-CdeAi527.css +0 -1
- package/dist/desktop-renderer/assets/index-bFGsR_uj.js +0 -154
package/dist/agent/types.d.ts
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
statusPresentation
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2BF7CVWZ.js";
|
|
6
6
|
import {
|
|
7
7
|
COMMAND_DESCRIPTIONS,
|
|
8
8
|
MVP_COMMANDS,
|
|
9
|
+
charWidth,
|
|
9
10
|
createGlobTool,
|
|
10
11
|
createProductionRuntime,
|
|
11
12
|
createTranscriptState,
|
|
@@ -14,10 +15,11 @@ import {
|
|
|
14
15
|
modelContentTranscriptText,
|
|
15
16
|
packageVersion,
|
|
16
17
|
redactErrorText,
|
|
18
|
+
thinkingWindow,
|
|
17
19
|
transcriptReducer,
|
|
18
20
|
withTimeout
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-QC5OYQTB.js";
|
|
22
|
+
import "./chunk-JFKRX2KG.js";
|
|
21
23
|
import {
|
|
22
24
|
Box_default,
|
|
23
25
|
ClockContext,
|
|
@@ -605,187 +607,6 @@ function highlightCode(source, language = void 0) {
|
|
|
605
607
|
return source.split("\n").map((line) => highlightSingleLine(line, keywords)).join("\n");
|
|
606
608
|
}
|
|
607
609
|
|
|
608
|
-
// src/ui/char-width.ts
|
|
609
|
-
function charWidth(codePoint) {
|
|
610
|
-
if (codePoint === 8203 || // ZERO WIDTH SPACE
|
|
611
|
-
codePoint === 8204 || // ZERO WIDTH NON-JOINER
|
|
612
|
-
codePoint === 8205 || // ZERO WIDTH JOINER
|
|
613
|
-
codePoint === 65279 || // BOM / ZERO WIDTH NO-BREAK SPACE
|
|
614
|
-
codePoint >= 768 && codePoint <= 879 || // Combining Diacritical Marks
|
|
615
|
-
codePoint >= 1155 && codePoint <= 1161 || // Cyrillic combining marks
|
|
616
|
-
codePoint >= 1425 && codePoint <= 1469 || // Hebrew combining marks
|
|
617
|
-
codePoint >= 1552 && codePoint <= 1562 || // Arabic combining marks
|
|
618
|
-
codePoint >= 1611 && codePoint <= 1631 || // Arabic combining marks
|
|
619
|
-
codePoint >= 1648 && codePoint <= 1648 || // Arabic combining marks
|
|
620
|
-
codePoint >= 1750 && codePoint <= 1756 || // Arabic combining marks
|
|
621
|
-
codePoint >= 1759 && codePoint <= 1764 || // Arabic combining marks
|
|
622
|
-
codePoint >= 1767 && codePoint <= 1768 || // Arabic combining marks
|
|
623
|
-
codePoint >= 1770 && codePoint <= 1773 || // Arabic combining marks
|
|
624
|
-
codePoint >= 1809 && codePoint <= 1809 || // Syriac combining marks
|
|
625
|
-
codePoint >= 1840 && codePoint <= 1866 || // Syriac combining marks
|
|
626
|
-
codePoint >= 1958 && codePoint <= 1968 || // Thaana combining marks
|
|
627
|
-
codePoint >= 2304 && codePoint <= 2306 || // Devanagari combining marks
|
|
628
|
-
codePoint >= 2362 && codePoint <= 2362 || // Devanagari combining marks
|
|
629
|
-
codePoint >= 2364 && codePoint <= 2364 || // Devanagari combining marks
|
|
630
|
-
codePoint >= 2369 && codePoint <= 2376 || // Devanagari combining marks
|
|
631
|
-
codePoint >= 2381 && codePoint <= 2381 || // Devanagari combining marks
|
|
632
|
-
codePoint >= 2385 && codePoint <= 2391 || // Devanagari combining marks
|
|
633
|
-
codePoint >= 2402 && codePoint <= 2403 || // Devanagari combining marks
|
|
634
|
-
codePoint >= 2433 && codePoint <= 2433 || // Bengali combining marks
|
|
635
|
-
codePoint >= 2492 && codePoint <= 2492 || // Bengali combining marks
|
|
636
|
-
codePoint >= 2497 && codePoint <= 2500 || // Bengali combining marks
|
|
637
|
-
codePoint >= 2509 && codePoint <= 2509 || // Bengali combining marks
|
|
638
|
-
codePoint >= 2530 && codePoint <= 2531 || // Bengali combining marks
|
|
639
|
-
codePoint >= 2561 && codePoint <= 2562 || // Gurmukhi combining marks
|
|
640
|
-
codePoint >= 2620 && codePoint <= 2620 || // Gurmukhi combining marks
|
|
641
|
-
codePoint >= 2625 && codePoint <= 2626 || // Gurmukhi combining marks
|
|
642
|
-
codePoint >= 2631 && codePoint <= 2632 || // Gurmukhi combining marks
|
|
643
|
-
codePoint >= 2635 && codePoint <= 2637 || // Gurmukhi combining marks
|
|
644
|
-
codePoint >= 2672 && codePoint <= 2673 || // Gurmukhi combining marks
|
|
645
|
-
codePoint >= 2689 && codePoint <= 2690 || // Gujarati combining marks
|
|
646
|
-
codePoint >= 2748 && codePoint <= 2748 || // Gujarati combining marks
|
|
647
|
-
codePoint >= 2753 && codePoint <= 2757 || // Gujarati combining marks
|
|
648
|
-
codePoint >= 2759 && codePoint <= 2760 || // Gujarati combining marks
|
|
649
|
-
codePoint >= 2765 && codePoint <= 2765 || // Gujarati combining marks
|
|
650
|
-
codePoint >= 2786 && codePoint <= 2787 || // Gujarati combining marks
|
|
651
|
-
codePoint >= 2817 && codePoint <= 2817 || // Oriya combining marks
|
|
652
|
-
codePoint >= 2876 && codePoint <= 2876 || // Oriya combining marks
|
|
653
|
-
codePoint >= 2879 && codePoint <= 2879 || // Oriya combining marks
|
|
654
|
-
codePoint >= 2881 && codePoint <= 2883 || // Oriya combining marks
|
|
655
|
-
codePoint >= 2893 && codePoint <= 2893 || // Oriya combining marks
|
|
656
|
-
codePoint >= 2902 && codePoint <= 2902 || // Oriya combining marks
|
|
657
|
-
codePoint >= 2946 && codePoint <= 2946 || // Tamil combining marks
|
|
658
|
-
codePoint >= 3008 && codePoint <= 3008 || // Tamil combining marks
|
|
659
|
-
codePoint >= 3021 && codePoint <= 3021 || // Tamil combining marks
|
|
660
|
-
codePoint >= 3134 && codePoint <= 3136 || // Telugu combining marks
|
|
661
|
-
codePoint >= 3142 && codePoint <= 3144 || // Telugu combining marks
|
|
662
|
-
codePoint >= 3146 && codePoint <= 3149 || // Telugu combining marks
|
|
663
|
-
codePoint >= 3157 && codePoint <= 3158 || // Telugu combining marks
|
|
664
|
-
codePoint >= 3260 && codePoint <= 3260 || // Kannada combining marks
|
|
665
|
-
codePoint >= 3263 && codePoint <= 3263 || // Kannada combining marks
|
|
666
|
-
codePoint >= 3270 && codePoint <= 3270 || // Kannada combining marks
|
|
667
|
-
codePoint >= 3276 && codePoint <= 3277 || // Kannada combining marks
|
|
668
|
-
codePoint >= 3298 && codePoint <= 3299 || // Kannada combining marks
|
|
669
|
-
codePoint >= 3393 && codePoint <= 3395 || // Malayalam combining marks
|
|
670
|
-
codePoint >= 3405 && codePoint <= 3405 || // Malayalam combining marks
|
|
671
|
-
codePoint >= 3530 && codePoint <= 3530 || // Sinhala combining marks
|
|
672
|
-
codePoint >= 3538 && codePoint <= 3540 || // Sinhala combining marks
|
|
673
|
-
codePoint >= 3542 && codePoint <= 3542 || // Sinhala combining marks
|
|
674
|
-
codePoint >= 3633 && codePoint <= 3633 || // Thai combining marks
|
|
675
|
-
codePoint >= 3636 && codePoint <= 3642 || // Thai combining marks
|
|
676
|
-
codePoint >= 3655 && codePoint <= 3662 || // Thai combining marks
|
|
677
|
-
codePoint >= 3761 && codePoint <= 3761 || // Lao combining marks
|
|
678
|
-
codePoint >= 3764 && codePoint <= 3769 || // Lao combining marks
|
|
679
|
-
codePoint >= 3771 && codePoint <= 3772 || // Lao combining marks
|
|
680
|
-
codePoint >= 3784 && codePoint <= 3789 || // Lao combining marks
|
|
681
|
-
codePoint >= 3864 && codePoint <= 3865 || // Tibetan combining marks
|
|
682
|
-
codePoint >= 3893 && codePoint <= 3893 || // Tibetan combining marks
|
|
683
|
-
codePoint >= 3895 && codePoint <= 3895 || // Tibetan combining marks
|
|
684
|
-
codePoint >= 3897 && codePoint <= 3897 || // Tibetan combining marks
|
|
685
|
-
codePoint >= 3953 && codePoint <= 3966 || // Tibetan combining marks
|
|
686
|
-
codePoint >= 3968 && codePoint <= 3972 || // Tibetan combining marks
|
|
687
|
-
codePoint >= 3974 && codePoint <= 3975 || // Tibetan combining marks
|
|
688
|
-
codePoint >= 3984 && codePoint <= 3991 || // Tibetan combining marks
|
|
689
|
-
codePoint >= 3993 && codePoint <= 4028 || // Tibetan combining marks
|
|
690
|
-
codePoint >= 4038 && codePoint <= 4038 || // Tibetan combining marks
|
|
691
|
-
codePoint >= 4146 && codePoint <= 4151 || // Myanmar combining marks
|
|
692
|
-
codePoint >= 4153 && codePoint <= 4154 || // Myanmar combining marks
|
|
693
|
-
codePoint >= 4157 && codePoint <= 4158 || // Myanmar combining marks
|
|
694
|
-
codePoint >= 4184 && codePoint <= 4185 || // Myanmar combining marks
|
|
695
|
-
codePoint >= 4190 && codePoint <= 4192 || // Myanmar combining marks
|
|
696
|
-
codePoint >= 4209 && codePoint <= 4212 || // Myanmar combining marks
|
|
697
|
-
codePoint >= 4226 && codePoint <= 4226 || // Myanmar combining marks
|
|
698
|
-
codePoint >= 4229 && codePoint <= 4230 || // Myanmar combining marks
|
|
699
|
-
codePoint >= 4237 && codePoint <= 4237 || // Myanmar combining marks
|
|
700
|
-
codePoint >= 4957 && codePoint <= 4959 || // Ethiopic combining marks
|
|
701
|
-
codePoint >= 5906 && codePoint <= 5908 || // Tagalog combining marks
|
|
702
|
-
codePoint >= 5938 && codePoint <= 5940 || // Hanunoo combining marks
|
|
703
|
-
codePoint >= 5970 && codePoint <= 5971 || // Buhid combining marks
|
|
704
|
-
codePoint >= 6002 && codePoint <= 6003 || // Tagbanwa combining marks
|
|
705
|
-
codePoint >= 6068 && codePoint <= 6069 || // Khmer combining marks
|
|
706
|
-
codePoint >= 6071 && codePoint <= 6077 || // Khmer combining marks
|
|
707
|
-
codePoint >= 6086 && codePoint <= 6086 || // Khmer combining marks
|
|
708
|
-
codePoint >= 6089 && codePoint <= 6099 || // Khmer combining marks
|
|
709
|
-
codePoint >= 6109 && codePoint <= 6109 || // Khmer combining marks
|
|
710
|
-
codePoint >= 6155 && codePoint <= 6157 || // Mongolian combining marks
|
|
711
|
-
codePoint >= 6313 && codePoint <= 6313 || // Mongolian combining marks
|
|
712
|
-
codePoint >= 6432 && codePoint <= 6434 || // Limbu combining marks
|
|
713
|
-
codePoint >= 6439 && codePoint <= 6440 || // Limbu combining marks
|
|
714
|
-
codePoint >= 6450 && codePoint <= 6450 || // Limbu combining marks
|
|
715
|
-
codePoint >= 6457 && codePoint <= 6459 || // Limbu combining marks
|
|
716
|
-
codePoint >= 6679 && codePoint <= 6680 || // Buginese combining marks
|
|
717
|
-
codePoint >= 6912 && codePoint <= 6915 || // Balinese combining marks
|
|
718
|
-
codePoint >= 6964 && codePoint <= 6964 || // Balinese combining marks
|
|
719
|
-
codePoint >= 6966 && codePoint <= 6970 || // Balinese combining marks
|
|
720
|
-
codePoint >= 6972 && codePoint <= 6972 || // Balinese combining marks
|
|
721
|
-
codePoint >= 6978 && codePoint <= 6978 || // Balinese combining marks
|
|
722
|
-
codePoint >= 7019 && codePoint <= 7027 || // Balinese combining marks
|
|
723
|
-
codePoint >= 7616 && codePoint <= 7679 || // Combining Diacritical Marks Supplement
|
|
724
|
-
codePoint >= 8400 && codePoint <= 8432 || // Combining Diacritical Marks for Symbols
|
|
725
|
-
codePoint >= 11503 && codePoint <= 11505 || // Coptic combining marks
|
|
726
|
-
codePoint >= 11647 && codePoint <= 11647 || // Tifinagh combining marks
|
|
727
|
-
codePoint >= 11744 && codePoint <= 11775 || // Cyrillic Extended-A combining marks
|
|
728
|
-
codePoint >= 42607 && codePoint <= 42610 || // Cyrillic Extended-B combining marks
|
|
729
|
-
codePoint >= 42612 && codePoint <= 42621 || // Cyrillic Extended-B combining marks
|
|
730
|
-
codePoint >= 42654 && codePoint <= 42655 || // Cyrillic Extended-B combining marks
|
|
731
|
-
codePoint >= 42736 && codePoint <= 42737 || // Bamum combining marks
|
|
732
|
-
codePoint >= 43010 && codePoint <= 43010 || // Syloti Nagri combining marks
|
|
733
|
-
codePoint >= 43014 && codePoint <= 43014 || // Syloti Nagri combining marks
|
|
734
|
-
codePoint >= 43019 && codePoint <= 43019 || // Syloti Nagri combining marks
|
|
735
|
-
codePoint >= 43045 && codePoint <= 43046 || // Syloti Nagri combining marks
|
|
736
|
-
codePoint >= 43204 && codePoint <= 43204 || // Saurashtra combining marks
|
|
737
|
-
codePoint >= 43232 && codePoint <= 43249 || // Devanagari Extended combining marks
|
|
738
|
-
codePoint >= 43302 && codePoint <= 43309 || // Kayah Li combining marks
|
|
739
|
-
codePoint >= 43335 && codePoint <= 43345 || // Rejang combining marks
|
|
740
|
-
codePoint >= 43392 && codePoint <= 43394 || // Javanese combining marks
|
|
741
|
-
codePoint >= 43443 && codePoint <= 43443 || // Javanese combining marks
|
|
742
|
-
codePoint >= 43446 && codePoint <= 43449 || // Javanese combining marks
|
|
743
|
-
codePoint >= 43452 && codePoint <= 43452 || // Javanese combining marks
|
|
744
|
-
codePoint >= 43561 && codePoint <= 43566 || // Cham combining marks
|
|
745
|
-
codePoint >= 43569 && codePoint <= 43570 || // Cham combining marks
|
|
746
|
-
codePoint >= 43573 && codePoint <= 43574 || // Cham combining marks
|
|
747
|
-
codePoint >= 43587 && codePoint <= 43587 || // Cham combining marks
|
|
748
|
-
codePoint >= 43596 && codePoint <= 43596 || // Cham combining marks
|
|
749
|
-
codePoint >= 43696 && codePoint <= 43696 || // Tai Viet combining marks
|
|
750
|
-
codePoint >= 43698 && codePoint <= 43700 || // Tai Viet combining marks
|
|
751
|
-
codePoint >= 43703 && codePoint <= 43704 || // Tai Viet combining marks
|
|
752
|
-
codePoint >= 43710 && codePoint <= 43711 || // Tai Viet combining marks
|
|
753
|
-
codePoint >= 43713 && codePoint <= 43713 || // Tai Viet combining marks
|
|
754
|
-
codePoint >= 44005 && codePoint <= 44005 || // Meetei Mayek combining marks
|
|
755
|
-
codePoint >= 44008 && codePoint <= 44008 || // Meetei Mayek combining marks
|
|
756
|
-
codePoint >= 44013 && codePoint <= 44013 || // Meetei Mayek combining marks
|
|
757
|
-
codePoint >= 64286 && codePoint <= 64286 || // Hebrew combining marks
|
|
758
|
-
codePoint >= 65024 && codePoint <= 65039 || // Variation Selectors
|
|
759
|
-
codePoint >= 65056 && codePoint <= 65071 || // Combining Half Marks
|
|
760
|
-
codePoint >= 917760 && codePoint <= 917999) {
|
|
761
|
-
return 0;
|
|
762
|
-
}
|
|
763
|
-
if (codePoint >= 4352 && codePoint <= 4447 || // Hangul Jamo
|
|
764
|
-
codePoint >= 9001 && codePoint <= 9002 || // Left/Right-pointing angle bracket
|
|
765
|
-
codePoint >= 11904 && codePoint <= 12350 || // CJK Radicals Supplement, Kangxi Radicals, CJK Symbols
|
|
766
|
-
codePoint >= 12352 && codePoint <= 13247 || // Hiragana, Katakana, Bopomofo, Hangul Compatibility, Kanbun, CJK Strokes, Enclosed CJK
|
|
767
|
-
codePoint >= 13312 && codePoint <= 19903 || // CJK Unified Ideographs Extension A
|
|
768
|
-
codePoint >= 19968 && codePoint <= 42191 || // CJK Unified Ideographs, Yi Syllables, Yi Radicals
|
|
769
|
-
codePoint >= 43360 && codePoint <= 43388 || // Hangul Jamo Extended-A
|
|
770
|
-
codePoint >= 44032 && codePoint <= 55203 || // Hangul Syllables
|
|
771
|
-
codePoint >= 63744 && codePoint <= 64255 || // CJK Compatibility Ideographs
|
|
772
|
-
codePoint >= 65040 && codePoint <= 65049 || // Vertical forms
|
|
773
|
-
codePoint >= 65072 && codePoint <= 65135 || // CJK Compatibility Forms, Small Form Variants
|
|
774
|
-
codePoint >= 65281 && codePoint <= 65376 || // Fullwidth Forms
|
|
775
|
-
codePoint >= 65504 && codePoint <= 65510 || // Fullwidth Signs
|
|
776
|
-
codePoint >= 110592 && codePoint <= 111359 || // Kana Supplement, Kana Extended-A, Small Kana Extension
|
|
777
|
-
codePoint >= 126980 && codePoint <= 126980 || // Mahjong tile
|
|
778
|
-
codePoint >= 127183 && codePoint <= 127183 || // Playing card
|
|
779
|
-
codePoint >= 127232 && codePoint <= 129535 || // Enclosed Alphanumeric Supplement, Emoticons, Transport, etc.
|
|
780
|
-
codePoint >= 129536 && codePoint <= 129647 || // Chess Symbols
|
|
781
|
-
codePoint >= 129648 && codePoint <= 129791 || // Symbols and Pictographs Extended-A
|
|
782
|
-
codePoint >= 131072 && codePoint <= 196605 || // CJK Unified Ideographs Extension B–G, CJK Compatibility Supplement
|
|
783
|
-
codePoint >= 196608 && codePoint <= 262141) {
|
|
784
|
-
return 2;
|
|
785
|
-
}
|
|
786
|
-
return 1;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
610
|
// src/ui/markdown.tsx
|
|
790
611
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
791
612
|
function MarkdownViewInner({ text }) {
|
|
@@ -1167,6 +988,7 @@ import { useRef as useRef3 } from "react";
|
|
|
1167
988
|
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1168
989
|
function TaskStatusLine({ block, interactive }) {
|
|
1169
990
|
const running = block.state === "running";
|
|
991
|
+
const { stdout } = useStdout();
|
|
1170
992
|
const foreground = interactive && (block.activity === "model" || block.task?.role === "main");
|
|
1171
993
|
const [ref, time] = useAnimationFrame(running && foreground ? 120 : null);
|
|
1172
994
|
const startedAt = useRef3(void 0);
|
|
@@ -1176,7 +998,7 @@ function TaskStatusLine({ block, interactive }) {
|
|
|
1176
998
|
previousState.current = block.state;
|
|
1177
999
|
const elapsed = block.startedAt === void 0 ? startedAt.current === void 0 ? 0 : Math.max(0, time - startedAt.current) : Math.max(0, Date.now() - block.startedAt);
|
|
1178
1000
|
const presentation = statusPresentation(block, elapsed, foreground);
|
|
1179
|
-
const { statusLabel, statusColor, text } = presentation;
|
|
1001
|
+
const { metaColor, metaLabel, statusLabel, statusColor, text } = presentation;
|
|
1180
1002
|
let before = text;
|
|
1181
1003
|
let after = "";
|
|
1182
1004
|
if (statusLabel !== void 0) {
|
|
@@ -1187,21 +1009,51 @@ function TaskStatusLine({ block, interactive }) {
|
|
|
1187
1009
|
before = before.slice(0, idx);
|
|
1188
1010
|
}
|
|
1189
1011
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1012
|
+
const thinking = block.thinkingText;
|
|
1013
|
+
const thinkingVisible = running && block.activity === "model" && thinking !== void 0 && thinking.length > 0;
|
|
1014
|
+
const thinkingScroll = useRef3({ start: 0, lastTime: time });
|
|
1015
|
+
if (!thinkingVisible) {
|
|
1016
|
+
thinkingScroll.current = { start: 0, lastTime: time };
|
|
1017
|
+
}
|
|
1018
|
+
const thinkingLine = thinkingVisible ? (() => {
|
|
1019
|
+
const previous = thinkingScroll.current;
|
|
1020
|
+
const state = thinkingWindow(thinking, previous.start, {
|
|
1021
|
+
width: Math.max(8, (stdout.columns ?? 80) - 8),
|
|
1022
|
+
dtMs: time - previous.lastTime
|
|
1023
|
+
});
|
|
1024
|
+
thinkingScroll.current = { start: state.start, lastTime: time };
|
|
1025
|
+
return state.text;
|
|
1026
|
+
})() : void 0;
|
|
1027
|
+
return /* @__PURE__ */ jsxs2(Box_default, { flexDirection: "column", children: [
|
|
1028
|
+
/* @__PURE__ */ jsxs2(Box_default, { ref, flexDirection: "row", children: [
|
|
1029
|
+
/* @__PURE__ */ jsxs2(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: [
|
|
1030
|
+
presentation.glyph,
|
|
1031
|
+
" "
|
|
1032
|
+
] }),
|
|
1033
|
+
presentation.badge ? /* @__PURE__ */ jsxs2(Text, { color: presentation.badgeColor, children: [
|
|
1034
|
+
presentation.badge,
|
|
1035
|
+
" "
|
|
1036
|
+
] }) : null,
|
|
1037
|
+
/* @__PURE__ */ jsx3(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: before }),
|
|
1038
|
+
statusLabel !== void 0 ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
1039
|
+
/* @__PURE__ */ jsx3(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: " \xB7 " }),
|
|
1040
|
+
/* @__PURE__ */ jsx3(Text, { color: statusColor ?? presentation.color, children: statusLabel })
|
|
1041
|
+
] }) : null,
|
|
1042
|
+
after ? /* @__PURE__ */ jsx3(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: after }) : null,
|
|
1043
|
+
metaLabel === void 0 ? null : /* @__PURE__ */ jsxs2(Text, { color: metaColor ?? "ansi:blackBright", children: [
|
|
1044
|
+
" ",
|
|
1045
|
+
metaLabel
|
|
1046
|
+
] })
|
|
1194
1047
|
] }),
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
after ? /* @__PURE__ */ jsx3(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: after }) : null
|
|
1048
|
+
thinkingLine === void 0 ? null : /* @__PURE__ */ jsx3(ThinkingLineView, { text: thinkingLine })
|
|
1049
|
+
] });
|
|
1050
|
+
}
|
|
1051
|
+
var THINKING_RAIL = "#416f84";
|
|
1052
|
+
var THINKING_TEXT = "#91a0a8";
|
|
1053
|
+
function ThinkingLineView({ text }) {
|
|
1054
|
+
return /* @__PURE__ */ jsxs2(Box_default, { flexDirection: "row", children: [
|
|
1055
|
+
/* @__PURE__ */ jsx3(Text, { color: THINKING_RAIL, children: "\u2502 " }),
|
|
1056
|
+
/* @__PURE__ */ jsx3(Text, { color: THINKING_TEXT, wrap: "truncate-end", children: text })
|
|
1205
1057
|
] });
|
|
1206
1058
|
}
|
|
1207
1059
|
function TaskProgressPanel({
|
|
@@ -1257,7 +1109,7 @@ function slashCandidatePresentation(selected) {
|
|
|
1257
1109
|
matchStyle: { color: "ansi:cyan", bold: true }
|
|
1258
1110
|
};
|
|
1259
1111
|
}
|
|
1260
|
-
function buildSlashCandidates(commands, plugins, skills) {
|
|
1112
|
+
function buildSlashCandidates(commands, plugins, skills, tools = []) {
|
|
1261
1113
|
const candidates = /* @__PURE__ */ new Map();
|
|
1262
1114
|
for (const command of commands) {
|
|
1263
1115
|
candidates.set(command.name, { name: command.name, kind: "command", description: command.description });
|
|
@@ -1267,6 +1119,11 @@ function buildSlashCandidates(commands, plugins, skills) {
|
|
|
1267
1119
|
candidates.set(plugin.name, plugin.description === void 0 ? { name: plugin.name, kind: "plugin" } : { name: plugin.name, kind: "plugin", description: plugin.description });
|
|
1268
1120
|
}
|
|
1269
1121
|
}
|
|
1122
|
+
for (const tool of tools) {
|
|
1123
|
+
if (!candidates.has(tool.name)) {
|
|
1124
|
+
candidates.set(tool.name, tool.description === void 0 ? { name: tool.name, kind: "tool" } : { name: tool.name, kind: "tool", description: tool.description });
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1270
1127
|
for (const skill of skills) {
|
|
1271
1128
|
if (!candidates.has(skill.name)) {
|
|
1272
1129
|
candidates.set(skill.name, {
|
|
@@ -1850,7 +1707,8 @@ function appRuntimeOptions(props, output, onApprovalChange) {
|
|
|
1850
1707
|
...props.palAlias === void 0 ? {} : { alias: props.palAlias }
|
|
1851
1708
|
},
|
|
1852
1709
|
output,
|
|
1853
|
-
onApprovalChange
|
|
1710
|
+
onApprovalChange,
|
|
1711
|
+
onToolsChange: onApprovalChange
|
|
1854
1712
|
};
|
|
1855
1713
|
}
|
|
1856
1714
|
function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
@@ -1890,8 +1748,10 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1890
1748
|
const closing = useRef4(false);
|
|
1891
1749
|
const clipboardBusy = useRef4(false);
|
|
1892
1750
|
const textBuf = useRef4({ pending: "", timer: null });
|
|
1751
|
+
const thinkingBuf = useRef4({ pending: "", timer: null });
|
|
1893
1752
|
useTerminalTitle("Flavor Code");
|
|
1894
1753
|
const flushText = () => {
|
|
1754
|
+
flushThinking();
|
|
1895
1755
|
const t = textBuf.current;
|
|
1896
1756
|
if (t.timer !== null) {
|
|
1897
1757
|
clearTimeout(t.timer);
|
|
@@ -1902,6 +1762,21 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1902
1762
|
t.pending = "";
|
|
1903
1763
|
}
|
|
1904
1764
|
};
|
|
1765
|
+
const flushThinking = () => {
|
|
1766
|
+
const t = thinkingBuf.current;
|
|
1767
|
+
if (t.timer !== null) {
|
|
1768
|
+
clearTimeout(t.timer);
|
|
1769
|
+
t.timer = null;
|
|
1770
|
+
}
|
|
1771
|
+
if (t.pending.length > 0) {
|
|
1772
|
+
dispatch({ type: "session", event: { type: "thinking", text: t.pending } });
|
|
1773
|
+
t.pending = "";
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
const flushStreamBuffers = () => {
|
|
1777
|
+
flushThinking();
|
|
1778
|
+
flushText();
|
|
1779
|
+
};
|
|
1905
1780
|
const shutdown = async (active) => {
|
|
1906
1781
|
if (closing.current) return;
|
|
1907
1782
|
closing.current = true;
|
|
@@ -1928,7 +1803,7 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1928
1803
|
return;
|
|
1929
1804
|
}
|
|
1930
1805
|
if (event.type === "clear") {
|
|
1931
|
-
|
|
1806
|
+
flushStreamBuffers();
|
|
1932
1807
|
dispatch({ type: "clear" });
|
|
1933
1808
|
return;
|
|
1934
1809
|
}
|
|
@@ -1938,7 +1813,13 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1938
1813
|
if (t.timer === null) t.timer = setTimeout(flushText, FLUSH_MS);
|
|
1939
1814
|
return;
|
|
1940
1815
|
}
|
|
1941
|
-
|
|
1816
|
+
if (event.type === "thinking") {
|
|
1817
|
+
const t = thinkingBuf.current;
|
|
1818
|
+
t.pending += event.text;
|
|
1819
|
+
if (t.timer === null) t.timer = setTimeout(flushThinking, FLUSH_MS);
|
|
1820
|
+
return;
|
|
1821
|
+
}
|
|
1822
|
+
flushStreamBuffers();
|
|
1942
1823
|
dispatch({ type: "session", event });
|
|
1943
1824
|
};
|
|
1944
1825
|
void createProductionRuntime(appRuntimeOptions({
|
|
@@ -1954,13 +1835,23 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1954
1835
|
}
|
|
1955
1836
|
dispatch({ type: "restore", state: created.restoredTranscript });
|
|
1956
1837
|
runtimeRef.current = created;
|
|
1957
|
-
setSlashCandidates(buildSlashCandidates(
|
|
1838
|
+
setSlashCandidates(buildSlashCandidates(
|
|
1839
|
+
BUILTIN_SLASH_CANDIDATES,
|
|
1840
|
+
created.services.pluginCommands(),
|
|
1841
|
+
[],
|
|
1842
|
+
created.services.managedToolCommands()
|
|
1843
|
+
));
|
|
1958
1844
|
setRuntime(created);
|
|
1959
1845
|
await created.session.start();
|
|
1960
1846
|
try {
|
|
1961
1847
|
const skills = await created.services.skills();
|
|
1962
1848
|
if (!disposed) {
|
|
1963
|
-
setSlashCandidates(buildSlashCandidates(
|
|
1849
|
+
setSlashCandidates(buildSlashCandidates(
|
|
1850
|
+
BUILTIN_SLASH_CANDIDATES,
|
|
1851
|
+
created.services.pluginCommands(),
|
|
1852
|
+
skills,
|
|
1853
|
+
created.services.managedToolCommands()
|
|
1854
|
+
));
|
|
1964
1855
|
}
|
|
1965
1856
|
} catch {
|
|
1966
1857
|
}
|
|
@@ -1975,6 +1866,28 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
1975
1866
|
`));
|
|
1976
1867
|
};
|
|
1977
1868
|
}, [workspace, home, resumeSession, instanceId, palAlias]);
|
|
1869
|
+
useEffect3(() => {
|
|
1870
|
+
if (runtime === void 0) return;
|
|
1871
|
+
let disposed = false;
|
|
1872
|
+
void runtime.services.skills().then((skills) => {
|
|
1873
|
+
if (!disposed) setSlashCandidates(buildSlashCandidates(
|
|
1874
|
+
BUILTIN_SLASH_CANDIDATES,
|
|
1875
|
+
runtime.services.pluginCommands(),
|
|
1876
|
+
skills,
|
|
1877
|
+
runtime.services.managedToolCommands()
|
|
1878
|
+
));
|
|
1879
|
+
}).catch(() => {
|
|
1880
|
+
if (!disposed) setSlashCandidates(buildSlashCandidates(
|
|
1881
|
+
BUILTIN_SLASH_CANDIDATES,
|
|
1882
|
+
runtime.services.pluginCommands(),
|
|
1883
|
+
[],
|
|
1884
|
+
runtime.services.managedToolCommands()
|
|
1885
|
+
));
|
|
1886
|
+
});
|
|
1887
|
+
return () => {
|
|
1888
|
+
disposed = true;
|
|
1889
|
+
};
|
|
1890
|
+
}, [runtime, revision]);
|
|
1978
1891
|
useEffect3(() => installSigintHandler(process, interrupt), [interrupt]);
|
|
1979
1892
|
useEffect3(() => {
|
|
1980
1893
|
if (runtime?.services.ideContext === void 0) {
|
|
@@ -2347,7 +2260,6 @@ function App({ workspace, home, resumeSession, instanceId, palAlias }) {
|
|
|
2347
2260
|
setDismissedMentionInput(void 0);
|
|
2348
2261
|
}
|
|
2349
2262
|
});
|
|
2350
|
-
void revision;
|
|
2351
2263
|
if (runtime === void 0) return /* @__PURE__ */ jsx5(
|
|
2352
2264
|
StartingLayout,
|
|
2353
2265
|
{
|
|
@@ -28,16 +28,14 @@ function statusPresentation(block, elapsedMs, interactive) {
|
|
|
28
28
|
if (block.state === "running" && block.activity === "model") {
|
|
29
29
|
return interactive ? {
|
|
30
30
|
glyph: activityFrame(elapsedMs),
|
|
31
|
-
text:
|
|
31
|
+
text: "Flavoring",
|
|
32
32
|
color: "#81c8f2",
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
metaLabel: formatElapsed(elapsedMs),
|
|
34
|
+
metaColor: "ansi:blackBright"
|
|
35
35
|
} : {
|
|
36
36
|
glyph: "\xB7",
|
|
37
|
-
text: "Flavoring
|
|
38
|
-
color: "#81c8f2"
|
|
39
|
-
statusLabel: "thinking",
|
|
40
|
-
statusColor: "ansi:blackBright"
|
|
37
|
+
text: "Flavoring",
|
|
38
|
+
color: "#81c8f2"
|
|
41
39
|
};
|
|
42
40
|
}
|
|
43
41
|
if (block.state === "running" && block.task !== void 0) {
|
|
@@ -33,6 +33,13 @@ var ProviderConfigSchema = z.object({
|
|
|
33
33
|
cheapModel: z.string().min(1).optional(),
|
|
34
34
|
models: z.array(z.string().min(1)).max(100).optional(),
|
|
35
35
|
maxOutputTokens: z.number().int().positive().optional(),
|
|
36
|
+
// Extended-thinking budget in output tokens for the Anthropic protocol.
|
|
37
|
+
// Defaults to DEFAULT_THINKING_BUDGET; set to 0 to disable the request
|
|
38
|
+
// parameter. Provider thinking deltas are forwarded whenever they arrive.
|
|
39
|
+
thinkingBudget: z.number().int().min(0).optional(),
|
|
40
|
+
// Reasoning effort requested from the OpenAI Responses protocol. Omitted by
|
|
41
|
+
// default so strict compatible gateways never see an unknown parameter.
|
|
42
|
+
thinkingEffort: z.enum(["low", "medium", "high"]).optional(),
|
|
36
43
|
// Send the Claude Code client fingerprint (User-Agent/x-app) with Anthropic requests,
|
|
37
44
|
// for gateways that restrict the Anthropic protocol to Claude clients.
|
|
38
45
|
claudeClient: z.boolean().optional(),
|