zidane 5.12.5 → 5.12.6
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/tui.d.ts.map +1 -1
- package/dist/tui.js +136 -28
- package/dist/tui.js.map +1 -1
- package/package.json +6 -6
package/dist/tui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.d.ts","names":[],"sources":["../src/tui/agent-picker.tsx","../src/tui/app.tsx","../src/tui/completion-popup.tsx","../src/tui/components.tsx","../src/tui/effort-picker.tsx","../src/tui/interaction-block.tsx","../src/tui/mcps-settings.tsx","../src/tui/modal.tsx","../src/tui/model-options-picker.tsx","../src/tui/model-picker.tsx","../src/tui/screens.tsx","../src/tui/session-details-modal.tsx","../src/tui/settings-modal.tsx","../src/tui/skills-settings.tsx","../src/tui/theme.ts","../src/tui/toggle-list-modal.tsx","../src/tui/turn-details-modal.tsx","../src/tui/index.tsx"],"mappings":";;;;;;;;;;;;;;;AAoBA;;;;iBAAgB,gBAAA,CAAA;EACd,MAAA;EACA,cAAA;EACA;AAAA;EAEA,MAAA,EAAQ,aAAA;EACR,cAAA;EACA,MAAA,GAAS,EAAA;AAAA,oBACV,SAAA;;;;;;;;;;;iBCyOe,GAAA,CAAA;EAAM;AAAA;EAAY,MAAA,EAAQ,cAAc;AAAA,oBAAE,SAAA;;;;;;;;;ADjP1D;;;;;;;;;;;;;;;;;;;;iBEYgB,eAAA,CAAA;EACd,KAAA;kFAEA;AAAA;EAEA,KAAA,EAAO,eAAA;EACP,WAAA;AAAA,IACD,SAAA;;;;;;;;AFnBD;
|
|
1
|
+
{"version":3,"file":"tui.d.ts","names":[],"sources":["../src/tui/agent-picker.tsx","../src/tui/app.tsx","../src/tui/completion-popup.tsx","../src/tui/components.tsx","../src/tui/effort-picker.tsx","../src/tui/interaction-block.tsx","../src/tui/mcps-settings.tsx","../src/tui/modal.tsx","../src/tui/model-options-picker.tsx","../src/tui/model-picker.tsx","../src/tui/screens.tsx","../src/tui/session-details-modal.tsx","../src/tui/settings-modal.tsx","../src/tui/skills-settings.tsx","../src/tui/theme.ts","../src/tui/toggle-list-modal.tsx","../src/tui/turn-details-modal.tsx","../src/tui/index.tsx"],"mappings":";;;;;;;;;;;;;;;AAoBA;;;;iBAAgB,gBAAA,CAAA;EACd,MAAA;EACA,cAAA;EACA;AAAA;EAEA,MAAA,EAAQ,aAAA;EACR,cAAA;EACA,MAAA,GAAS,EAAA;AAAA,oBACV,SAAA;;;;;;;;;;;iBCyOe,GAAA,CAAA;EAAM;AAAA;EAAY,MAAA,EAAQ,cAAc;AAAA,oBAAE,SAAA;;;;;;;;;ADjP1D;;;;;;;;;;;;;;;;;;;;iBEYgB,eAAA,CAAA;EACd,KAAA;kFAEA;AAAA;EAEA,KAAA,EAAO,eAAA;EACP,WAAA;AAAA,IACD,SAAA;;;;;;;;AFnBD;iBGuFgB,aAAA,CAAc,OAAgC,GAAtB,KAAA;AAAA,UAYvB,YAAA;EACf,IAAA;EACA,GAAG;AAAA;;;;;;;iBASW,MAAA,CAAA;EACd,KAAA;EACA,OAAA;EACA,IAAA;EACA;AAAA;EAEA,KAAA,EAAO,IAAA;EACP,OAAA,EAAS,YAAA;EHhHT;;;;;EGsHA,IAAA;EHnHD;AAAA;;;;ACyOD;EE/GE,MAAA;AAAA,IACD,SAAA;;;;;;;;AF8GyD;;;;ACrO1D;;;iBCmOgB,eAAA,CAAgB,KAAA,WAAgB,IAAA,IAAQ,KAAA,EAAO,WAAA,GAAc,SAAA;;;;;;;;UAoE5D,WAAA;EACf,IAAA;EDnSA;ECqSA,KAAK;AAAA;;;ADnSN;;;;ACoED;;;;AAA8D;AAY9D;;;;AAEK;AASL;;;;;;;;;;;;;;;;;;;;;;;iBAiQgB,YAAA,CAAA;EACd,KAAA;EACA,IAAA;EACA,UAAA;EACA,WAAA;EACA,UAAA;EACA;AAAA;EAEA,KAAA,UArPA;EAuPA,IAAA,qBAAyB,WAAA,WAt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OAAA,EAAS,uBAAA,EhBjEY;EgBmErB,WAAA,EAAa,WAAA;AAAA,oBACd,SAAA;;;;;;;;;;AhBzED;;;;;;;;;;;;;;;;;;;;;;AAQC;;;;ACyOD;;;;;;;;;;AAA0D;;;;iBgBrLpC,MAAA,CAAO,OAAA,GAAS,OAAA,CAAQ,WAAA,IAAoB,OAAA"}
|
package/dist/tui.js
CHANGED
|
@@ -824,7 +824,7 @@ function useChipHighlights(textareaRef, references, chipStyle) {
|
|
|
824
824
|
* same-turn events read as one continuous highlighted block instead of a
|
|
825
825
|
* striped list.
|
|
826
826
|
*/
|
|
827
|
-
const EventLine = memo(({ event, previous, depthOffset = 0, selected = false, anchorId, hideChildLabel = false }) => {
|
|
827
|
+
const EventLine = memo(({ event, previous, depthOffset = 0, selected = false, anchorId, hideChildLabel = false, settleCodeEpoch = 0 }) => {
|
|
828
828
|
const SURFACE = useSurfaces();
|
|
829
829
|
const gap = marginTopFor(event, previous);
|
|
830
830
|
return /* @__PURE__ */ jsx("box", {
|
|
@@ -842,7 +842,8 @@ const EventLine = memo(({ event, previous, depthOffset = 0, selected = false, an
|
|
|
842
842
|
previous,
|
|
843
843
|
depthOffset,
|
|
844
844
|
hideChildLabel,
|
|
845
|
-
selected
|
|
845
|
+
selected,
|
|
846
|
+
settleCodeEpoch
|
|
846
847
|
})
|
|
847
848
|
});
|
|
848
849
|
});
|
|
@@ -1212,6 +1213,25 @@ function Transcript({ events, settings, selectedTurnId = null, busy = false }) {
|
|
|
1212
1213
|
const COLOR = useColors();
|
|
1213
1214
|
const items = useMemo(() => partitionTranscript(events, settings), [events, settings]);
|
|
1214
1215
|
const showThrobber = busy && settings.showThrobber;
|
|
1216
|
+
const codeSettle = useRef({
|
|
1217
|
+
wasBusy: false,
|
|
1218
|
+
epoch: 0,
|
|
1219
|
+
activeTargets: /* @__PURE__ */ new Set(),
|
|
1220
|
+
targets: /* @__PURE__ */ new Set()
|
|
1221
|
+
});
|
|
1222
|
+
const lastUserPromptIndex = events.findLastIndex((event) => event.kind === "user-prompt");
|
|
1223
|
+
if (busy) {
|
|
1224
|
+
if (!codeSettle.current.wasBusy) codeSettle.current.activeTargets.clear();
|
|
1225
|
+
for (let i = Math.max(0, lastUserPromptIndex + 1); i < events.length; i++) {
|
|
1226
|
+
const event = events[i];
|
|
1227
|
+
if (event?.kind === "markdown") codeSettle.current.activeTargets.add(event);
|
|
1228
|
+
}
|
|
1229
|
+
} else if (codeSettle.current.wasBusy) {
|
|
1230
|
+
codeSettle.current.epoch += 1;
|
|
1231
|
+
codeSettle.current.targets = new Set(codeSettle.current.activeTargets);
|
|
1232
|
+
codeSettle.current.activeTargets.clear();
|
|
1233
|
+
}
|
|
1234
|
+
codeSettle.current.wasBusy = busy;
|
|
1215
1235
|
const throbberLabel = events.length > 0 && events[events.length - 1].kind === "thinking" ? "Thinking" : void 0;
|
|
1216
1236
|
const ownership = useMemo(() => turnSelectionOwnership(events), [events]);
|
|
1217
1237
|
const scrollboxRef = useRef(null);
|
|
@@ -1258,13 +1278,16 @@ function Transcript({ events, settings, selectedTurnId = null, busy = false }) {
|
|
|
1258
1278
|
event: item.event,
|
|
1259
1279
|
previous: item.previous,
|
|
1260
1280
|
selected: isTurnHighlighted(item.event, selectedTurnId, ownership),
|
|
1261
|
-
anchorId: anchors.ids[i][0]
|
|
1281
|
+
anchorId: anchors.ids[i][0],
|
|
1282
|
+
settleCodeEpoch: codeSettle.current.targets.has(item.event) ? codeSettle.current.epoch : 0
|
|
1262
1283
|
}, i);
|
|
1263
1284
|
return /* @__PURE__ */ jsx(SubagentBlock, {
|
|
1264
1285
|
events: item.events,
|
|
1265
1286
|
previous: item.previous,
|
|
1266
1287
|
selectedTurnId,
|
|
1267
|
-
anchorIds: anchors.ids[i]
|
|
1288
|
+
anchorIds: anchors.ids[i],
|
|
1289
|
+
codeSettleTargets: codeSettle.current.targets,
|
|
1290
|
+
codeSettleEpoch: codeSettle.current.epoch
|
|
1268
1291
|
}, i);
|
|
1269
1292
|
}), showThrobber && /* @__PURE__ */ jsx("box", {
|
|
1270
1293
|
style: { marginTop: items.length > 0 ? 1 : 0 },
|
|
@@ -1332,7 +1355,7 @@ function partitionTranscript(events, settings) {
|
|
|
1332
1355
|
* indented twice. Grandchildren (depth ≥ 2) still indent further, so
|
|
1333
1356
|
* nested subagents remain visually distinct.
|
|
1334
1357
|
*/
|
|
1335
|
-
function SubagentBlock({ events, previous, selectedTurnId = null, anchorIds }) {
|
|
1358
|
+
function SubagentBlock({ events, previous, selectedTurnId = null, anchorIds, codeSettleTargets, codeSettleEpoch = 0 }) {
|
|
1336
1359
|
const COLOR = useColors();
|
|
1337
1360
|
const childIds = useMemo(() => {
|
|
1338
1361
|
const set = /* @__PURE__ */ new Set();
|
|
@@ -1362,7 +1385,8 @@ function SubagentBlock({ events, previous, selectedTurnId = null, anchorIds }) {
|
|
|
1362
1385
|
depthOffset: 1,
|
|
1363
1386
|
selected: selectedTurnId !== null && evt.turnId === selectedTurnId,
|
|
1364
1387
|
anchorId: anchorIds?.[i],
|
|
1365
|
-
hideChildLabel
|
|
1388
|
+
hideChildLabel,
|
|
1389
|
+
settleCodeEpoch: codeSettleTargets?.has(evt) ? codeSettleEpoch : 0
|
|
1366
1390
|
}, i))
|
|
1367
1391
|
});
|
|
1368
1392
|
}
|
|
@@ -1405,7 +1429,7 @@ function rowStyle(paddingLeft) {
|
|
|
1405
1429
|
alignSelf: "stretch"
|
|
1406
1430
|
};
|
|
1407
1431
|
}
|
|
1408
|
-
function EventLineImpl({ event, previous, depthOffset = 0, hideChildLabel = false, selected = false }) {
|
|
1432
|
+
function EventLineImpl({ event, previous, depthOffset = 0, hideChildLabel = false, selected = false, settleCodeEpoch = 0 }) {
|
|
1409
1433
|
const COLOR = useColors();
|
|
1410
1434
|
const { settings } = useSettings();
|
|
1411
1435
|
const safeText = event.text === "" ? " " : event.text;
|
|
@@ -1498,7 +1522,8 @@ function EventLineImpl({ event, previous, depthOffset = 0, hideChildLabel = fals
|
|
|
1498
1522
|
children: /* @__PURE__ */ jsx(MarkdownBlock, {
|
|
1499
1523
|
text: event.text,
|
|
1500
1524
|
dim: child,
|
|
1501
|
-
selected
|
|
1525
|
+
selected,
|
|
1526
|
+
settleCodeEpoch
|
|
1502
1527
|
})
|
|
1503
1528
|
});
|
|
1504
1529
|
case "spawn-start": return /* @__PURE__ */ jsx("box", {
|
|
@@ -1796,10 +1821,8 @@ const COPY_FEEDBACK_MS = 1200;
|
|
|
1796
1821
|
* lives entirely inside OpenTUI — React doesn't see the wrapper.
|
|
1797
1822
|
*
|
|
1798
1823
|
* The accessor pairs below mirror the CodeRenderable surface (`content`,
|
|
1799
|
-
* `filetype`, `syntaxStyle`, `fg`, `bg`, `conceal`, `streaming`)
|
|
1800
|
-
*
|
|
1801
|
-
* properties on the wrapper for every delta — lands on the body where
|
|
1802
|
-
* it produces visible output.
|
|
1824
|
+
* `filetype`, `syntaxStyle`, `fg`, `bg`, `conceal`, `streaming`) for any
|
|
1825
|
+
* OpenTUI style refreshes that write through the wrapper.
|
|
1803
1826
|
*
|
|
1804
1827
|
* Two of those forwarders deliberately ignore the value the markdown
|
|
1805
1828
|
* writes:
|
|
@@ -1924,6 +1947,21 @@ var CodeBlockWrapper = class extends BoxRenderable {
|
|
|
1924
1947
|
this.langLabel.fg = colors.mute;
|
|
1925
1948
|
this.button.fg = this.copied ? colors.accent : colors.warn;
|
|
1926
1949
|
}
|
|
1950
|
+
/**
|
|
1951
|
+
* Streaming code bodies intentionally preserve the previous styled buffer
|
|
1952
|
+
* while async highlighting catches up. On run finalization, force one
|
|
1953
|
+
* synchronous plain-text pass with the final content so the body height and
|
|
1954
|
+
* visible text cannot stay stuck on an earlier partial chunk.
|
|
1955
|
+
*/
|
|
1956
|
+
settleFinalContent() {
|
|
1957
|
+
if (this.isDestroyed || this.body.isDestroyed) return;
|
|
1958
|
+
const content = this.latestContent;
|
|
1959
|
+
this.body.streaming = false;
|
|
1960
|
+
this.body.drawUnstyledText = true;
|
|
1961
|
+
if (this.body.content === content) this.body.content = content.length > 0 ? `${content}\n` : " ";
|
|
1962
|
+
this.body.content = content;
|
|
1963
|
+
this.body.requestRender();
|
|
1964
|
+
}
|
|
1927
1965
|
disableInitialPlainTextFallback() {
|
|
1928
1966
|
if (!this.initialPlainTextFallback) return;
|
|
1929
1967
|
this.initialPlainTextFallback = false;
|
|
@@ -2044,9 +2082,9 @@ const BLOCK_ID_INDEX_RE = /-block-(\d+)$/;
|
|
|
2044
2082
|
* we got from `context.defaultRender()`, mutated in place.
|
|
2045
2083
|
*
|
|
2046
2084
|
* Critical: we MUST return the renderable we mutated, not `undefined`.
|
|
2047
|
-
* OpenTUI
|
|
2048
|
-
* value,
|
|
2049
|
-
*
|
|
2085
|
+
* OpenTUI falls back to a fresh default renderable when `renderNode`
|
|
2086
|
+
* returns a falsy value, so anything we mutated via `defaultRender()` is
|
|
2087
|
+
* thrown away.
|
|
2050
2088
|
*
|
|
2051
2089
|
* Tables: returning the default `TextTableRenderable` looks like it
|
|
2052
2090
|
* should orphan the markdown's `tableContentCache` tuple (incremental
|
|
@@ -2056,12 +2094,8 @@ const BLOCK_ID_INDEX_RE = /-block-(\d+)$/;
|
|
|
2056
2094
|
* safely mutate + return the table renderable too, and the spacing
|
|
2057
2095
|
* rule applies uniformly.
|
|
2058
2096
|
*
|
|
2059
|
-
* Every non-first block gets `marginTop: 1
|
|
2060
|
-
*
|
|
2061
|
-
* parser's space tokens — coalesced mode + `renderNode` strips them
|
|
2062
|
-
* (see the file-level comment), so we recompute the spacing ourselves.
|
|
2063
|
-
* The result is bit-identical to top-level mode for every
|
|
2064
|
-
* well-formatted markdown source.
|
|
2097
|
+
* Every non-first block gets `marginTop: 1`; this keeps custom code wrappers
|
|
2098
|
+
* visually aligned with top-level markdown's normal paragraph/code spacing.
|
|
2065
2099
|
*/
|
|
2066
2100
|
function makeMarkdownRenderNode(bag) {
|
|
2067
2101
|
return (token, context) => {
|
|
@@ -2123,7 +2157,7 @@ function parseBlockIndex(id) {
|
|
|
2123
2157
|
const parsed = Number.parseInt(match[1] ?? "", 10);
|
|
2124
2158
|
return Number.isFinite(parsed) ? parsed : 0;
|
|
2125
2159
|
}
|
|
2126
|
-
const MarkdownBlock = memo(({ text, dim, selected = false }) => {
|
|
2160
|
+
const MarkdownBlock = memo(({ text, dim, selected = false, settleCodeEpoch = 0 }) => {
|
|
2127
2161
|
const COLOR = useColors();
|
|
2128
2162
|
const SURFACE = useSurfaces();
|
|
2129
2163
|
const mdStyle = useMdStyle({
|
|
@@ -2144,12 +2178,16 @@ const MarkdownBlock = memo(({ text, dim, selected = false }) => {
|
|
|
2144
2178
|
useEffect(() => {
|
|
2145
2179
|
for (const wrapper of bag.current.wrappers) wrapper.applyTheme(COLOR, SURFACE);
|
|
2146
2180
|
}, [COLOR, SURFACE]);
|
|
2181
|
+
useEffect(() => {
|
|
2182
|
+
if (settleCodeEpoch <= 0) return;
|
|
2183
|
+
for (const wrapper of bag.current.wrappers) wrapper.settleFinalContent();
|
|
2184
|
+
}, [settleCodeEpoch]);
|
|
2147
2185
|
const renderNode = useMemo(() => makeMarkdownRenderNode(bag), []);
|
|
2148
2186
|
return /* @__PURE__ */ jsx("markdown", {
|
|
2149
2187
|
content,
|
|
2150
2188
|
syntaxStyle: mdStyle,
|
|
2151
2189
|
streaming: true,
|
|
2152
|
-
internalBlockMode: "
|
|
2190
|
+
internalBlockMode: "top-level",
|
|
2153
2191
|
fg: dim ? COLOR.dim : void 0,
|
|
2154
2192
|
bg: selected ? SURFACE.selection : SURFACE.background,
|
|
2155
2193
|
renderNode
|
|
@@ -5328,7 +5366,7 @@ function PlanInteractionBlock({ request, onResolve }) {
|
|
|
5328
5366
|
}), " back to decision"]
|
|
5329
5367
|
})
|
|
5330
5368
|
]
|
|
5331
|
-
});
|
|
5369
|
+
}, "comment");
|
|
5332
5370
|
const stepsBlock = steps && steps.length > 0 ? /* @__PURE__ */ jsxs("box", {
|
|
5333
5371
|
style: {
|
|
5334
5372
|
flexDirection: "column",
|
|
@@ -5432,7 +5470,7 @@ function PlanInteractionBlock({ request, onResolve }) {
|
|
|
5432
5470
|
onPick
|
|
5433
5471
|
})
|
|
5434
5472
|
]
|
|
5435
|
-
});
|
|
5473
|
+
}, "pick");
|
|
5436
5474
|
}
|
|
5437
5475
|
/**
|
|
5438
5476
|
* Cap the question-wizard's height to ~60% of the terminal so the
|
|
@@ -13763,6 +13801,78 @@ const EXTRA_PARSERS = [
|
|
|
13763
13801
|
aliases: ["ex", "exs"],
|
|
13764
13802
|
wasm: "https://github.com/elixir-lang/tree-sitter-elixir/releases/download/v0.3.4/tree-sitter-elixir.wasm",
|
|
13765
13803
|
queries: { highlights: ["https://raw.githubusercontent.com/elixir-lang/tree-sitter-elixir/v0.3.4/queries/highlights.scm"] }
|
|
13804
|
+
},
|
|
13805
|
+
{
|
|
13806
|
+
filetype: "ruby",
|
|
13807
|
+
aliases: ["rb"],
|
|
13808
|
+
wasm: "https://github.com/tree-sitter/tree-sitter-ruby/releases/download/v0.23.1/tree-sitter-ruby.wasm",
|
|
13809
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter/tree-sitter-ruby/v0.23.1/queries/highlights.scm"] }
|
|
13810
|
+
},
|
|
13811
|
+
{
|
|
13812
|
+
filetype: "lua",
|
|
13813
|
+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-lua/releases/download/v0.5.0/tree-sitter-lua.wasm",
|
|
13814
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-lua/v0.5.0/queries/highlights.scm"] }
|
|
13815
|
+
},
|
|
13816
|
+
{
|
|
13817
|
+
filetype: "toml",
|
|
13818
|
+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-toml/releases/download/v0.7.0/tree-sitter-toml.wasm",
|
|
13819
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-toml/v0.7.0/queries/highlights.scm"] }
|
|
13820
|
+
},
|
|
13821
|
+
{
|
|
13822
|
+
filetype: "diff",
|
|
13823
|
+
aliases: ["patch"],
|
|
13824
|
+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-diff/releases/download/v0.1.0/tree-sitter-diff.wasm",
|
|
13825
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-diff/v0.1.0/queries/highlights.scm"] }
|
|
13826
|
+
},
|
|
13827
|
+
{
|
|
13828
|
+
filetype: "scala",
|
|
13829
|
+
aliases: ["sbt", "sc"],
|
|
13830
|
+
wasm: "https://github.com/tree-sitter/tree-sitter-scala/releases/download/v0.26.0/tree-sitter-scala.wasm",
|
|
13831
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter/tree-sitter-scala/v0.26.0/queries/highlights.scm"] }
|
|
13832
|
+
},
|
|
13833
|
+
{
|
|
13834
|
+
filetype: "julia",
|
|
13835
|
+
aliases: ["jl"],
|
|
13836
|
+
wasm: "https://github.com/tree-sitter/tree-sitter-julia/releases/download/v0.25.0/tree-sitter-julia.wasm",
|
|
13837
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter/tree-sitter-julia/v0.25.0/queries/highlights.scm"] }
|
|
13838
|
+
},
|
|
13839
|
+
{
|
|
13840
|
+
filetype: "ocaml",
|
|
13841
|
+
aliases: ["ml"],
|
|
13842
|
+
wasm: "https://github.com/tree-sitter/tree-sitter-ocaml/releases/download/v0.24.2/tree-sitter-ocaml.wasm",
|
|
13843
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter/tree-sitter-ocaml/v0.24.2/queries/highlights.scm"] }
|
|
13844
|
+
},
|
|
13845
|
+
{
|
|
13846
|
+
filetype: "r",
|
|
13847
|
+
wasm: "https://github.com/r-lib/tree-sitter-r/releases/download/v1.2.0/tree-sitter-r.wasm",
|
|
13848
|
+
queries: { highlights: ["https://raw.githubusercontent.com/r-lib/tree-sitter-r/v1.2.0/queries/highlights.scm"] }
|
|
13849
|
+
},
|
|
13850
|
+
{
|
|
13851
|
+
filetype: "perl",
|
|
13852
|
+
aliases: ["pl", "pm"],
|
|
13853
|
+
wasm: "https://github.com/tree-sitter-perl/tree-sitter-perl/releases/download/v1.1.2/tree-sitter-perl.wasm",
|
|
13854
|
+
queries: { highlights: ["https://raw.githubusercontent.com/tree-sitter-perl/tree-sitter-perl/v1.1.2/queries/highlights.scm"] }
|
|
13855
|
+
},
|
|
13856
|
+
{
|
|
13857
|
+
filetype: "swift",
|
|
13858
|
+
wasm: "https://github.com/alex-pinkus/tree-sitter-swift/releases/download/0.7.2-pypi/tree-sitter-swift.wasm",
|
|
13859
|
+
queries: { highlights: ["https://raw.githubusercontent.com/alex-pinkus/tree-sitter-swift/0.7.2-pypi/queries/highlights.scm"] }
|
|
13860
|
+
},
|
|
13861
|
+
{
|
|
13862
|
+
filetype: "kotlin",
|
|
13863
|
+
aliases: ["kt", "kts"],
|
|
13864
|
+
wasm: "https://github.com/fwcd/tree-sitter-kotlin/releases/download/0.3.8/tree-sitter-kotlin.wasm",
|
|
13865
|
+
queries: { highlights: ["https://raw.githubusercontent.com/fwcd/tree-sitter-kotlin/0.3.8/queries/highlights.scm"] }
|
|
13866
|
+
},
|
|
13867
|
+
{
|
|
13868
|
+
filetype: "fsharp",
|
|
13869
|
+
aliases: [
|
|
13870
|
+
"fs",
|
|
13871
|
+
"fsx",
|
|
13872
|
+
"fsi"
|
|
13873
|
+
],
|
|
13874
|
+
wasm: "https://github.com/ionide/tree-sitter-fsharp/releases/download/0.3.0/tree-sitter-fsharp.wasm",
|
|
13875
|
+
queries: { highlights: ["https://raw.githubusercontent.com/ionide/tree-sitter-fsharp/0.3.0/queries/highlights.scm"] }
|
|
13766
13876
|
}
|
|
13767
13877
|
];
|
|
13768
13878
|
const LOCAL_PARSERS = [{
|
|
@@ -14868,7 +14978,7 @@ async function runTui(options = {}) {
|
|
|
14868
14978
|
bootTick("runTui:enter");
|
|
14869
14979
|
registerTreeSitterParsers();
|
|
14870
14980
|
bootTick("runTui:after-registerTreeSitterParsers");
|
|
14871
|
-
|
|
14981
|
+
initTreeSitterWorker().catch((err) => {
|
|
14872
14982
|
process.stderr.write(`[zidane/tui] tree-sitter setup failed: ${errorMessage(err)}\n`);
|
|
14873
14983
|
});
|
|
14874
14984
|
const config = resolveConfig({
|
|
@@ -14892,8 +15002,6 @@ async function runTui(options = {}) {
|
|
|
14892
15002
|
gatherStats
|
|
14893
15003
|
});
|
|
14894
15004
|
bootTick("runTui:after-createCliRenderer");
|
|
14895
|
-
await treeSitterReady;
|
|
14896
|
-
bootTick("runTui:after-treeSitterWorker");
|
|
14897
15005
|
try {
|
|
14898
15006
|
createRoot(renderer).render(/* @__PURE__ */ jsx(App, { config }));
|
|
14899
15007
|
} catch (err) {
|