@phenx-inc/ctlsurf 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -2
- package/bin/ctlsurf-worker.js +243 -44
- package/out/headless/index.mjs +1033 -128
- package/out/headless/index.mjs.map +4 -4
- package/out/main/index.js +933 -17
- package/out/preload/index.js +15 -0
- package/out/renderer/assets/{cssMode-BtQxI2Eb.js → cssMode-BJfoToLX.js} +3 -3
- package/out/renderer/assets/{freemarker2-DRW5dmY5.js → freemarker2-T0eMtP1Z.js} +1 -1
- package/out/renderer/assets/{handlebars-CFLF3cP7.js → handlebars-Dbbib8fi.js} +1 -1
- package/out/renderer/assets/{html-DtnBOkwp.js → html-BRHT_oxc.js} +1 -1
- package/out/renderer/assets/{htmlMode-DMVysDCg.js → htmlMode-BRlZTxME.js} +3 -3
- package/out/renderer/assets/{index-CEjwKjtd.css → index-CBWAeUYW.css} +91 -0
- package/out/renderer/assets/{index-Dm70hk5s.js → index-RCAeuJTr.js} +476 -411
- package/out/renderer/assets/{javascript-ChlyA1sf.js → javascript-BbOZOxq9.js} +2 -2
- package/out/renderer/assets/{jsonMode-D1_oHzeN.js → jsonMode-CUvAeYcT.js} +3 -3
- package/out/renderer/assets/{liquid-D4ftdy1G.js → liquid-DRIACo_s.js} +1 -1
- package/out/renderer/assets/{lspLanguageFeatures-Ckqu5ubG.js → lspLanguageFeatures-Ds-3nH9p.js} +1 -1
- package/out/renderer/assets/{mdx-B9wsVYSC.js → mdx-D76jlpLO.js} +1 -1
- package/out/renderer/assets/{python-e23tD6IS.js → python-CMuRPKJi.js} +1 -1
- package/out/renderer/assets/{razor-CrDyXj3d.js → razor-DRoH5mal.js} +1 -1
- package/out/renderer/assets/{tsMode-BwGC5o4O.js → tsMode-dPJzgFD7.js} +1 -1
- package/out/renderer/assets/{typescript-Do-98d_O.js → typescript-D5USKnLj.js} +1 -1
- package/out/renderer/assets/{xml-Dpdu5R3m.js → xml-qYg1wt2P.js} +1 -1
- package/out/renderer/assets/{yaml-B0Zt7LCJ.js → yaml-Uc-CvnvL.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/package.json +4 -2
- package/scripts/check-work-map-gpu.cjs +62 -0
- package/scripts/check-work-map-gpu.d.cts +13 -0
- package/scripts/postinstall.cjs +44 -0
- package/scripts/prepare-work-map.py +49 -0
- package/scripts/setup-ui.cjs +161 -0
- package/scripts/test-work-map-capability.cjs +45 -0
- package/scripts/test-work-map-ui.cjs +130 -0
- package/scripts/test-work-map.cjs +352 -0
- package/scripts/work-map-clef.py +81 -0
- package/scripts/work-map-setup.cjs +127 -0
- package/src/main/index.ts +43 -1
- package/src/main/observer/observer.ts +2 -0
- package/src/main/orchestrator.ts +39 -4
- package/src/main/transcripts.ts +35 -16
- package/src/main/workMap/clef.ts +156 -0
- package/src/main/workMap/normalize.ts +172 -0
- package/src/main/workMap/source.ts +28 -0
- package/src/main/workMap/tree.ts +199 -0
- package/src/main/workMap/workMap.ts +244 -0
- package/src/preload/index.ts +17 -0
- package/src/renderer/App.tsx +15 -16
- package/src/renderer/components/ObserverPanel.tsx +3 -0
- package/src/renderer/components/SettingsDialog.tsx +0 -104
- package/src/renderer/components/WorkMapPanel.tsx +235 -0
- package/src/renderer/components/WorkMapToggle.tsx +50 -0
- package/src/renderer/lib/workMapHighlights.ts +41 -0
- package/src/renderer/styles.css +91 -0
- package/src/shared/workMap.d.ts +70 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cssMode-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cssMode-BJfoToLX.js","./lspLanguageFeatures-Ds-3nH9p.js","./htmlMode-BRlZTxME.js","./jsonMode-CUvAeYcT.js","./javascript-BbOZOxq9.js","./typescript-D5USKnLj.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function getDefaultExportFromCjs(x) {
|
|
3
3
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
4
|
}
|
|
@@ -208471,7 +208471,7 @@ const lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
208471
208471
|
modeConfigurationDefault$2
|
|
208472
208472
|
);
|
|
208473
208473
|
function getMode$3() {
|
|
208474
|
-
return __vitePreload(() => import("./cssMode-
|
|
208474
|
+
return __vitePreload(() => import("./cssMode-BJfoToLX.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url);
|
|
208475
208475
|
}
|
|
208476
208476
|
languages.onLanguage("less", () => {
|
|
208477
208477
|
getMode$3().then((mode2) => mode2.setupMode(lessDefaults));
|
|
@@ -208576,7 +208576,7 @@ const razorLanguageService = registerHTMLLanguageService(
|
|
|
208576
208576
|
);
|
|
208577
208577
|
const razorDefaults = razorLanguageService.defaults;
|
|
208578
208578
|
function getMode$2() {
|
|
208579
|
-
return __vitePreload(() => import("./htmlMode-
|
|
208579
|
+
return __vitePreload(() => import("./htmlMode-BRlZTxME.js"), true ? __vite__mapDeps([2,1]) : void 0, import.meta.url);
|
|
208580
208580
|
}
|
|
208581
208581
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
208582
208582
|
const defaults = new LanguageServiceDefaultsImpl$2(languageId, options, modeConfiguration);
|
|
@@ -208660,7 +208660,7 @@ const jsonDefaults = new LanguageServiceDefaultsImpl$1(
|
|
|
208660
208660
|
);
|
|
208661
208661
|
const getWorker$1 = () => getMode$1().then((mode2) => mode2.getWorker());
|
|
208662
208662
|
function getMode$1() {
|
|
208663
|
-
return __vitePreload(() => import("./jsonMode-
|
|
208663
|
+
return __vitePreload(() => import("./jsonMode-CUvAeYcT.js"), true ? __vite__mapDeps([3,1]) : void 0, import.meta.url);
|
|
208664
208664
|
}
|
|
208665
208665
|
languages.register({
|
|
208666
208666
|
id: "json",
|
|
@@ -208906,7 +208906,7 @@ const getJavaScriptWorker = () => {
|
|
|
208906
208906
|
return getMode().then((mode) => mode.getJavaScriptWorker());
|
|
208907
208907
|
};
|
|
208908
208908
|
function getMode() {
|
|
208909
|
-
return __vitePreload(() => import("./tsMode-
|
|
208909
|
+
return __vitePreload(() => import("./tsMode-dPJzgFD7.js"), true ? [] : void 0, import.meta.url);
|
|
208910
208910
|
}
|
|
208911
208911
|
languages.onLanguage("typescript", () => {
|
|
208912
208912
|
return getMode().then((mode) => mode.setupTypeScript(typescriptDefaults));
|
|
@@ -209101,49 +209101,49 @@ registerLanguage({
|
|
|
209101
209101
|
extensions: [".ftl", ".ftlh", ".ftlx"],
|
|
209102
209102
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
209103
209103
|
loader: () => {
|
|
209104
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209104
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
|
|
209105
209105
|
}
|
|
209106
209106
|
});
|
|
209107
209107
|
registerLanguage({
|
|
209108
209108
|
id: "freemarker2.tag-angle.interpolation-dollar",
|
|
209109
209109
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
209110
209110
|
loader: () => {
|
|
209111
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209111
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationDollar);
|
|
209112
209112
|
}
|
|
209113
209113
|
});
|
|
209114
209114
|
registerLanguage({
|
|
209115
209115
|
id: "freemarker2.tag-bracket.interpolation-dollar",
|
|
209116
209116
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
209117
209117
|
loader: () => {
|
|
209118
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209118
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationDollar);
|
|
209119
209119
|
}
|
|
209120
209120
|
});
|
|
209121
209121
|
registerLanguage({
|
|
209122
209122
|
id: "freemarker2.tag-angle.interpolation-bracket",
|
|
209123
209123
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
209124
209124
|
loader: () => {
|
|
209125
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209125
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAngleInterpolationBracket);
|
|
209126
209126
|
}
|
|
209127
209127
|
});
|
|
209128
209128
|
registerLanguage({
|
|
209129
209129
|
id: "freemarker2.tag-bracket.interpolation-bracket",
|
|
209130
209130
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
209131
209131
|
loader: () => {
|
|
209132
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209132
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagBracketInterpolationBracket);
|
|
209133
209133
|
}
|
|
209134
209134
|
});
|
|
209135
209135
|
registerLanguage({
|
|
209136
209136
|
id: "freemarker2.tag-auto.interpolation-dollar",
|
|
209137
209137
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
209138
209138
|
loader: () => {
|
|
209139
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209139
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationDollar);
|
|
209140
209140
|
}
|
|
209141
209141
|
});
|
|
209142
209142
|
registerLanguage({
|
|
209143
209143
|
id: "freemarker2.tag-auto.interpolation-bracket",
|
|
209144
209144
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
209145
209145
|
loader: () => {
|
|
209146
|
-
return __vitePreload(() => import("./freemarker2-
|
|
209146
|
+
return __vitePreload(() => import("./freemarker2-T0eMtP1Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.TagAutoInterpolationBracket);
|
|
209147
209147
|
}
|
|
209148
209148
|
});
|
|
209149
209149
|
registerLanguage({
|
|
@@ -209164,7 +209164,7 @@ registerLanguage({
|
|
|
209164
209164
|
extensions: [".handlebars", ".hbs"],
|
|
209165
209165
|
aliases: ["Handlebars", "handlebars", "hbs"],
|
|
209166
209166
|
mimetypes: ["text/x-handlebars-template"],
|
|
209167
|
-
loader: () => __vitePreload(() => import("./handlebars-
|
|
209167
|
+
loader: () => __vitePreload(() => import("./handlebars-Dbbib8fi.js"), true ? [] : void 0, import.meta.url)
|
|
209168
209168
|
});
|
|
209169
209169
|
registerLanguage({
|
|
209170
209170
|
id: "hcl",
|
|
@@ -209177,7 +209177,7 @@ registerLanguage({
|
|
|
209177
209177
|
extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
|
|
209178
209178
|
aliases: ["HTML", "htm", "html", "xhtml"],
|
|
209179
209179
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
209180
|
-
loader: () => __vitePreload(() => import("./html-
|
|
209180
|
+
loader: () => __vitePreload(() => import("./html-BRHT_oxc.js"), true ? [] : void 0, import.meta.url)
|
|
209181
209181
|
});
|
|
209182
209182
|
registerLanguage({
|
|
209183
209183
|
id: "ini",
|
|
@@ -209200,7 +209200,7 @@ registerLanguage({
|
|
|
209200
209200
|
filenames: ["jakefile"],
|
|
209201
209201
|
aliases: ["JavaScript", "javascript", "js"],
|
|
209202
209202
|
mimetypes: ["text/javascript"],
|
|
209203
|
-
loader: () => __vitePreload(() => import("./javascript-
|
|
209203
|
+
loader: () => __vitePreload(() => import("./javascript-BbOZOxq9.js"), true ? __vite__mapDeps([4,5]) : void 0, import.meta.url)
|
|
209204
209204
|
});
|
|
209205
209205
|
registerLanguage({
|
|
209206
209206
|
id: "julia",
|
|
@@ -209239,7 +209239,7 @@ registerLanguage({
|
|
|
209239
209239
|
extensions: [".liquid", ".html.liquid"],
|
|
209240
209240
|
aliases: ["Liquid", "liquid"],
|
|
209241
209241
|
mimetypes: ["application/liquid"],
|
|
209242
|
-
loader: () => __vitePreload(() => import("./liquid-
|
|
209242
|
+
loader: () => __vitePreload(() => import("./liquid-DRIACo_s.js"), true ? [] : void 0, import.meta.url)
|
|
209243
209243
|
});
|
|
209244
209244
|
registerLanguage({
|
|
209245
209245
|
id: "m3",
|
|
@@ -209257,7 +209257,7 @@ registerLanguage({
|
|
|
209257
209257
|
id: "mdx",
|
|
209258
209258
|
extensions: [".mdx"],
|
|
209259
209259
|
aliases: ["MDX", "mdx"],
|
|
209260
|
-
loader: () => __vitePreload(() => import("./mdx-
|
|
209260
|
+
loader: () => __vitePreload(() => import("./mdx-D76jlpLO.js"), true ? [] : void 0, import.meta.url)
|
|
209261
209261
|
});
|
|
209262
209262
|
registerLanguage({
|
|
209263
209263
|
id: "mips",
|
|
@@ -209356,7 +209356,7 @@ registerLanguage({
|
|
|
209356
209356
|
extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
|
|
209357
209357
|
aliases: ["Python", "py"],
|
|
209358
209358
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
209359
|
-
loader: () => __vitePreload(() => import("./python-
|
|
209359
|
+
loader: () => __vitePreload(() => import("./python-CMuRPKJi.js"), true ? [] : void 0, import.meta.url)
|
|
209360
209360
|
});
|
|
209361
209361
|
registerLanguage({
|
|
209362
209362
|
id: "qsharp",
|
|
@@ -209375,7 +209375,7 @@ registerLanguage({
|
|
|
209375
209375
|
extensions: [".cshtml"],
|
|
209376
209376
|
aliases: ["Razor", "razor"],
|
|
209377
209377
|
mimetypes: ["text/x-cshtml"],
|
|
209378
|
-
loader: () => __vitePreload(() => import("./razor-
|
|
209378
|
+
loader: () => __vitePreload(() => import("./razor-DRoH5mal.js"), true ? [] : void 0, import.meta.url)
|
|
209379
209379
|
});
|
|
209380
209380
|
registerLanguage({
|
|
209381
209381
|
id: "redis",
|
|
@@ -209508,7 +209508,7 @@ registerLanguage({
|
|
|
209508
209508
|
aliases: ["TypeScript", "ts", "typescript"],
|
|
209509
209509
|
mimetypes: ["text/typescript"],
|
|
209510
209510
|
loader: () => {
|
|
209511
|
-
return __vitePreload(() => import("./typescript-
|
|
209511
|
+
return __vitePreload(() => import("./typescript-D5USKnLj.js"), true ? [] : void 0, import.meta.url);
|
|
209512
209512
|
}
|
|
209513
209513
|
});
|
|
209514
209514
|
registerLanguage({
|
|
@@ -209553,14 +209553,14 @@ registerLanguage({
|
|
|
209553
209553
|
firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
|
|
209554
209554
|
aliases: ["XML", "xml"],
|
|
209555
209555
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
209556
|
-
loader: () => __vitePreload(() => import("./xml-
|
|
209556
|
+
loader: () => __vitePreload(() => import("./xml-qYg1wt2P.js"), true ? [] : void 0, import.meta.url)
|
|
209557
209557
|
});
|
|
209558
209558
|
registerLanguage({
|
|
209559
209559
|
id: "yaml",
|
|
209560
209560
|
extensions: [".yaml", ".yml"],
|
|
209561
209561
|
aliases: ["YAML", "yaml", "YML", "yml"],
|
|
209562
209562
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
209563
|
-
loader: () => __vitePreload(() => import("./yaml-
|
|
209563
|
+
loader: () => __vitePreload(() => import("./yaml-Uc-CvnvL.js"), true ? [] : void 0, import.meta.url)
|
|
209564
209564
|
});
|
|
209565
209565
|
var __defProp = Object.defineProperty;
|
|
209566
209566
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -211011,8 +211011,8 @@ var LspCompletionFeature = class extends Disposable2 {
|
|
|
211011
211011
|
preselectSupport: true
|
|
211012
211012
|
}
|
|
211013
211013
|
} } }));
|
|
211014
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCompletion, true, (
|
|
211015
|
-
return languages.registerCompletionItemProvider(toMonacoLanguageSelector(
|
|
211014
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCompletion, true, (capability2) => {
|
|
211015
|
+
return languages.registerCompletionItemProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspCompletionProvider(this._connection, capability2));
|
|
211016
211016
|
}));
|
|
211017
211017
|
}
|
|
211018
211018
|
};
|
|
@@ -211104,8 +211104,8 @@ var LspHoverFeature = class extends Disposable2 {
|
|
|
211104
211104
|
dynamicRegistration: true,
|
|
211105
211105
|
contentFormat: [MarkupKind.Markdown, MarkupKind.PlainText]
|
|
211106
211106
|
} } }));
|
|
211107
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentHover, true, (
|
|
211108
|
-
return languages.registerHoverProvider(toMonacoLanguageSelector(
|
|
211107
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentHover, true, (capability2) => {
|
|
211108
|
+
return languages.registerHoverProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspHoverProvider(this._connection, capability2));
|
|
211109
211109
|
}));
|
|
211110
211110
|
}
|
|
211111
211111
|
};
|
|
@@ -211160,8 +211160,8 @@ var LspSignatureHelpFeature = class extends Disposable2 {
|
|
|
211160
211160
|
activeParameterSupport: true
|
|
211161
211161
|
}
|
|
211162
211162
|
} } }));
|
|
211163
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSignatureHelp, true, (
|
|
211164
|
-
return languages.registerSignatureHelpProvider(toMonacoLanguageSelector(
|
|
211163
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSignatureHelp, true, (capability2) => {
|
|
211164
|
+
return languages.registerSignatureHelpProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspSignatureHelpProvider(this._connection, capability2));
|
|
211165
211165
|
}));
|
|
211166
211166
|
}
|
|
211167
211167
|
};
|
|
@@ -211221,8 +211221,8 @@ var LspDefinitionFeature = class extends Disposable2 {
|
|
|
211221
211221
|
dynamicRegistration: true,
|
|
211222
211222
|
linkSupport: true
|
|
211223
211223
|
} } }));
|
|
211224
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDefinition, true, (
|
|
211225
|
-
return languages.registerDefinitionProvider(toMonacoLanguageSelector(
|
|
211224
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDefinition, true, (capability2) => {
|
|
211225
|
+
return languages.registerDefinitionProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDefinitionProvider(this._connection, capability2));
|
|
211226
211226
|
}));
|
|
211227
211227
|
}
|
|
211228
211228
|
};
|
|
@@ -211250,8 +211250,8 @@ var LspDeclarationFeature = class extends Disposable2 {
|
|
|
211250
211250
|
dynamicRegistration: true,
|
|
211251
211251
|
linkSupport: true
|
|
211252
211252
|
} } }));
|
|
211253
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDeclaration, true, (
|
|
211254
|
-
return languages.registerDeclarationProvider(toMonacoLanguageSelector(
|
|
211253
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDeclaration, true, (capability2) => {
|
|
211254
|
+
return languages.registerDeclarationProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDeclarationProvider(this._connection, capability2));
|
|
211255
211255
|
}));
|
|
211256
211256
|
}
|
|
211257
211257
|
};
|
|
@@ -211279,8 +211279,8 @@ var LspTypeDefinitionFeature = class extends Disposable2 {
|
|
|
211279
211279
|
dynamicRegistration: true,
|
|
211280
211280
|
linkSupport: true
|
|
211281
211281
|
} } }));
|
|
211282
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentTypeDefinition, true, (
|
|
211283
|
-
return languages.registerTypeDefinitionProvider(toMonacoLanguageSelector(
|
|
211282
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentTypeDefinition, true, (capability2) => {
|
|
211283
|
+
return languages.registerTypeDefinitionProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspTypeDefinitionProvider(this._connection, capability2));
|
|
211284
211284
|
}));
|
|
211285
211285
|
}
|
|
211286
211286
|
};
|
|
@@ -211308,8 +211308,8 @@ var LspImplementationFeature = class extends Disposable2 {
|
|
|
211308
211308
|
dynamicRegistration: true,
|
|
211309
211309
|
linkSupport: true
|
|
211310
211310
|
} } }));
|
|
211311
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentImplementation, true, (
|
|
211312
|
-
return languages.registerImplementationProvider(toMonacoLanguageSelector(
|
|
211311
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentImplementation, true, (capability2) => {
|
|
211312
|
+
return languages.registerImplementationProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspImplementationProvider(this._connection, capability2));
|
|
211313
211313
|
}));
|
|
211314
211314
|
}
|
|
211315
211315
|
};
|
|
@@ -211334,8 +211334,8 @@ var LspReferencesFeature = class extends Disposable2 {
|
|
|
211334
211334
|
super();
|
|
211335
211335
|
this._connection = _connection;
|
|
211336
211336
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { references: { dynamicRegistration: true } } }));
|
|
211337
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentReferences, true, (
|
|
211338
|
-
return languages.registerReferenceProvider(toMonacoLanguageSelector(
|
|
211337
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentReferences, true, (capability2) => {
|
|
211338
|
+
return languages.registerReferenceProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspReferenceProvider(this._connection, capability2));
|
|
211339
211339
|
}));
|
|
211340
211340
|
}
|
|
211341
211341
|
};
|
|
@@ -211366,8 +211366,8 @@ var LspDocumentHighlightFeature = class extends Disposable2 {
|
|
|
211366
211366
|
super();
|
|
211367
211367
|
this._connection = _connection;
|
|
211368
211368
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { documentHighlight: { dynamicRegistration: true } } }));
|
|
211369
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentHighlight, true, (
|
|
211370
|
-
return languages.registerDocumentHighlightProvider(toMonacoLanguageSelector(
|
|
211369
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentHighlight, true, (capability2) => {
|
|
211370
|
+
return languages.registerDocumentHighlightProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDocumentHighlightProvider(this._connection, capability2));
|
|
211371
211371
|
}));
|
|
211372
211372
|
}
|
|
211373
211373
|
};
|
|
@@ -211399,8 +211399,8 @@ var LspDocumentSymbolFeature = class extends Disposable2 {
|
|
|
211399
211399
|
symbolKind: { valueSet: Array.from(lspSymbolKindToMonacoSymbolKind.keys()) },
|
|
211400
211400
|
tagSupport: { valueSet: [SymbolTag.Deprecated] }
|
|
211401
211401
|
} } }));
|
|
211402
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentSymbol, true, (
|
|
211403
|
-
return languages.registerDocumentSymbolProvider(toMonacoLanguageSelector(
|
|
211402
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentSymbol, true, (capability2) => {
|
|
211403
|
+
return languages.registerDocumentSymbolProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDocumentSymbolProvider(this._connection, capability2));
|
|
211404
211404
|
}));
|
|
211405
211405
|
}
|
|
211406
211406
|
};
|
|
@@ -211448,8 +211448,8 @@ var LspRenameFeature = class extends Disposable2 {
|
|
|
211448
211448
|
dynamicRegistration: true,
|
|
211449
211449
|
prepareSupport: true
|
|
211450
211450
|
} } }));
|
|
211451
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentRename, true, (
|
|
211452
|
-
return languages.registerRenameProvider(toMonacoLanguageSelector(
|
|
211451
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentRename, true, (capability2) => {
|
|
211452
|
+
return languages.registerRenameProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspRenameProvider(this._connection, capability2));
|
|
211453
211453
|
}));
|
|
211454
211454
|
}
|
|
211455
211455
|
};
|
|
@@ -211537,8 +211537,8 @@ var LspCodeActionFeature = class extends Disposable2 {
|
|
|
211537
211537
|
dataSupport: true,
|
|
211538
211538
|
resolveSupport: { properties: ["edit"] }
|
|
211539
211539
|
} } }));
|
|
211540
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeAction, true, (
|
|
211541
|
-
return languages.registerCodeActionProvider(toMonacoLanguageSelector(
|
|
211540
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeAction, true, (capability2) => {
|
|
211541
|
+
return languages.registerCodeActionProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspCodeActionProvider(this._connection, capability2));
|
|
211542
211542
|
}));
|
|
211543
211543
|
}
|
|
211544
211544
|
};
|
|
@@ -211636,8 +211636,8 @@ var LspCodeLensFeature = class extends Disposable2 {
|
|
|
211636
211636
|
super();
|
|
211637
211637
|
this._connection = _connection;
|
|
211638
211638
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { codeLens: { dynamicRegistration: true } } }));
|
|
211639
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeLens, true, (
|
|
211640
|
-
return languages.registerCodeLensProvider(toMonacoLanguageSelector(
|
|
211639
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentCodeLens, true, (capability2) => {
|
|
211640
|
+
return languages.registerCodeLensProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspCodeLensProvider(this._connection, capability2));
|
|
211641
211641
|
}));
|
|
211642
211642
|
}
|
|
211643
211643
|
};
|
|
@@ -211681,8 +211681,8 @@ var LspDocumentLinkFeature = class extends Disposable2 {
|
|
|
211681
211681
|
dynamicRegistration: true,
|
|
211682
211682
|
tooltipSupport: true
|
|
211683
211683
|
} } }));
|
|
211684
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentLink, true, (
|
|
211685
|
-
return languages.registerLinkProvider(toMonacoLanguageSelector(
|
|
211684
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDocumentLink, true, (capability2) => {
|
|
211685
|
+
return languages.registerLinkProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDocumentLinkProvider(this._connection, capability2));
|
|
211686
211686
|
}));
|
|
211687
211687
|
}
|
|
211688
211688
|
};
|
|
@@ -211711,8 +211711,8 @@ var LspFormattingFeature = class extends Disposable2 {
|
|
|
211711
211711
|
super();
|
|
211712
211712
|
this._connection = _connection;
|
|
211713
211713
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { formatting: { dynamicRegistration: true } } }));
|
|
211714
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFormatting, true, (
|
|
211715
|
-
return languages.registerDocumentFormattingEditProvider(toMonacoLanguageSelector(
|
|
211714
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFormatting, true, (capability2) => {
|
|
211715
|
+
return languages.registerDocumentFormattingEditProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDocumentFormattingProvider(this._connection, capability2));
|
|
211716
211716
|
}));
|
|
211717
211717
|
}
|
|
211718
211718
|
};
|
|
@@ -211742,8 +211742,8 @@ var LspRangeFormattingFeature = class extends Disposable2 {
|
|
|
211742
211742
|
super();
|
|
211743
211743
|
this._connection = _connection;
|
|
211744
211744
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { rangeFormatting: { dynamicRegistration: true } } }));
|
|
211745
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentRangeFormatting, true, (
|
|
211746
|
-
return languages.registerDocumentRangeFormattingEditProvider(toMonacoLanguageSelector(
|
|
211745
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentRangeFormatting, true, (capability2) => {
|
|
211746
|
+
return languages.registerDocumentRangeFormattingEditProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspDocumentRangeFormattingProvider(this._connection, capability2));
|
|
211747
211747
|
}));
|
|
211748
211748
|
}
|
|
211749
211749
|
};
|
|
@@ -211774,8 +211774,8 @@ var LspOnTypeFormattingFeature = class extends Disposable2 {
|
|
|
211774
211774
|
super();
|
|
211775
211775
|
this._connection = _connection;
|
|
211776
211776
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { onTypeFormatting: { dynamicRegistration: true } } }));
|
|
211777
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentOnTypeFormatting, true, (
|
|
211778
|
-
return languages.registerOnTypeFormattingEditProvider(toMonacoLanguageSelector(
|
|
211777
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentOnTypeFormatting, true, (capability2) => {
|
|
211778
|
+
return languages.registerOnTypeFormattingEditProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspOnTypeFormattingProvider(this._connection, capability2));
|
|
211779
211779
|
}));
|
|
211780
211780
|
}
|
|
211781
211781
|
};
|
|
@@ -211818,8 +211818,8 @@ var LspFoldingRangeFeature = class extends Disposable2 {
|
|
|
211818
211818
|
FoldingRangeKind2.Region
|
|
211819
211819
|
] }
|
|
211820
211820
|
} } }));
|
|
211821
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFoldingRange, true, (
|
|
211822
|
-
return languages.registerFoldingRangeProvider(toMonacoLanguageSelector(
|
|
211821
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentFoldingRange, true, (capability2) => {
|
|
211822
|
+
return languages.registerFoldingRangeProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspFoldingRangeProvider(this._connection, capability2));
|
|
211823
211823
|
}));
|
|
211824
211824
|
}
|
|
211825
211825
|
};
|
|
@@ -211844,8 +211844,8 @@ var LspSelectionRangeFeature = class extends Disposable2 {
|
|
|
211844
211844
|
super();
|
|
211845
211845
|
this._connection = _connection;
|
|
211846
211846
|
this._register(this._connection.capabilities.addStaticClientCapabilities({ textDocument: { selectionRange: { dynamicRegistration: true } } }));
|
|
211847
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSelectionRange, true, (
|
|
211848
|
-
return languages.registerSelectionRangeProvider(toMonacoLanguageSelector(
|
|
211847
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSelectionRange, true, (capability2) => {
|
|
211848
|
+
return languages.registerSelectionRangeProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspSelectionRangeProvider(this._connection, capability2));
|
|
211849
211849
|
}));
|
|
211850
211850
|
}
|
|
211851
211851
|
};
|
|
@@ -211895,10 +211895,10 @@ var LspInlayHintsFeature = class extends Disposable2 {
|
|
|
211895
211895
|
for (const provider of this._providers) provider.refresh();
|
|
211896
211896
|
return { ok: null };
|
|
211897
211897
|
}));
|
|
211898
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentInlayHint, true, (
|
|
211899
|
-
const provider = new LspInlayHintsProvider(this._connection,
|
|
211898
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentInlayHint, true, (capability2) => {
|
|
211899
|
+
const provider = new LspInlayHintsProvider(this._connection, capability2);
|
|
211900
211900
|
this._providers.add(provider);
|
|
211901
|
-
const disposable = languages.registerInlayHintsProvider(toMonacoLanguageSelector(
|
|
211901
|
+
const disposable = languages.registerInlayHintsProvider(toMonacoLanguageSelector(capability2.documentSelector), provider);
|
|
211902
211902
|
return { dispose: () => {
|
|
211903
211903
|
this._providers.delete(provider);
|
|
211904
211904
|
disposable.dispose();
|
|
@@ -212040,8 +212040,8 @@ var LspSemanticTokensFeature = class extends Disposable2 {
|
|
|
212040
212040
|
overlappingTokenSupport: false,
|
|
212041
212041
|
multilineTokenSupport: true
|
|
212042
212042
|
} } }));
|
|
212043
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSemanticTokensFull, true, (
|
|
212044
|
-
return languages.registerDocumentSemanticTokensProvider(toMonacoLanguageSelector(
|
|
212043
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentSemanticTokensFull, true, (capability2) => {
|
|
212044
|
+
return languages.registerDocumentSemanticTokensProvider(toMonacoLanguageSelector(capability2.documentSelector), new LspSemanticTokensProvider(this._connection, capability2));
|
|
212045
212045
|
}));
|
|
212046
212046
|
}
|
|
212047
212047
|
};
|
|
@@ -212112,19 +212112,19 @@ var LspDiagnosticsFeature = class extends Disposable2 {
|
|
|
212112
212112
|
} }));
|
|
212113
212113
|
debugger;
|
|
212114
212114
|
this._register(this._connection.connection.registerNotificationHandler(api.client.textDocumentPublishDiagnostics, (params) => this._handlePublishDiagnostics(params)));
|
|
212115
|
-
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDiagnostic, true, (
|
|
212115
|
+
this._register(this._connection.capabilities.registerCapabilityHandler(capabilities.textDocumentDiagnostic, true, (capability2) => {
|
|
212116
212116
|
const disposables = new DisposableStore2();
|
|
212117
|
-
for (const model of editor.getModels()) this._addPullDiagnosticProvider(model,
|
|
212117
|
+
for (const model of editor.getModels()) this._addPullDiagnosticProvider(model, capability2, disposables);
|
|
212118
212118
|
disposables.add(editor.onDidCreateModel((model) => {
|
|
212119
|
-
this._addPullDiagnosticProvider(model,
|
|
212119
|
+
this._addPullDiagnosticProvider(model, capability2, disposables);
|
|
212120
212120
|
}));
|
|
212121
212121
|
return disposables;
|
|
212122
212122
|
}));
|
|
212123
212123
|
}
|
|
212124
|
-
_addPullDiagnosticProvider(model,
|
|
212124
|
+
_addPullDiagnosticProvider(model, capability2, disposables) {
|
|
212125
212125
|
model.getLanguageId();
|
|
212126
|
-
if (!matchesDocumentSelector(model,
|
|
212127
|
-
const provider = new ModelDiagnosticProvider(model, this._connection, this._diagnosticsMarkerOwner,
|
|
212126
|
+
if (!matchesDocumentSelector(model, capability2.documentSelector)) return;
|
|
212127
|
+
const provider = new ModelDiagnosticProvider(model, this._connection, this._diagnosticsMarkerOwner, capability2);
|
|
212128
212128
|
this._pullDiagnosticProviders.set(model, provider);
|
|
212129
212129
|
disposables.add(provider);
|
|
212130
212130
|
disposables.add(model.onWillDispose(() => {
|
|
@@ -212231,16 +212231,16 @@ var LspCapabilitiesRegistry = class extends Disposable2 {
|
|
|
212231
212231
|
this._connection = _connection;
|
|
212232
212232
|
this._register(this._connection.registerRequestHandler(api.client.clientRegisterCapability, async (params) => {
|
|
212233
212233
|
for (const registration of params.registrations) {
|
|
212234
|
-
const
|
|
212235
|
-
const r = new CapabilityRegistration(registration.id,
|
|
212234
|
+
const capability2 = getCapabilityByMethod(registration.method);
|
|
212235
|
+
const r = new CapabilityRegistration(registration.id, capability2, registration.registerOptions, false);
|
|
212236
212236
|
this._registerCapabilityOptions(r);
|
|
212237
212237
|
}
|
|
212238
212238
|
return { ok: null };
|
|
212239
212239
|
}));
|
|
212240
212240
|
this._register(this._connection.registerRequestHandler(api.client.clientUnregisterCapability, async (params) => {
|
|
212241
212241
|
for (const unregistration of params.unregisterations) {
|
|
212242
|
-
const
|
|
212243
|
-
const info = this._registrations.get(
|
|
212242
|
+
const capability2 = getCapabilityByMethod(unregistration.method);
|
|
212243
|
+
const info = this._registrations.get(capability2);
|
|
212244
212244
|
const handlerInfo = info?.registrations.get(unregistration.id);
|
|
212245
212245
|
if (!handlerInfo) throw new Error(`No registration for method ${unregistration.method} with id ${unregistration.id}`);
|
|
212246
212246
|
handlerInfo?.handlerDisposables.forEach((d) => d.dispose());
|
|
@@ -212275,20 +212275,20 @@ var LspCapabilitiesRegistry = class extends Disposable2 {
|
|
|
212275
212275
|
for (const c of this._staticCapabilities) deepAssign(result, c.cap);
|
|
212276
212276
|
return result;
|
|
212277
212277
|
}
|
|
212278
|
-
addStaticClientCapabilities(
|
|
212279
|
-
const obj = { cap:
|
|
212278
|
+
addStaticClientCapabilities(capability2) {
|
|
212279
|
+
const obj = { cap: capability2 };
|
|
212280
212280
|
this._staticCapabilities.add(obj);
|
|
212281
212281
|
return { dispose: () => {
|
|
212282
212282
|
this._staticCapabilities.delete(obj);
|
|
212283
212283
|
} };
|
|
212284
212284
|
}
|
|
212285
|
-
registerCapabilityHandler(
|
|
212286
|
-
let info = this._registrations.get(
|
|
212285
|
+
registerCapabilityHandler(capability2, handleStaticCapability, handler) {
|
|
212286
|
+
let info = this._registrations.get(capability2);
|
|
212287
212287
|
if (!info) {
|
|
212288
212288
|
info = new CapabilityInfo();
|
|
212289
|
-
this._registrations.set(
|
|
212289
|
+
this._registrations.set(capability2, info);
|
|
212290
212290
|
}
|
|
212291
|
-
const handlerInfo = new CapabilityHandler(
|
|
212291
|
+
const handlerInfo = new CapabilityHandler(capability2, handleStaticCapability, handler);
|
|
212292
212292
|
info.handlers.add(handlerInfo);
|
|
212293
212293
|
for (const registration of info.registrations.values()) {
|
|
212294
212294
|
if (!handlerInfo.handleStaticCapability && registration.isFromStatic) continue;
|
|
@@ -212307,17 +212307,17 @@ var LspCapabilitiesRegistry = class extends Disposable2 {
|
|
|
212307
212307
|
}
|
|
212308
212308
|
};
|
|
212309
212309
|
var CapabilityHandler = class {
|
|
212310
|
-
constructor(
|
|
212311
|
-
this.capability =
|
|
212310
|
+
constructor(capability2, handleStaticCapability, handler) {
|
|
212311
|
+
this.capability = capability2;
|
|
212312
212312
|
this.handleStaticCapability = handleStaticCapability;
|
|
212313
212313
|
this.handler = handler;
|
|
212314
212314
|
}
|
|
212315
212315
|
};
|
|
212316
212316
|
var CapabilityRegistration = class {
|
|
212317
|
-
constructor(id,
|
|
212317
|
+
constructor(id, capability2, options, isFromStatic) {
|
|
212318
212318
|
__publicField(this, "handlerDisposables", /* @__PURE__ */ new Map());
|
|
212319
212319
|
this.id = id;
|
|
212320
|
-
this.capability =
|
|
212320
|
+
this.capability = capability2;
|
|
212321
212321
|
this.options = options;
|
|
212322
212322
|
this.isFromStatic = isFromStatic;
|
|
212323
212323
|
}
|
|
@@ -212383,12 +212383,12 @@ var DynamicFromStaticOptions = class DynamicFromStaticOptions2 {
|
|
|
212383
212383
|
o.set(capabilities.workspaceExecuteCommand, (s) => s.executeCommandProvider);
|
|
212384
212384
|
return o;
|
|
212385
212385
|
}
|
|
212386
|
-
set(
|
|
212387
|
-
if (this._mappings.has(
|
|
212388
|
-
this._mappings.set(
|
|
212386
|
+
set(capability2, getOptionsFromStatic) {
|
|
212387
|
+
if (this._mappings.has(capability2.method)) throw new Error(`Capability for method ${capability2.method} already registered`);
|
|
212388
|
+
this._mappings.set(capability2.method, getOptionsFromStatic);
|
|
212389
212389
|
}
|
|
212390
|
-
getOptions(
|
|
212391
|
-
const getter = this._mappings.get(
|
|
212390
|
+
getOptions(capability2, serverCapabilities) {
|
|
212391
|
+
const getter = this._mappings.get(capability2.method);
|
|
212392
212392
|
if (!getter) return;
|
|
212393
212393
|
return getter(serverCapabilities);
|
|
212394
212394
|
}
|
|
@@ -214194,54 +214194,20 @@ function SettingsDialog({ open, onClose }) {
|
|
|
214194
214194
|
const [idleTimeoutMin, setIdleTimeoutMin] = reactExports.useState(15);
|
|
214195
214195
|
const [saved, setSaved] = reactExports.useState(false);
|
|
214196
214196
|
const [version, setVersion] = reactExports.useState("");
|
|
214197
|
-
const [obsEnabled, setObsEnabled] = reactExports.useState(false);
|
|
214198
|
-
const [obsApiKey, setObsApiKey] = reactExports.useState("");
|
|
214199
|
-
const [obsHasKey, setObsHasKey] = reactExports.useState(false);
|
|
214200
|
-
const [obsKeySource, setObsKeySource] = reactExports.useState(null);
|
|
214201
|
-
const [obsCapUsd, setObsCapUsd] = reactExports.useState(1);
|
|
214202
|
-
const [obsSaved, setObsSaved] = reactExports.useState(false);
|
|
214203
214197
|
const loadProfiles = async () => {
|
|
214204
214198
|
const data = await window.worker.listProfiles();
|
|
214205
214199
|
setProfileList(data);
|
|
214206
214200
|
setActiveProfileId(data.activeProfile);
|
|
214207
214201
|
};
|
|
214208
|
-
const loadObserver = async () => {
|
|
214209
|
-
try {
|
|
214210
|
-
const o = await window.worker.getObserverSettings();
|
|
214211
|
-
setObsEnabled(o.enabled);
|
|
214212
|
-
setObsHasKey(o.hasApiKey);
|
|
214213
|
-
setObsKeySource(o.keySource);
|
|
214214
|
-
setObsCapUsd(o.dailyCapUsd);
|
|
214215
|
-
setObsApiKey("");
|
|
214216
|
-
} catch {
|
|
214217
|
-
}
|
|
214218
|
-
};
|
|
214219
214202
|
reactExports.useEffect(() => {
|
|
214220
214203
|
if (open) {
|
|
214221
214204
|
loadProfiles();
|
|
214222
|
-
loadObserver();
|
|
214223
214205
|
setEditingId(null);
|
|
214224
214206
|
setSaved(false);
|
|
214225
|
-
setObsSaved(false);
|
|
214226
214207
|
window.worker.getVersion().then(setVersion).catch(() => {
|
|
214227
214208
|
});
|
|
214228
214209
|
}
|
|
214229
214210
|
}, [open]);
|
|
214230
|
-
const handleObserverSave = async () => {
|
|
214231
|
-
const data = {
|
|
214232
|
-
enabled: obsEnabled,
|
|
214233
|
-
dailyCapUsd: Math.max(0.05, obsCapUsd) || 1
|
|
214234
|
-
};
|
|
214235
|
-
if (obsApiKey.trim()) {
|
|
214236
|
-
data.anthropicApiKey = obsApiKey.trim();
|
|
214237
|
-
}
|
|
214238
|
-
const o = await window.worker.setObserverSettings(data);
|
|
214239
|
-
setObsHasKey(o.hasApiKey);
|
|
214240
|
-
setObsKeySource(o.keySource);
|
|
214241
|
-
setObsApiKey("");
|
|
214242
|
-
setObsSaved(true);
|
|
214243
|
-
setTimeout(() => setObsSaved(false), 900);
|
|
214244
|
-
};
|
|
214245
214211
|
const startEditing = (profile) => {
|
|
214246
214212
|
setEditingId(profile.id);
|
|
214247
214213
|
setName(profile.name);
|
|
@@ -214460,51 +214426,6 @@ function SettingsDialog({ open, onClose }) {
|
|
|
214460
214426
|
] })
|
|
214461
214427
|
] })
|
|
214462
214428
|
),
|
|
214463
|
-
!editingId && // ─── Observer (global) ─────────────────
|
|
214464
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-section", children: [
|
|
214465
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "Observer" }),
|
|
214466
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "settings-hint", children: "Reviews agent sessions for assumptions, unverified claims, and dependency/license risk, tracks time per work item, and posts a session digest to the project's Agent Datastore page." }),
|
|
214467
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "settings-checkbox", children: [
|
|
214468
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214469
|
-
"input",
|
|
214470
|
-
{
|
|
214471
|
-
type: "checkbox",
|
|
214472
|
-
checked: obsEnabled,
|
|
214473
|
-
onChange: (e) => setObsEnabled(e.target.checked)
|
|
214474
|
-
}
|
|
214475
|
-
),
|
|
214476
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Enable Observer" }),
|
|
214477
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "settings-hint", children: "Applies to newly started agent tabs. Advisory only — never blocks or slows the agent." })
|
|
214478
|
-
] }),
|
|
214479
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
|
|
214480
|
-
"Anthropic API Key",
|
|
214481
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214482
|
-
"input",
|
|
214483
|
-
{
|
|
214484
|
-
type: "password",
|
|
214485
|
-
value: obsApiKey,
|
|
214486
|
-
onChange: (e) => setObsApiKey(e.target.value),
|
|
214487
|
-
placeholder: obsKeySource === "settings" ? "***configured*** (leave blank to keep)" : obsKeySource === "env" ? "using ANTHROPIC_API_KEY from environment" : "sk-ant-…"
|
|
214488
|
-
}
|
|
214489
|
-
),
|
|
214490
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "settings-hint", children: "Your own Anthropic key — separate from the ctlsurf profile key. Without one, the Observer still records the session ledger, Tier-0 tags, and spans, but skips model review and digests." })
|
|
214491
|
-
] }),
|
|
214492
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
|
|
214493
|
-
"Daily budget cap (USD)",
|
|
214494
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214495
|
-
"input",
|
|
214496
|
-
{
|
|
214497
|
-
type: "number",
|
|
214498
|
-
min: 0.05,
|
|
214499
|
-
step: 0.25,
|
|
214500
|
-
value: obsCapUsd,
|
|
214501
|
-
onChange: (e) => setObsCapUsd(parseFloat(e.target.value) || 1)
|
|
214502
|
-
}
|
|
214503
|
-
),
|
|
214504
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "settings-hint", children: "Model review pauses for the day once spend reaches the cap; Tier-0 tagging and spans continue." })
|
|
214505
|
-
] }),
|
|
214506
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "settings-actions", children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "btn-primary", onClick: handleObserverSave, children: obsSaved ? "Saved!" : "Save Observer Settings" }) })
|
|
214507
|
-
] }),
|
|
214508
214429
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "settings-section settings-about", children: [
|
|
214509
214430
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h4", { children: "About" }),
|
|
214510
214431
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "about-name", children: [
|
|
@@ -214528,7 +214449,7 @@ const PRIORITY_OPTIONS = [
|
|
|
214528
214449
|
{ value: "High", color: "var(--danger)" }
|
|
214529
214450
|
];
|
|
214530
214451
|
const colorOf = (opts, value) => opts.find((o) => o.value === value)?.color ?? "var(--text-muted)";
|
|
214531
|
-
const tint
|
|
214452
|
+
const tint = (color, pct2) => `color-mix(in srgb, ${color} ${pct2}%, transparent)`;
|
|
214532
214453
|
function formatDate(iso) {
|
|
214533
214454
|
if (!iso) return "";
|
|
214534
214455
|
const d = new Date(iso);
|
|
@@ -214606,7 +214527,7 @@ function Segmented({ options, value, onChange }) {
|
|
|
214606
214527
|
{
|
|
214607
214528
|
type: "button",
|
|
214608
214529
|
className: `ticket-seg ${active ? "active" : ""}`,
|
|
214609
|
-
style: active ? { borderColor: o.color, color: o.color, background: tint
|
|
214530
|
+
style: active ? { borderColor: o.color, color: o.color, background: tint(o.color, 12) } : void 0,
|
|
214610
214531
|
onClick: () => onChange(o.value),
|
|
214611
214532
|
children: [
|
|
214612
214533
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ticket-seg-dot", style: { background: o.color } }),
|
|
@@ -214635,7 +214556,7 @@ function TicketCard({ ticket, onClick, onSend }) {
|
|
|
214635
214556
|
"span",
|
|
214636
214557
|
{
|
|
214637
214558
|
className: "ticket-card-pri",
|
|
214638
|
-
style: { color: colorOf(PRIORITY_OPTIONS, ticket.priority), borderColor: tint
|
|
214559
|
+
style: { color: colorOf(PRIORITY_OPTIONS, ticket.priority), borderColor: tint(colorOf(PRIORITY_OPTIONS, ticket.priority), 40) },
|
|
214639
214560
|
children: ticket.priority
|
|
214640
214561
|
}
|
|
214641
214562
|
)
|
|
@@ -214865,233 +214786,394 @@ function TicketPane({ onSendToTerminal }) {
|
|
|
214865
214786
|
] })
|
|
214866
214787
|
] });
|
|
214867
214788
|
}
|
|
214868
|
-
|
|
214869
|
-
|
|
214870
|
-
|
|
214871
|
-
|
|
214872
|
-
];
|
|
214873
|
-
const
|
|
214874
|
-
|
|
214875
|
-
|
|
214876
|
-
|
|
214877
|
-
|
|
214878
|
-
};
|
|
214879
|
-
|
|
214880
|
-
function
|
|
214881
|
-
|
|
214882
|
-
|
|
214883
|
-
|
|
214884
|
-
|
|
214885
|
-
|
|
214886
|
-
|
|
214887
|
-
|
|
214888
|
-
|
|
214889
|
-
|
|
214890
|
-
|
|
214891
|
-
|
|
214892
|
-
|
|
214893
|
-
|
|
214894
|
-
|
|
214895
|
-
|
|
214896
|
-
|
|
214897
|
-
|
|
214898
|
-
)
|
|
214899
|
-
|
|
214900
|
-
|
|
214901
|
-
|
|
214902
|
-
|
|
214903
|
-
|
|
214904
|
-
}
|
|
214905
|
-
|
|
214906
|
-
function Chip({ color, label }) {
|
|
214907
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "obs-chip", style: { color, borderColor: tint(color, 33), background: tint(color, 8) }, children: [
|
|
214908
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-chip-dot", style: { background: color } }),
|
|
214909
|
-
label
|
|
214910
|
-
] });
|
|
214911
|
-
}
|
|
214912
|
-
function FindingCard({ item }) {
|
|
214913
|
-
const [expanded2, setExpanded] = reactExports.useState(false);
|
|
214914
|
-
const color = SEVERITY_COLORS[item.severity || "info"] || SEVERITY_COLORS.info;
|
|
214915
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
214916
|
-
"button",
|
|
214917
|
-
{
|
|
214918
|
-
type: "button",
|
|
214919
|
-
className: "obs-card",
|
|
214920
|
-
style: { borderLeftColor: color },
|
|
214921
|
-
onClick: () => setExpanded((v2) => !v2),
|
|
214922
|
-
"aria-expanded": expanded2,
|
|
214923
|
-
children: [
|
|
214924
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "obs-card-top", children: [
|
|
214925
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { color, label: item.severity || "info" }),
|
|
214926
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-card-cat", children: (item.category || "").replace(/_/g, " ") }),
|
|
214927
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-card-time", children: formatTime(item.ts) })
|
|
214928
|
-
] }),
|
|
214929
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "obs-card-title", children: item.title }),
|
|
214930
|
-
expanded2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "obs-card-body", children: [
|
|
214931
|
-
item.detail && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: item.detail }),
|
|
214932
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "obs-card-facts", children: [
|
|
214933
|
-
typeof item.confidence === "number" && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "obs-fact", children: [
|
|
214934
|
-
Math.round(item.confidence * 100),
|
|
214935
|
-
"% confidence"
|
|
214936
|
-
] }),
|
|
214937
|
-
typeof item.tier === "number" && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "obs-fact", children: [
|
|
214938
|
-
"tier ",
|
|
214939
|
-
item.tier
|
|
214940
|
-
] }),
|
|
214941
|
-
item.receipts && item.receipts.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-fact", children: item.receipts.join(" · ") })
|
|
214942
|
-
] })
|
|
214943
|
-
] }),
|
|
214944
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `obs-card-caret ${expanded2 ? "open" : ""}`, "aria-hidden": "true", children: "▸" })
|
|
214945
|
-
]
|
|
214946
|
-
}
|
|
214947
|
-
);
|
|
214948
|
-
}
|
|
214949
|
-
function DigestCard({ item }) {
|
|
214950
|
-
const [expanded2, setExpanded] = reactExports.useState(true);
|
|
214951
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
214952
|
-
"button",
|
|
214953
|
-
{
|
|
214954
|
-
type: "button",
|
|
214955
|
-
className: "obs-card",
|
|
214956
|
-
style: { borderLeftColor: DIGEST_COLOR },
|
|
214957
|
-
onClick: () => setExpanded((v2) => !v2),
|
|
214958
|
-
"aria-expanded": expanded2,
|
|
214959
|
-
children: [
|
|
214960
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "obs-card-top", children: [
|
|
214961
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Chip, { color: DIGEST_COLOR, label: "digest" }),
|
|
214962
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "obs-card-time", children: formatTime(item.ts) })
|
|
214963
|
-
] }),
|
|
214964
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "obs-card-title", children: item.title }),
|
|
214965
|
-
expanded2 && item.detail && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "obs-card-body", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: item.detail }) }),
|
|
214966
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `obs-card-caret ${expanded2 ? "open" : ""}`, "aria-hidden": "true", children: "▸" })
|
|
214967
|
-
]
|
|
214968
|
-
}
|
|
214969
|
-
);
|
|
214789
|
+
function canonical(text2) {
|
|
214790
|
+
let value = "";
|
|
214791
|
+
const offsets = [];
|
|
214792
|
+
for (let i2 = 0; i2 < text2.length; i2++) {
|
|
214793
|
+
if (text2[i2] === "*" || text2[i2] === "`") continue;
|
|
214794
|
+
const ch = /\s/.test(text2[i2]) ? " " : text2[i2];
|
|
214795
|
+
if (ch === " " && value.endsWith(" ")) continue;
|
|
214796
|
+
value += ch;
|
|
214797
|
+
offsets.push(i2);
|
|
214798
|
+
}
|
|
214799
|
+
return { value, offsets };
|
|
214800
|
+
}
|
|
214801
|
+
function thinkingHighlights(text2, focus) {
|
|
214802
|
+
if (!focus) return [];
|
|
214803
|
+
const source = canonical(text2);
|
|
214804
|
+
const ranges = [];
|
|
214805
|
+
for (const kind of ["choice", "reason"]) {
|
|
214806
|
+
const excerpt = kind === "choice" ? focus.text : focus.reason;
|
|
214807
|
+
if (!excerpt) continue;
|
|
214808
|
+
const needle = canonical(excerpt).value.trim();
|
|
214809
|
+
if (!needle) continue;
|
|
214810
|
+
const index2 = source.value.indexOf(needle);
|
|
214811
|
+
if (index2 < 0) continue;
|
|
214812
|
+
let start = source.offsets[index2];
|
|
214813
|
+
let end = source.offsets[index2 + needle.length - 1] + 1;
|
|
214814
|
+
while (start > 0 && /[*`]/.test(text2[start - 1])) start--;
|
|
214815
|
+
while (end < text2.length && /[*`]/.test(text2[end])) end++;
|
|
214816
|
+
ranges.push({ start, end, kind });
|
|
214817
|
+
}
|
|
214818
|
+
const merged = [];
|
|
214819
|
+
for (const range2 of ranges.sort((a, b) => a.start - b.start)) {
|
|
214820
|
+
const last = merged.at(-1);
|
|
214821
|
+
if (last && range2.start < last.end) {
|
|
214822
|
+
last.end = Math.max(last.end, range2.end);
|
|
214823
|
+
if (range2.kind === "choice") last.kind = "choice";
|
|
214824
|
+
} else merged.push({ ...range2 });
|
|
214825
|
+
}
|
|
214826
|
+
return merged;
|
|
214970
214827
|
}
|
|
214971
|
-
|
|
214828
|
+
const ICONS = { thinking: "✦", investigating: "⌕", editing: "✎", testing: "✓", planning: "◇", reporting: "≡" };
|
|
214829
|
+
const STATUS = { running: "Running", succeeded: "Succeeded", failed: "Failed", unknown: "Recorded", interrupted: "Stopped" };
|
|
214830
|
+
const INTENTS = { decision: "Decision", hypothesis: "Hypothesis", alternative: "Alternative", next_step: "Next step", context: "Thinking" };
|
|
214831
|
+
function WorkMapPanel({ tabId }) {
|
|
214972
214832
|
const [snapshot, setSnapshot] = reactExports.useState(null);
|
|
214973
|
-
const [
|
|
214974
|
-
const [
|
|
214975
|
-
const
|
|
214976
|
-
|
|
214977
|
-
|
|
214978
|
-
|
|
214979
|
-
|
|
214980
|
-
|
|
214981
|
-
|
|
214982
|
-
|
|
214833
|
+
const [error, setError] = reactExports.useState(null);
|
|
214834
|
+
const [saving, setSaving] = reactExports.useState(false);
|
|
214835
|
+
const [collapsed2, setCollapsed] = reactExports.useState(/* @__PURE__ */ new Set());
|
|
214836
|
+
const [selected, setSelected] = reactExports.useState(null);
|
|
214837
|
+
const [following, setFollowing] = reactExports.useState(true);
|
|
214838
|
+
const [paths, setPaths] = reactExports.useState({ pythonPath: "", modelPath: "" });
|
|
214839
|
+
const [fullSource, setFullSource] = reactExports.useState(null);
|
|
214840
|
+
const scroll = reactExports.useRef(null);
|
|
214841
|
+
const alive = reactExports.useRef(true);
|
|
214842
|
+
const revision = reactExports.useRef(-1);
|
|
214843
|
+
const accept = (next) => {
|
|
214844
|
+
if (!alive.current || next.tabId !== tabId || next.revision < revision.current) return;
|
|
214845
|
+
revision.current = next.revision;
|
|
214846
|
+
setSnapshot(next);
|
|
214847
|
+
};
|
|
214983
214848
|
reactExports.useEffect(() => {
|
|
214984
|
-
|
|
214985
|
-
const
|
|
214986
|
-
|
|
214849
|
+
alive.current = true;
|
|
214850
|
+
const unsubscribe = window.worker.onWorkMapUpdate(accept);
|
|
214851
|
+
window.worker.getWorkMap(tabId).then((next) => {
|
|
214852
|
+
accept(next);
|
|
214853
|
+
if (alive.current) setPaths({ pythonPath: next.settings.pythonPath, modelPath: next.settings.modelPath });
|
|
214854
|
+
}).catch((err) => {
|
|
214855
|
+
if (alive.current) setError(String(err));
|
|
214987
214856
|
});
|
|
214988
|
-
const unsubActivity = window.worker.onObserverActivity(setReviewing);
|
|
214989
|
-
const unsubCwd = window.worker.onCwdChanged(() => void refresh());
|
|
214990
214857
|
return () => {
|
|
214991
|
-
|
|
214992
|
-
|
|
214993
|
-
unsubCwd();
|
|
214858
|
+
alive.current = false;
|
|
214859
|
+
unsubscribe();
|
|
214994
214860
|
};
|
|
214995
|
-
}, [
|
|
214996
|
-
|
|
214997
|
-
|
|
214998
|
-
|
|
214999
|
-
|
|
215000
|
-
|
|
215001
|
-
setSnapshot(s);
|
|
215002
|
-
} finally {
|
|
215003
|
-
setToggling(false);
|
|
214861
|
+
}, [tabId]);
|
|
214862
|
+
reactExports.useEffect(() => {
|
|
214863
|
+
const event = snapshot?.nodes.find((n2) => n2.id === selected)?.evidence.find((e) => e.kind === "thinking" || e.kind === "message");
|
|
214864
|
+
if (!event) {
|
|
214865
|
+
setFullSource(null);
|
|
214866
|
+
return;
|
|
215004
214867
|
}
|
|
215005
|
-
|
|
215006
|
-
|
|
215007
|
-
|
|
215008
|
-
|
|
215009
|
-
|
|
214868
|
+
let cancelled = false;
|
|
214869
|
+
setFullSource({ eventId: event.id, loading: true });
|
|
214870
|
+
if (typeof window.worker.getWorkMapSource !== "function") {
|
|
214871
|
+
setFullSource({ eventId: event.id, error: "Restart the app to load full source text. Showing the recorded preview." });
|
|
214872
|
+
return;
|
|
214873
|
+
}
|
|
214874
|
+
window.worker.getWorkMapSource(tabId, event.id).then((source) => {
|
|
214875
|
+
if (!cancelled) setFullSource(source ? { eventId: event.id, text: source.text } : { eventId: event.id, error: "The original source record is no longer available." });
|
|
214876
|
+
}).catch((err) => {
|
|
214877
|
+
if (!cancelled) setFullSource({ eventId: event.id, error: String(err) });
|
|
214878
|
+
});
|
|
214879
|
+
return () => {
|
|
214880
|
+
cancelled = true;
|
|
214881
|
+
};
|
|
214882
|
+
}, [selected, tabId]);
|
|
214883
|
+
reactExports.useLayoutEffect(() => {
|
|
214884
|
+
if (following && scroll.current) scroll.current.scrollTop = scroll.current.scrollHeight;
|
|
214885
|
+
}, [snapshot?.revision, following]);
|
|
214886
|
+
async function configure(settings) {
|
|
214887
|
+
setSaving(true);
|
|
214888
|
+
setError(null);
|
|
215010
214889
|
try {
|
|
215011
|
-
await window.worker.
|
|
215012
|
-
} catch {
|
|
215013
|
-
|
|
214890
|
+
accept(await window.worker.setWorkMap(tabId, settings));
|
|
214891
|
+
} catch (err) {
|
|
214892
|
+
if (alive.current) setError(String(err));
|
|
214893
|
+
} finally {
|
|
214894
|
+
if (alive.current) setSaving(false);
|
|
215014
214895
|
}
|
|
215015
|
-
}
|
|
215016
|
-
const
|
|
215017
|
-
|
|
215018
|
-
|
|
215019
|
-
|
|
215020
|
-
|
|
215021
|
-
|
|
215022
|
-
|
|
215023
|
-
|
|
215024
|
-
|
|
215025
|
-
|
|
215026
|
-
|
|
215027
|
-
|
|
215028
|
-
|
|
214896
|
+
}
|
|
214897
|
+
const toggleBranch = (id) => setCollapsed((prev) => {
|
|
214898
|
+
const next = new Set(prev);
|
|
214899
|
+
if (next.has(id)) next.delete(id);
|
|
214900
|
+
else next.add(id);
|
|
214901
|
+
return next;
|
|
214902
|
+
});
|
|
214903
|
+
const nodes = snapshot?.nodes || [];
|
|
214904
|
+
const steps = nodes.filter((n2) => n2.kind === "step");
|
|
214905
|
+
const decisions = steps.filter((n2) => n2.intent && n2.intent !== "context");
|
|
214906
|
+
const nodeById = new Map(nodes.map((n2) => [n2.id, n2]));
|
|
214907
|
+
const goals = nodes.filter((n2) => n2.kind === "goal");
|
|
214908
|
+
function threadRuns(goalId) {
|
|
214909
|
+
const runs = [];
|
|
214910
|
+
for (const node of steps) {
|
|
214911
|
+
if (nodeById.get(node.parentId || "")?.parentId !== goalId) continue;
|
|
214912
|
+
const textSource = node.evidence[0]?.kind === "thinking" || node.evidence[0]?.kind === "message";
|
|
214913
|
+
const anchor = textSource ? node : nodeById.get(node.contextId || "");
|
|
214914
|
+
const key = anchor?.id || node.parentId;
|
|
214915
|
+
const previous = runs.at(-1);
|
|
214916
|
+
if (previous?.key === key) previous.nodes.push(node);
|
|
214917
|
+
else runs.push({ id: `thread-${node.id}`, key, label: nodeById.get(anchor?.parentId || node.parentId || "")?.title || "Activity", nodes: [node] });
|
|
214918
|
+
}
|
|
214919
|
+
return runs;
|
|
214920
|
+
}
|
|
214921
|
+
const enabled = snapshot?.settings.enabled || false;
|
|
214922
|
+
const available = snapshot?.capability?.state === "available";
|
|
214923
|
+
const runtime = snapshot?.runtime;
|
|
214924
|
+
const activity = snapshot?.ended ? "Session ended" : !enabled ? "Map is off" : !snapshot?.supported ? "Waiting for a local agent" : snapshot.state === "awaiting_decision" ? "Waiting for approval" : snapshot.state === "awaiting_input" ? "Waiting for you" : runtime === "loading" ? "Loading Clef-Flash…" : runtime === "thinking" ? "Connecting the dots…" : runtime === "error" ? "Model paused" : steps.length ? "Following this session" : "Waiting for activity";
|
|
214925
|
+
function renderStep(node) {
|
|
214926
|
+
const open = selected === node.id;
|
|
214927
|
+
const thinking = node.evidence[0]?.kind === "thinking";
|
|
214928
|
+
const actions = nodes.filter((n2) => n2.contextId === node.id);
|
|
214929
|
+
const linked = !!node.contextId && nodeById.has(node.contextId);
|
|
214930
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: `work-map-step ${node.status}${linked ? " follows-intent" : ""}`, children: [
|
|
214931
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "work-map-step-button", onClick: () => setSelected(open ? null : node.id), "aria-expanded": open, children: [
|
|
214932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `work-map-activity ${node.activity}`, title: node.activity, "aria-label": node.activity, children: ICONS[node.activity] }),
|
|
214933
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "work-map-step-copy", children: [
|
|
214934
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-step-title", children: node.focus?.text || node.title }),
|
|
214935
|
+
node.focus?.reason && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "work-map-reason", children: [
|
|
214936
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("b", { children: "Why" }),
|
|
214937
|
+
" ",
|
|
214938
|
+
node.focus.reason
|
|
214939
|
+
] }),
|
|
214940
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "work-map-step-meta", children: [
|
|
214941
|
+
node.intent && node.intent !== "context" ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `work-map-intent ${node.intent}`, children: INTENTS[node.intent] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `work-map-status ${node.status}`, children: STATUS[node.status] }),
|
|
214942
|
+
(thinking || node.evidence[0]?.kind === "message") && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: thinking ? "Thinking summary" : "Agent update" }),
|
|
214943
|
+
linked && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "work-map-link", title: `Follows: ${nodeById.get(node.contextId)?.title}`, children: [
|
|
214944
|
+
"↳ ",
|
|
214945
|
+
nodeById.get(node.contextId)?.evidence[0]?.kind === "thinking" ? "Follows thinking" : "Follows update"
|
|
214946
|
+
] }),
|
|
214947
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("time", { dateTime: node.ts, children: new Date(node.ts).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) }),
|
|
214948
|
+
actions.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
214949
|
+
actions.length,
|
|
214950
|
+
" following ",
|
|
214951
|
+
actions.length === 1 ? "action" : "actions"
|
|
214952
|
+
] }),
|
|
214953
|
+
node.placement === "clef-flash" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { title: "Topic placement suggested by Clef-Flash", children: "Clef ↗" })
|
|
214954
|
+
] })
|
|
214955
|
+
] }),
|
|
214956
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-receipt-caret", "aria-hidden": "true", children: open ? "−" : "+" })
|
|
214957
|
+
] }),
|
|
214958
|
+
open && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-evidence", children: [
|
|
214959
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "work-map-evidence-heading", children: "Source events" }),
|
|
214960
|
+
node.evidence.map((e) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-receipt", children: [
|
|
214961
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: e.kind === "thinking" ? fullSource?.eventId === e.id && fullSource.text !== void 0 ? "Full thinking" : "Thinking summary" : e.kind === "tool" ? "Tool call" : e.kind === "result" ? "Tool result" : fullSource?.eventId === e.id && fullSource.text !== void 0 ? "Full agent update" : "Agent message" }),
|
|
214962
|
+
fullSource?.eventId === e.id && fullSource.loading && /* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: "Loading full source…" }),
|
|
214963
|
+
fullSource?.eventId === e.id && fullSource.error && /* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: fullSource.error }),
|
|
214964
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "work-map-source-text", children: highlightSource(fullSource?.eventId === e.id && fullSource.text !== void 0 ? fullSource.text : e.text, node.focus) }),
|
|
214965
|
+
node.focus && /* @__PURE__ */ jsxRuntimeExports.jsxs("small", { className: "work-map-highlight-key", children: [
|
|
214966
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Highlighted: important choice" }),
|
|
214967
|
+
node.focus.reason && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "supporting reason" })
|
|
214968
|
+
] }),
|
|
214969
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("code", { title: `${e.source} · ${e.toolId || e.id}`, children: [
|
|
214970
|
+
e.source,
|
|
214971
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
214972
|
+
e.toolId || e.id
|
|
214973
|
+
] })
|
|
214974
|
+
] }, e.id)),
|
|
214975
|
+
node.placement === "clef-flash" && /* @__PURE__ */ jsxRuntimeExports.jsxs("small", { children: [
|
|
214976
|
+
"Clef suggested the topic",
|
|
214977
|
+
thinking ? " and interpretation" : "",
|
|
214978
|
+
". ",
|
|
214979
|
+
thinking ? "A stated plan or hypothesis is not a verified result." : "Execution status comes from the tool result."
|
|
214980
|
+
] })
|
|
214981
|
+
] })
|
|
214982
|
+
] }, node.id);
|
|
214983
|
+
}
|
|
214984
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "work-map-panel", "aria-label": "Live work map", children: [
|
|
214985
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-controls", children: [
|
|
214986
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-heading", children: [
|
|
214987
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-kicker", children: "THE THREAD OF WORK" }),
|
|
214988
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-heading-row", children: [
|
|
214989
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: "Follow the thread." }),
|
|
214990
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
214991
|
+
"button",
|
|
214992
|
+
{
|
|
214993
|
+
className: `work-map-switch ${enabled ? "on" : ""}`,
|
|
214994
|
+
role: "switch",
|
|
214995
|
+
"aria-label": "Enable work map",
|
|
214996
|
+
"aria-checked": enabled,
|
|
214997
|
+
disabled: !snapshot || saving || !available,
|
|
214998
|
+
onClick: () => void configure({ enabled: !enabled }),
|
|
214999
|
+
children: [
|
|
215000
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
|
|
215001
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("b", { children: enabled ? "On" : "Off" })
|
|
215002
|
+
]
|
|
215003
|
+
}
|
|
215004
|
+
)
|
|
215029
215005
|
] })
|
|
215030
215006
|
] }),
|
|
215031
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("
|
|
215032
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
215033
|
-
|
|
215007
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-engine-row", children: [
|
|
215008
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: `map-engine-${tabId}`, children: "Engine" }),
|
|
215009
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
215010
|
+
"select",
|
|
215034
215011
|
{
|
|
215035
|
-
|
|
215036
|
-
|
|
215037
|
-
disabled:
|
|
215038
|
-
onChange: (e) => void
|
|
215012
|
+
id: `map-engine-${tabId}`,
|
|
215013
|
+
value: snapshot?.settings.engine || "clef-flash",
|
|
215014
|
+
disabled: !snapshot || saving || !available,
|
|
215015
|
+
onChange: (e) => void configure({ engine: e.target.value }),
|
|
215016
|
+
children: [
|
|
215017
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "clef-flash", children: "Clef-Flash · local" }),
|
|
215018
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: "rules", children: "Rules · lightweight" })
|
|
215019
|
+
]
|
|
215039
215020
|
}
|
|
215040
|
-
)
|
|
215041
|
-
|
|
215042
|
-
|
|
215043
|
-
|
|
215044
|
-
|
|
215045
|
-
|
|
215046
|
-
|
|
215047
|
-
{
|
|
215048
|
-
|
|
215049
|
-
|
|
215050
|
-
|
|
215051
|
-
|
|
215052
|
-
|
|
215053
|
-
|
|
215054
|
-
},
|
|
215055
|
-
|
|
215056
|
-
|
|
215057
|
-
|
|
215058
|
-
|
|
215059
|
-
|
|
215060
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
215061
|
-
|
|
215021
|
+
)
|
|
215022
|
+
] }),
|
|
215023
|
+
!available && snapshot && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "work-map-thinking-status", role: "status", children: snapshot.capability?.reason || "Restart the app to check Apple GPU availability." }),
|
|
215024
|
+
enabled && snapshot?.supported && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "work-map-thinking-status", role: "status", children: snapshot.thinkingStatus === "available" ? "Readable thinking included" : snapshot.thinkingStatus === "unavailable" ? "This transcript omits readable thinking summaries." : "Waiting for a readable thinking summary." }),
|
|
215025
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-live", role: "status", children: [
|
|
215026
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `work-map-live-dot ${enabled && snapshot?.supported && !snapshot?.ended ? "on" : ""}` }),
|
|
215027
|
+
activity,
|
|
215028
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-agent", children: snapshot?.agentName })
|
|
215029
|
+
] }),
|
|
215030
|
+
(error || snapshot?.error) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-error", role: "alert", children: [
|
|
215031
|
+
error || snapshot?.error,
|
|
215032
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { disabled: saving || !available, onClick: () => void configure({ enabled: true }), children: "Retry" })
|
|
215033
|
+
] }),
|
|
215034
|
+
snapshot?.settings.engine === "clef-flash" && /* @__PURE__ */ jsxRuntimeExports.jsxs("details", { className: "work-map-setup", children: [
|
|
215035
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("summary", { children: "Local model setup" }),
|
|
215036
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Use your downloaded Clef-Flash 8-bit model and its Python environment. Inference stays on this Mac." }),
|
|
215037
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
|
|
215038
|
+
"Python executable",
|
|
215039
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { value: paths.pythonPath, onChange: (e) => setPaths((p) => ({ ...p, pythonPath: e.target.value })), spellCheck: false })
|
|
215040
|
+
] }),
|
|
215041
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
|
|
215042
|
+
"Model folder",
|
|
215043
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { value: paths.modelPath, onChange: (e) => setPaths((p) => ({ ...p, modelPath: e.target.value })), spellCheck: false })
|
|
215044
|
+
] }),
|
|
215045
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { disabled: saving || !available || !paths.pythonPath.trim() || !paths.modelPath.trim(), onClick: () => void configure(paths), children: "Save paths" })
|
|
215062
215046
|
] })
|
|
215063
215047
|
] }),
|
|
215064
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
215065
|
-
|
|
215066
|
-
|
|
215067
|
-
|
|
215068
|
-
|
|
215048
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "work-map-scroll", ref: scroll, onScroll: () => {
|
|
215049
|
+
const el = scroll.current;
|
|
215050
|
+
if (el) setFollowing(el.scrollHeight - el.scrollTop - el.clientHeight < 55);
|
|
215051
|
+
}, children: goals.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-empty", children: [
|
|
215052
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-empty-tree", "aria-hidden": "true", children: [
|
|
215053
|
+
"◇",
|
|
215054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "├─ ⌕" }),
|
|
215055
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "└─ ✓" })
|
|
215069
215056
|
] }),
|
|
215070
|
-
|
|
215071
|
-
|
|
215072
|
-
|
|
215073
|
-
|
|
215057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: enabled ? "The choices and the work, together." : "A map of what happens next." }),
|
|
215058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: !enabled ? "Turn on the map to follow goals, investigations, edits, and checks as your agent works." : !snapshot?.supported ? "Start a local Claude Code or Codex session to see its work here. Remote sessions are not supported yet." : "Stated decisions, readable thinking, actions, and results appear in one continuous thread. Open any card to inspect its source." })
|
|
215059
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-forest", children: [
|
|
215060
|
+
goals.map((goal, i2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("article", { className: "work-map-goal", children: [
|
|
215061
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "work-map-goal-heading", onClick: () => toggleBranch(goal.id), "aria-expanded": !collapsed2.has(goal.id), title: goal.evidence[0]?.text, children: [
|
|
215062
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-goal-icon", "aria-hidden": "true", children: "◎" }),
|
|
215063
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
215064
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "work-map-kicker", children: [
|
|
215065
|
+
"GOAL ",
|
|
215066
|
+
String(i2 + 1).padStart(2, "0")
|
|
215067
|
+
] }),
|
|
215068
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: goal.title })
|
|
215069
|
+
] }),
|
|
215070
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-caret", children: collapsed2.has(goal.id) ? "▸" : "▾" })
|
|
215071
|
+
] }),
|
|
215072
|
+
!collapsed2.has(goal.id) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "work-map-branches", children: threadRuns(goal.id).map((run) => {
|
|
215073
|
+
const failed = run.nodes.some((n2) => n2.status === "failed");
|
|
215074
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "work-map-branch", children: [
|
|
215075
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "work-map-branch-heading", onClick: () => toggleBranch(run.id), "aria-expanded": !collapsed2.has(run.id), children: [
|
|
215076
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `work-map-branch-point ${failed ? "failed" : ""}` }),
|
|
215077
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-branch-label", children: run.label }),
|
|
215078
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-count", children: run.nodes.length }),
|
|
215079
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "work-map-caret", children: collapsed2.has(run.id) ? "▸" : "▾" })
|
|
215080
|
+
] }),
|
|
215081
|
+
!collapsed2.has(run.id) && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "work-map-steps", "aria-label": "Activity thread", children: run.nodes.map(renderStep) })
|
|
215082
|
+
] }, run.id);
|
|
215083
|
+
}) })
|
|
215084
|
+
] }, goal.id)),
|
|
215085
|
+
snapshot?.dropped ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "work-map-retained", children: "Earlier activity trimmed · keeping the latest 240 nodes" }) : null
|
|
215086
|
+
] }) }),
|
|
215087
|
+
!following && steps.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "work-map-jump", onClick: () => setFollowing(true), children: "↓ Follow latest" }),
|
|
215088
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("footer", { className: "work-map-footer", children: [
|
|
215089
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
215090
|
+
decisions.length,
|
|
215091
|
+
" ",
|
|
215092
|
+
decisions.length === 1 ? "choice" : "choices",
|
|
215093
|
+
" · ",
|
|
215094
|
+
steps.length,
|
|
215095
|
+
" events · local"
|
|
215074
215096
|
] }),
|
|
215075
|
-
|
|
215076
|
-
|
|
215077
|
-
|
|
215078
|
-
|
|
215079
|
-
/* @__PURE__ */
|
|
215080
|
-
|
|
215081
|
-
|
|
215082
|
-
|
|
215083
|
-
|
|
215084
|
-
|
|
215085
|
-
|
|
215086
|
-
|
|
215087
|
-
" finding",
|
|
215088
|
-
findings.length === 1 ? "" : "s",
|
|
215089
|
-
" · $",
|
|
215090
|
-
snapshot.spentTodayUsd.toFixed(2),
|
|
215091
|
-
" spent today"
|
|
215092
|
-
] }) })
|
|
215097
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { disabled: !steps.length || saving, onClick: async () => {
|
|
215098
|
+
setError(null);
|
|
215099
|
+
try {
|
|
215100
|
+
accept(await window.worker.clearWorkMap(tabId));
|
|
215101
|
+
setCollapsed(/* @__PURE__ */ new Set());
|
|
215102
|
+
setSelected(null);
|
|
215103
|
+
setFollowing(true);
|
|
215104
|
+
} catch (err) {
|
|
215105
|
+
if (alive.current) setError(String(err));
|
|
215106
|
+
}
|
|
215107
|
+
}, children: "Clear map" })
|
|
215108
|
+
] })
|
|
215093
215109
|
] });
|
|
215094
215110
|
}
|
|
215111
|
+
function highlightSource(text2, focus) {
|
|
215112
|
+
const ranges = thinkingHighlights(text2, focus);
|
|
215113
|
+
if (!ranges.length) return text2;
|
|
215114
|
+
const parts = [];
|
|
215115
|
+
let offset = 0;
|
|
215116
|
+
for (const range2 of ranges) {
|
|
215117
|
+
parts.push(text2.slice(offset, range2.start));
|
|
215118
|
+
parts.push(/* @__PURE__ */ jsxRuntimeExports.jsx("mark", { className: `work-map-highlight ${range2.kind}`, children: text2.slice(range2.start, range2.end) }, range2.start));
|
|
215119
|
+
offset = range2.end;
|
|
215120
|
+
}
|
|
215121
|
+
parts.push(text2.slice(offset));
|
|
215122
|
+
return parts;
|
|
215123
|
+
}
|
|
215124
|
+
let capability = { state: "checking", reason: "Checking Apple GPU availability…" };
|
|
215125
|
+
function canOpenWorkMap() {
|
|
215126
|
+
return capability.state === "available";
|
|
215127
|
+
}
|
|
215128
|
+
function WorkMapToggle({ visible, onToggle, onUnavailable }) {
|
|
215129
|
+
const [current, setCurrent] = reactExports.useState(capability);
|
|
215130
|
+
reactExports.useEffect(() => {
|
|
215131
|
+
let cancelled = false;
|
|
215132
|
+
let pushed = false;
|
|
215133
|
+
const accept = (next) => {
|
|
215134
|
+
if (cancelled) return;
|
|
215135
|
+
capability = next;
|
|
215136
|
+
setCurrent(next);
|
|
215137
|
+
if (next.state === "unavailable") onUnavailable();
|
|
215138
|
+
};
|
|
215139
|
+
if (!window.worker.getWorkMapCapability) {
|
|
215140
|
+
accept({ state: "unavailable", reason: "Restart the app to check Apple GPU availability." });
|
|
215141
|
+
return;
|
|
215142
|
+
}
|
|
215143
|
+
const unsubscribe = window.worker.onWorkMapCapability((next) => {
|
|
215144
|
+
pushed = true;
|
|
215145
|
+
accept(next);
|
|
215146
|
+
});
|
|
215147
|
+
window.worker.getWorkMapCapability().then((next) => {
|
|
215148
|
+
if (!pushed) accept(next);
|
|
215149
|
+
}).catch(() => accept({ state: "unavailable", reason: "GPU availability could not be verified." }));
|
|
215150
|
+
return () => {
|
|
215151
|
+
cancelled = true;
|
|
215152
|
+
unsubscribe();
|
|
215153
|
+
};
|
|
215154
|
+
}, []);
|
|
215155
|
+
const available = current.state === "available";
|
|
215156
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
215157
|
+
"button",
|
|
215158
|
+
{
|
|
215159
|
+
className: `titlebar-btn titlebar-icon-btn ${visible ? "active" : ""}`,
|
|
215160
|
+
onClick: onToggle,
|
|
215161
|
+
disabled: !available,
|
|
215162
|
+
title: available ? `Show or hide the live work map · ${current.gpuName || "Apple GPU"} (Ctrl+Shift+M)` : current.reason || "Work map is unavailable",
|
|
215163
|
+
"aria-label": "Work map",
|
|
215164
|
+
"aria-pressed": visible,
|
|
215165
|
+
children: [
|
|
215166
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "1.7", "aria-hidden": "true", children: [
|
|
215167
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "2", y: "9", width: "6", height: "6", rx: "2" }),
|
|
215168
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "16", y: "2", width: "6", height: "6", rx: "2" }),
|
|
215169
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "16", y: "16", width: "6", height: "6", rx: "2" }),
|
|
215170
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 12h4V5h4M12 12v7h4" })
|
|
215171
|
+
] }),
|
|
215172
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Work map" })
|
|
215173
|
+
]
|
|
215174
|
+
}
|
|
215175
|
+
);
|
|
215176
|
+
}
|
|
215095
215177
|
const DEFAULT_LAYOUT = {
|
|
215096
215178
|
type: "split",
|
|
215097
215179
|
direction: "horizontal",
|
|
@@ -215414,6 +215496,7 @@ ${transcript.slice(-REMOTE_HANDOFF_CHARS)}` : transcript;
|
|
|
215414
215496
|
setActiveTabId(tabId);
|
|
215415
215497
|
}, []);
|
|
215416
215498
|
const togglePane = reactExports.useCallback((id) => {
|
|
215499
|
+
if (id === "workmap" && !visiblePaneIds.includes(id) && !canOpenWorkMap()) return;
|
|
215417
215500
|
if (visiblePaneIds.includes(id)) {
|
|
215418
215501
|
const newLayout = removePane(layout2, id);
|
|
215419
215502
|
if (newLayout) {
|
|
@@ -215473,6 +215556,10 @@ ${transcript.slice(-REMOTE_HANDOFF_CHARS)}` : transcript;
|
|
|
215473
215556
|
e.preventDefault();
|
|
215474
215557
|
togglePane("tickets");
|
|
215475
215558
|
break;
|
|
215559
|
+
case "M":
|
|
215560
|
+
e.preventDefault();
|
|
215561
|
+
togglePane("workmap");
|
|
215562
|
+
break;
|
|
215476
215563
|
}
|
|
215477
215564
|
}
|
|
215478
215565
|
};
|
|
@@ -215552,7 +215639,7 @@ ${transcript.slice(-REMOTE_HANDOFF_CHARS)}` : transcript;
|
|
|
215552
215639
|
},
|
|
215553
215640
|
{ id: "ctlsurf", label: "ctlsurf", content: /* @__PURE__ */ jsxRuntimeExports.jsx(CtlsurfPanel, { navigate: ctlsurfNav }) },
|
|
215554
215641
|
{ id: "tickets", label: "Tickets", content: /* @__PURE__ */ jsxRuntimeExports.jsx(TicketPane, { onSendToTerminal: handleSendToTerminal }) },
|
|
215555
|
-
{ id: "
|
|
215642
|
+
{ id: "workmap", label: "Work map", content: /* @__PURE__ */ jsxRuntimeExports.jsx(WorkMapPanel, { tabId: activeTabId }, activeTabId) }
|
|
215556
215643
|
];
|
|
215557
215644
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "app", children: [
|
|
215558
215645
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "titlebar", children: [
|
|
@@ -215609,36 +215696,6 @@ ${transcript.slice(-REMOTE_HANDOFF_CHARS)}` : transcript;
|
|
|
215609
215696
|
]
|
|
215610
215697
|
}
|
|
215611
215698
|
),
|
|
215612
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
215613
|
-
"button",
|
|
215614
|
-
{
|
|
215615
|
-
className: `titlebar-btn titlebar-icon-btn ${visiblePaneIds.includes("observer") ? "active" : ""}`,
|
|
215616
|
-
onClick: () => togglePane("observer"),
|
|
215617
|
-
title: "Toggle Observer pane — live session review",
|
|
215618
|
-
"aria-label": "Observer",
|
|
215619
|
-
children: [
|
|
215620
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
215621
|
-
"svg",
|
|
215622
|
-
{
|
|
215623
|
-
viewBox: "0 0 24 24",
|
|
215624
|
-
width: "13",
|
|
215625
|
-
height: "13",
|
|
215626
|
-
fill: "none",
|
|
215627
|
-
stroke: "currentColor",
|
|
215628
|
-
strokeWidth: "2",
|
|
215629
|
-
strokeLinecap: "round",
|
|
215630
|
-
strokeLinejoin: "round",
|
|
215631
|
-
"aria-hidden": "true",
|
|
215632
|
-
children: [
|
|
215633
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
|
215634
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "3" })
|
|
215635
|
-
]
|
|
215636
|
-
}
|
|
215637
|
-
),
|
|
215638
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Observer" })
|
|
215639
|
-
]
|
|
215640
|
-
}
|
|
215641
|
-
),
|
|
215642
215699
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
215643
215700
|
"button",
|
|
215644
215701
|
{
|
|
@@ -215668,6 +215725,14 @@ ${transcript.slice(-REMOTE_HANDOFF_CHARS)}` : transcript;
|
|
|
215668
215725
|
)
|
|
215669
215726
|
}
|
|
215670
215727
|
),
|
|
215728
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
215729
|
+
WorkMapToggle,
|
|
215730
|
+
{
|
|
215731
|
+
visible: visiblePaneIds.includes("workmap"),
|
|
215732
|
+
onToggle: () => togglePane("workmap"),
|
|
215733
|
+
onUnavailable: () => setLayout((previous) => removePane(previous, "workmap") || { type: "leaf", paneId: "terminal" })
|
|
215734
|
+
}
|
|
215735
|
+
),
|
|
215671
215736
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SpeakControls, { remote: activeAgentIsRemote }),
|
|
215672
215737
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "titlebar-separator" }),
|
|
215673
215738
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|