@aiderdesk/aiderdesk 0.67.0 → 0.69.0
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/out/renderer/assets/{arc-BnPy4nhx.js → arc--tfU0Ahe.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-3BPJPVTR-_SwpsbSs.js → architectureDiagram-3BPJPVTR-D2uDC6Pw.js} +3 -3
- package/out/renderer/assets/{blockDiagram-GPEHLZMM-D8Bc_xCY.js → blockDiagram-GPEHLZMM-BKopmU2x.js} +4 -4
- package/out/renderer/assets/{c4Diagram-AAUBKEIU-Ddic5IpI.js → c4Diagram-AAUBKEIU-CU9NH6bi.js} +2 -2
- package/out/renderer/assets/{channel-I2sEi2rW.js → channel-CBm2XBi8.js} +1 -1
- package/out/renderer/assets/{chunk-2J33WTMH-Cqrw7IHw.js → chunk-2J33WTMH-Yb07TKpF.js} +1 -1
- package/out/renderer/assets/{chunk-4BX2VUAB-DKY4go9E.js → chunk-4BX2VUAB-B1KgZMg1.js} +1 -1
- package/out/renderer/assets/{chunk-55IACEB6-COO6Gc0F.js → chunk-55IACEB6-BQ1g6F53.js} +1 -1
- package/out/renderer/assets/{chunk-727SXJPM-Bu8zhvGn.js → chunk-727SXJPM-nQzqwjgJ.js} +5 -5
- package/out/renderer/assets/{chunk-AQP2D5EJ-JHXEk1U1.js → chunk-AQP2D5EJ-8vVOUXUS.js} +3 -3
- package/out/renderer/assets/{chunk-FMBD7UC4-BqbYNISq.js → chunk-FMBD7UC4-dVquqYuV.js} +1 -1
- package/out/renderer/assets/{chunk-ND2GUHAM-D29ZgnDp.js → chunk-ND2GUHAM-Bu2VSodd.js} +1 -1
- package/out/renderer/assets/{chunk-QZHKN3VN-B-pbtAbR.js → chunk-QZHKN3VN-Bl58FmbX.js} +1 -1
- package/out/renderer/assets/{classDiagram-4FO5ZUOK-B7_tIdbP.js → classDiagram-4FO5ZUOK-Dmfohc7-.js} +6 -6
- package/out/renderer/assets/{classDiagram-v2-Q7XG4LA2-B7_tIdbP.js → classDiagram-v2-Q7XG4LA2-Dmfohc7-.js} +6 -6
- package/out/renderer/assets/{cose-bilkent-S5V4N54A-CGNgxRV6.js → cose-bilkent-S5V4N54A-8bgOaac3.js} +1 -1
- package/out/renderer/assets/{dagre-BM42HDAG-DB-tI7Ml.js → dagre-BM42HDAG-BZZ0JLHX.js} +3 -3
- package/out/renderer/assets/{diagram-2AECGRRQ-Cdwrgy7R.js → diagram-2AECGRRQ-9oArT1ZV.js} +3 -3
- package/out/renderer/assets/{diagram-5GNKFQAL-BnvZ78_N.js → diagram-5GNKFQAL-OMRICVmJ.js} +4 -4
- package/out/renderer/assets/{diagram-KO2AKTUF-VUrfwRCk.js → diagram-KO2AKTUF-pjPRIjL7.js} +3 -3
- package/out/renderer/assets/{diagram-LMA3HP47-_Vo8GrFC.js → diagram-LMA3HP47-cRVrdFbD.js} +3 -3
- package/out/renderer/assets/{diagram-OG6HWLK6-CoLz9kio.js → diagram-OG6HWLK6-gJvA5dOA.js} +4 -4
- package/out/renderer/assets/{erDiagram-TEJ5UH35-B3Bg3gW1.js → erDiagram-TEJ5UH35-BvHOuuhD.js} +4 -4
- package/out/renderer/assets/{flowDiagram-I6XJVG4X-BgyAk0Xe.js → flowDiagram-I6XJVG4X-D17Inzho.js} +6 -6
- package/out/renderer/assets/{ganttDiagram-6RSMTGT7-NnVRwQPs.js → ganttDiagram-6RSMTGT7-CIorTPIp.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-PVQCEYII-C4vrRnDw.js → gitGraphDiagram-PVQCEYII-R3v9UanE.js} +4 -4
- package/out/renderer/assets/{graph-BZvTCUpv.js → graph-DNFReSa8.js} +1 -1
- package/out/renderer/assets/{index-P63PgYUG.js → index-COTYjomB.js} +28970 -133308
- package/out/renderer/assets/{index-zdiQSGqQ.css → index-D56aByCg.css} +40 -0
- package/out/renderer/assets/{infoDiagram-5YYISTIA-zTriWVJJ.js → infoDiagram-5YYISTIA-B4hJmlOG.js} +2 -2
- package/out/renderer/assets/{ishikawaDiagram-YF4QCWOH-DHO6Yeea.js → ishikawaDiagram-YF4QCWOH-DxohqJKP.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-JHISSGLW-CZsRcg2X.js → journeyDiagram-JHISSGLW-BxFBZYTB.js} +4 -4
- package/out/renderer/assets/jsx-dev-runtime-BsbxiHH-.js +49 -0
- package/out/renderer/assets/{kanban-definition-UN3LZRKU-DSpAeh8p.js → kanban-definition-UN3LZRKU-B39Yt2kD.js} +2 -2
- package/out/renderer/assets/{layout-B5A8fT-Z.js → layout-yXTq0RED.js} +2 -2
- package/out/renderer/assets/{mindmap-definition-RKZ34NQL-Bns9Ab8p.js → mindmap-definition-RKZ34NQL-BD2OIaSH.js} +3 -3
- package/out/renderer/assets/{pieDiagram-4H26LBE5-BX36DY7W.js → pieDiagram-4H26LBE5-COAWItT4.js} +4 -4
- package/out/renderer/assets/pierre-dark-C-Drv5KU.js +4 -0
- package/out/renderer/assets/pierre-dark-soft-Cd74uQaL.js +4 -0
- package/out/renderer/assets/pierre-light-CfQnmt6J.js +4 -0
- package/out/renderer/assets/pierre-light-soft-DMVdU74b.js +4 -0
- package/out/renderer/assets/{quadrantDiagram-W4KKPZXB-DuD2qSni.js → quadrantDiagram-W4KKPZXB-BLY0H2F6.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-4Y6WPE33-Th2uknlw.js → requirementDiagram-4Y6WPE33-DEJf5mz_.js} +3 -3
- package/out/renderer/assets/{sankeyDiagram-5OEKKPKP-DP3WODC7.js → sankeyDiagram-5OEKKPKP-D3BkTe8z.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-3UESZ5HK-BvpGEq-v.js → sequenceDiagram-3UESZ5HK-DUU_lUpD.js} +3 -3
- package/out/renderer/assets/{stateDiagram-AJRCARHV-Btrfma35.js → stateDiagram-AJRCARHV-DnH4p93i.js} +6 -6
- package/out/renderer/assets/{stateDiagram-v2-BHNVJYJU-v-8JiozM.js → stateDiagram-v2-BHNVJYJU-CRXRiP95.js} +4 -4
- package/out/renderer/assets/{timeline-definition-PNZ67QCA-prZy7cGx.js → timeline-definition-PNZ67QCA-Uv34KQP0.js} +2 -2
- package/out/renderer/assets/{vennDiagram-CIIHVFJN-XCVp5OjS.js → vennDiagram-CIIHVFJN-JyUQxmn1.js} +1 -1
- package/out/renderer/assets/{wardley-L42UT6IY-FZSNLjCs.js → wardley-L42UT6IY-4X2JoJpL.js} +1 -1
- package/out/renderer/assets/{wardleyDiagram-YWT4CUSO-Cla_7ryL.js → wardleyDiagram-YWT4CUSO-B9pIhVmY.js} +3 -3
- package/out/renderer/assets/{worker-CfJUABHG.js → worker-BdXuKH1Q.js} +274 -171
- package/out/renderer/assets/{xychartDiagram-2RQKCTM6-CKvwGbhk.js → xychartDiagram-2RQKCTM6-PJZgkel8.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/out/resources/skills/extension-creator/SKILL.md +24 -0
- package/out/resources/skills/extension-creator/references/examples-gallery.md +11 -0
- package/out/resources/skills/extension-creator/references/extension-interface.md +4 -0
- package/out/resources/skills/extension-creator/references/external-libraries.md +159 -0
- package/out/resources/skills/extension-creator/references/ui-components.md +35 -0
- package/out/runner.js +546 -450
- package/package.json +20 -33
- package/patches/{ai+5.0.179.patch → ai+5.0.195.patch} +9 -9
- package/out/renderer/assets/pierre-dark-DADY5eR0.js +0 -4
- package/out/renderer/assets/pierre-light-DUjirxKp.js +0 -4
- package/patches/@ai-sdk+deepseek+1.0.37.patch +0 -150
- package/patches/ai-sdk-provider-claude-code+2.3.0.patch +0 -1024
|
@@ -11131,6 +11131,13 @@ function cyrb53(str, seed = 0) {
|
|
|
11131
11131
|
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
11132
11132
|
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36).slice(0, 6);
|
|
11133
11133
|
}
|
|
11134
|
+
(() => {
|
|
11135
|
+
try {
|
|
11136
|
+
return false;
|
|
11137
|
+
} catch {
|
|
11138
|
+
return false;
|
|
11139
|
+
}
|
|
11140
|
+
})();
|
|
11134
11141
|
const SPLIT_WITH_NEWLINES = /(?<=\n)/;
|
|
11135
11142
|
const DEFAULT_THEMES = {
|
|
11136
11143
|
dark: "pierre-dark",
|
|
@@ -11429,6 +11436,22 @@ const EXTENSION_TO_FILE_FORMAT = {
|
|
|
11429
11436
|
rst: "rst",
|
|
11430
11437
|
rake: "ruby",
|
|
11431
11438
|
gemspec: "ruby",
|
|
11439
|
+
jbuilder: "ruby",
|
|
11440
|
+
builder: "ruby",
|
|
11441
|
+
rabl: "ruby",
|
|
11442
|
+
arb: "ruby",
|
|
11443
|
+
ru: "ruby",
|
|
11444
|
+
podspec: "ruby",
|
|
11445
|
+
Gemfile: "ruby",
|
|
11446
|
+
Rakefile: "ruby",
|
|
11447
|
+
Guardfile: "ruby",
|
|
11448
|
+
Capfile: "ruby",
|
|
11449
|
+
Berksfile: "ruby",
|
|
11450
|
+
Brewfile: "ruby",
|
|
11451
|
+
Vagrantfile: "ruby",
|
|
11452
|
+
Thorfile: "ruby",
|
|
11453
|
+
Appraisals: "ruby",
|
|
11454
|
+
Dangerfile: "ruby",
|
|
11432
11455
|
sas: "sas",
|
|
11433
11456
|
sass: "sass",
|
|
11434
11457
|
scala: "scala",
|
|
@@ -11759,14 +11782,83 @@ function getLineNodes(nodes) {
|
|
|
11759
11782
|
console.error(nodes);
|
|
11760
11783
|
throw new Error("getLineNodes: Unable to find children");
|
|
11761
11784
|
}
|
|
11785
|
+
function getExpandedRegion({ isPartial, rangeSize, expandedHunks, hunkIndex, collapsedContextThreshold }) {
|
|
11786
|
+
const normalizedRangeSize = Math.max(rangeSize, 0);
|
|
11787
|
+
if (normalizedRangeSize === 0 || isPartial) return {
|
|
11788
|
+
fromStart: 0,
|
|
11789
|
+
fromEnd: 0,
|
|
11790
|
+
rangeSize: normalizedRangeSize,
|
|
11791
|
+
collapsedLines: normalizedRangeSize,
|
|
11792
|
+
renderAll: false
|
|
11793
|
+
};
|
|
11794
|
+
if (expandedHunks === true || normalizedRangeSize <= collapsedContextThreshold) return {
|
|
11795
|
+
fromStart: normalizedRangeSize,
|
|
11796
|
+
fromEnd: 0,
|
|
11797
|
+
rangeSize: normalizedRangeSize,
|
|
11798
|
+
collapsedLines: 0,
|
|
11799
|
+
renderAll: true
|
|
11800
|
+
};
|
|
11801
|
+
const region = expandedHunks?.get(hunkIndex);
|
|
11802
|
+
const fromStart = Math.min(Math.max(region?.fromStart ?? 0, 0), normalizedRangeSize);
|
|
11803
|
+
const fromEnd = Math.min(Math.max(region?.fromEnd ?? 0, 0), normalizedRangeSize);
|
|
11804
|
+
const expandedCount = fromStart + fromEnd;
|
|
11805
|
+
const renderAll = expandedCount >= normalizedRangeSize;
|
|
11806
|
+
return {
|
|
11807
|
+
fromStart: renderAll ? normalizedRangeSize : fromStart,
|
|
11808
|
+
fromEnd: renderAll ? 0 : fromEnd,
|
|
11809
|
+
rangeSize: normalizedRangeSize,
|
|
11810
|
+
collapsedLines: Math.max(normalizedRangeSize - expandedCount, 0),
|
|
11811
|
+
renderAll
|
|
11812
|
+
};
|
|
11813
|
+
}
|
|
11814
|
+
function getTrailingContextRangeSize({ fileDiff, errorPrefix }) {
|
|
11815
|
+
const lastHunk = fileDiff.hunks[fileDiff.hunks.length - 1];
|
|
11816
|
+
if (lastHunk == null || fileDiff.isPartial || fileDiff.additionLines.length === 0 || fileDiff.deletionLines.length === 0) return 0;
|
|
11817
|
+
const additionRemaining = fileDiff.additionLines.length - (lastHunk.additionLineIndex + lastHunk.additionCount);
|
|
11818
|
+
const deletionRemaining = fileDiff.deletionLines.length - (lastHunk.deletionLineIndex + lastHunk.deletionCount);
|
|
11819
|
+
if (additionRemaining <= 0 && deletionRemaining <= 0) return 0;
|
|
11820
|
+
if (additionRemaining !== deletionRemaining) throw new Error(`${errorPrefix}: trailing context mismatch (additions=${additionRemaining}, deletions=${deletionRemaining}) for ${fileDiff.name}`);
|
|
11821
|
+
return Math.min(additionRemaining, deletionRemaining);
|
|
11822
|
+
}
|
|
11823
|
+
function getTrailingExpandedRegion({ fileDiff, hunkIndex, expandedHunks, collapsedContextThreshold, errorPrefix }) {
|
|
11824
|
+
if (hunkIndex !== fileDiff.hunks.length - 1) return;
|
|
11825
|
+
const trailingRangeSize = getTrailingContextRangeSize({
|
|
11826
|
+
fileDiff,
|
|
11827
|
+
errorPrefix
|
|
11828
|
+
});
|
|
11829
|
+
if (trailingRangeSize <= 0) return;
|
|
11830
|
+
if (expandedHunks === true || trailingRangeSize <= collapsedContextThreshold) return {
|
|
11831
|
+
fromStart: trailingRangeSize,
|
|
11832
|
+
fromEnd: 0,
|
|
11833
|
+
rangeSize: trailingRangeSize,
|
|
11834
|
+
collapsedLines: 0,
|
|
11835
|
+
renderAll: true
|
|
11836
|
+
};
|
|
11837
|
+
const region = expandedHunks?.get(fileDiff.hunks.length);
|
|
11838
|
+
const fromStart = Math.min(Math.max(region?.fromStart ?? 0, 0), trailingRangeSize);
|
|
11839
|
+
return {
|
|
11840
|
+
fromStart,
|
|
11841
|
+
fromEnd: 0,
|
|
11842
|
+
rangeSize: trailingRangeSize,
|
|
11843
|
+
collapsedLines: trailingRangeSize - fromStart,
|
|
11844
|
+
renderAll: fromStart >= trailingRangeSize
|
|
11845
|
+
};
|
|
11846
|
+
}
|
|
11762
11847
|
function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infinity, expandedHunks, collapsedContextThreshold = DEFAULT_COLLAPSED_CONTEXT_THRESHOLD, callback }) {
|
|
11848
|
+
const iterationStart = getIterationStartState({
|
|
11849
|
+
diff,
|
|
11850
|
+
diffStyle,
|
|
11851
|
+
startingLine,
|
|
11852
|
+
expandedHunks,
|
|
11853
|
+
collapsedContextThreshold
|
|
11854
|
+
});
|
|
11763
11855
|
const state = {
|
|
11764
|
-
finalHunk: diff.hunks.at(-1),
|
|
11765
11856
|
viewportStart: startingLine,
|
|
11766
11857
|
viewportEnd: startingLine + totalLines,
|
|
11767
11858
|
isWindowedHighlight: startingLine > 0 || totalLines < Infinity,
|
|
11768
|
-
splitCount:
|
|
11769
|
-
unifiedCount:
|
|
11859
|
+
splitCount: iterationStart.splitCount,
|
|
11860
|
+
unifiedCount: iterationStart.unifiedCount,
|
|
11861
|
+
finalHunkIndex: diff.hunks.length - 1,
|
|
11770
11862
|
shouldBreak() {
|
|
11771
11863
|
if (!state.isWindowedHighlight) return false;
|
|
11772
11864
|
const breakUnified = state.unifiedCount >= startingLine + totalLines;
|
|
@@ -11800,28 +11892,34 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11800
11892
|
return callback(props) ?? false;
|
|
11801
11893
|
}
|
|
11802
11894
|
};
|
|
11803
|
-
hunkIterator: for (
|
|
11804
|
-
let
|
|
11895
|
+
hunkIterator: for (let hunkIndex = iterationStart.hunkIndex; hunkIndex < diff.hunks.length; hunkIndex++) {
|
|
11896
|
+
let getTrailingCollapsedAfter = function(unifiedLineIndex$1, splitLineIndex$1) {
|
|
11805
11897
|
if (trailingRegion == null || trailingRegion.collapsedLines <= 0 || trailingRegion.fromStart + trailingRegion.fromEnd > 0) return 0;
|
|
11806
11898
|
return splitLineIndex$1 === hunk.splitLineStart + hunk.splitLineCount - 1 ? trailingRegion.collapsedLines : 0;
|
|
11807
|
-
},
|
|
11808
|
-
if (
|
|
11809
|
-
|
|
11810
|
-
leadingRegion.collapsedLines
|
|
11811
|
-
return value;
|
|
11899
|
+
}, consumePendingCollapsed = function() {
|
|
11900
|
+
if (consumedCollapsed) return 0;
|
|
11901
|
+
consumedCollapsed = true;
|
|
11902
|
+
return leadingRegion.collapsedLines;
|
|
11812
11903
|
};
|
|
11813
|
-
|
|
11904
|
+
const hunk = diff.hunks[hunkIndex];
|
|
11905
|
+
if (hunk == null) throw new Error("iterateOverDiff: invalid hunk index");
|
|
11814
11906
|
if (state.shouldBreak()) break;
|
|
11815
|
-
const leadingRegion = getExpandedRegion(
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11907
|
+
const leadingRegion = getExpandedRegion({
|
|
11908
|
+
isPartial: diff.isPartial,
|
|
11909
|
+
rangeSize: hunk.collapsedBefore,
|
|
11910
|
+
expandedHunks,
|
|
11911
|
+
hunkIndex,
|
|
11912
|
+
collapsedContextThreshold
|
|
11913
|
+
});
|
|
11914
|
+
const trailingRegion = hunkIndex === state.finalHunkIndex ? getTrailingExpandedRegion({
|
|
11915
|
+
fileDiff: diff,
|
|
11916
|
+
hunkIndex,
|
|
11917
|
+
expandedHunks,
|
|
11918
|
+
collapsedContextThreshold,
|
|
11919
|
+
errorPrefix: "iterateOverDiff"
|
|
11920
|
+
}) : void 0;
|
|
11824
11921
|
const expandedLineCount = leadingRegion.fromStart + leadingRegion.fromEnd;
|
|
11922
|
+
let consumedCollapsed = leadingRegion.collapsedLines === 0;
|
|
11825
11923
|
if (!state.shouldSkip(expandedLineCount, expandedLineCount)) {
|
|
11826
11924
|
let unifiedLineIndex$1 = hunk.unifiedLineStart - leadingRegion.rangeSize;
|
|
11827
11925
|
let splitLineIndex$1 = hunk.splitLineStart - leadingRegion.rangeSize;
|
|
@@ -11829,69 +11927,63 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11829
11927
|
let additionLineIndex$1 = hunk.additionLineIndex - leadingRegion.rangeSize;
|
|
11830
11928
|
let deletionLineNumber$1 = hunk.deletionStart - leadingRegion.rangeSize;
|
|
11831
11929
|
let additionLineNumber$1 = hunk.additionStart - leadingRegion.rangeSize;
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
})) break hunkIterator;
|
|
11856
|
-
} else state.incrementCounts(1, 1);
|
|
11857
|
-
index++;
|
|
11858
|
-
}
|
|
11930
|
+
if (walkContextLines(state, leadingRegion.fromStart, diffStyle, (index) => {
|
|
11931
|
+
return state.emit({
|
|
11932
|
+
hunkIndex,
|
|
11933
|
+
hunk,
|
|
11934
|
+
collapsedBefore: 0,
|
|
11935
|
+
collapsedAfter: 0,
|
|
11936
|
+
type: "context-expanded",
|
|
11937
|
+
deletionLine: {
|
|
11938
|
+
lineNumber: deletionLineNumber$1 + index,
|
|
11939
|
+
lineIndex: deletionLineIndex$1 + index,
|
|
11940
|
+
noEOFCR: false,
|
|
11941
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
11942
|
+
splitLineIndex: splitLineIndex$1 + index
|
|
11943
|
+
},
|
|
11944
|
+
additionLine: {
|
|
11945
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
11946
|
+
splitLineIndex: splitLineIndex$1 + index,
|
|
11947
|
+
lineIndex: additionLineIndex$1 + index,
|
|
11948
|
+
lineNumber: additionLineNumber$1 + index,
|
|
11949
|
+
noEOFCR: false
|
|
11950
|
+
}
|
|
11951
|
+
});
|
|
11952
|
+
})) break hunkIterator;
|
|
11859
11953
|
unifiedLineIndex$1 = hunk.unifiedLineStart - leadingRegion.fromEnd;
|
|
11860
11954
|
splitLineIndex$1 = hunk.splitLineStart - leadingRegion.fromEnd;
|
|
11861
11955
|
deletionLineIndex$1 = hunk.deletionLineIndex - leadingRegion.fromEnd;
|
|
11862
11956
|
additionLineIndex$1 = hunk.additionLineIndex - leadingRegion.fromEnd;
|
|
11863
11957
|
deletionLineNumber$1 = hunk.deletionStart - leadingRegion.fromEnd;
|
|
11864
11958
|
additionLineNumber$1 = hunk.additionStart - leadingRegion.fromEnd;
|
|
11865
|
-
index
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
index++;
|
|
11891
|
-
}
|
|
11959
|
+
if (walkContextLines(state, leadingRegion.fromEnd, diffStyle, (index) => {
|
|
11960
|
+
return state.emit({
|
|
11961
|
+
hunkIndex,
|
|
11962
|
+
hunk,
|
|
11963
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
11964
|
+
collapsedAfter: 0,
|
|
11965
|
+
type: "context-expanded",
|
|
11966
|
+
deletionLine: {
|
|
11967
|
+
lineNumber: deletionLineNumber$1 + index,
|
|
11968
|
+
lineIndex: deletionLineIndex$1 + index,
|
|
11969
|
+
noEOFCR: false,
|
|
11970
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
11971
|
+
splitLineIndex: splitLineIndex$1 + index
|
|
11972
|
+
},
|
|
11973
|
+
additionLine: {
|
|
11974
|
+
unifiedLineIndex: unifiedLineIndex$1 + index,
|
|
11975
|
+
splitLineIndex: splitLineIndex$1 + index,
|
|
11976
|
+
lineIndex: additionLineIndex$1 + index,
|
|
11977
|
+
lineNumber: additionLineNumber$1 + index,
|
|
11978
|
+
noEOFCR: false
|
|
11979
|
+
}
|
|
11980
|
+
});
|
|
11981
|
+
}, () => {
|
|
11982
|
+
consumePendingCollapsed();
|
|
11983
|
+
})) break hunkIterator;
|
|
11892
11984
|
} else {
|
|
11893
11985
|
state.incrementCounts(expandedLineCount, expandedLineCount);
|
|
11894
|
-
|
|
11986
|
+
consumePendingCollapsed();
|
|
11895
11987
|
}
|
|
11896
11988
|
let unifiedLineIndex = hunk.unifiedLineStart;
|
|
11897
11989
|
let splitLineIndex = hunk.splitLineStart;
|
|
@@ -11905,39 +11997,37 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11905
11997
|
const isLastContent = content === lastContent;
|
|
11906
11998
|
if (content.type === "context") {
|
|
11907
11999
|
if (!state.shouldSkip(content.lines, content.lines)) {
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
index++;
|
|
11937
|
-
}
|
|
12000
|
+
if (walkContextLines(state, content.lines, diffStyle, (index) => {
|
|
12001
|
+
const isLastLine = isLastContent && index === content.lines - 1;
|
|
12002
|
+
const unifiedRowIndex = unifiedLineIndex + index;
|
|
12003
|
+
const splitRowIndex = splitLineIndex + index;
|
|
12004
|
+
return state.emit({
|
|
12005
|
+
hunkIndex,
|
|
12006
|
+
hunk,
|
|
12007
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
12008
|
+
collapsedAfter: getTrailingCollapsedAfter(unifiedRowIndex, splitRowIndex),
|
|
12009
|
+
type: "context",
|
|
12010
|
+
deletionLine: {
|
|
12011
|
+
lineNumber: deletionLineNumber + index,
|
|
12012
|
+
lineIndex: deletionLineIndex + index,
|
|
12013
|
+
noEOFCR: isLastLine && hunk.noEOFCRDeletions,
|
|
12014
|
+
unifiedLineIndex: unifiedRowIndex,
|
|
12015
|
+
splitLineIndex: splitRowIndex
|
|
12016
|
+
},
|
|
12017
|
+
additionLine: {
|
|
12018
|
+
unifiedLineIndex: unifiedRowIndex,
|
|
12019
|
+
splitLineIndex: splitRowIndex,
|
|
12020
|
+
lineIndex: additionLineIndex + index,
|
|
12021
|
+
lineNumber: additionLineNumber + index,
|
|
12022
|
+
noEOFCR: isLastLine && hunk.noEOFCRAdditions
|
|
12023
|
+
}
|
|
12024
|
+
});
|
|
12025
|
+
}, () => {
|
|
12026
|
+
consumePendingCollapsed();
|
|
12027
|
+
})) break hunkIterator;
|
|
11938
12028
|
} else {
|
|
11939
12029
|
state.incrementCounts(content.lines, content.lines);
|
|
11940
|
-
|
|
12030
|
+
consumePendingCollapsed();
|
|
11941
12031
|
}
|
|
11942
12032
|
unifiedLineIndex += content.lines;
|
|
11943
12033
|
splitLineIndex += content.lines;
|
|
@@ -11950,12 +12040,13 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11950
12040
|
const unifiedCount = content.deletions + content.additions;
|
|
11951
12041
|
if (!state.shouldSkip(unifiedCount, splitCount)) {
|
|
11952
12042
|
const iterationRanges = getChangeIterationRanges(state, content);
|
|
12043
|
+
if ((iterationRanges[0]?.[0] ?? 0) > 0) consumePendingCollapsed();
|
|
11953
12044
|
for (const [rangeStart, rangeEnd] of iterationRanges) for (let index = rangeStart; index < rangeEnd; index++) {
|
|
11954
|
-
const collapsedAfter =
|
|
12045
|
+
const collapsedAfter = getTrailingCollapsedAfter(unifiedLineIndex + index, splitLineIndex + index);
|
|
11955
12046
|
if (state.emit(getChangeLineData({
|
|
11956
12047
|
hunkIndex,
|
|
11957
12048
|
hunk,
|
|
11958
|
-
collapsedBefore:
|
|
12049
|
+
collapsedBefore: consumePendingCollapsed(),
|
|
11959
12050
|
collapsedAfter,
|
|
11960
12051
|
diffStyle,
|
|
11961
12052
|
index,
|
|
@@ -11972,7 +12063,7 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11972
12063
|
}), true)) break hunkIterator;
|
|
11973
12064
|
}
|
|
11974
12065
|
}
|
|
11975
|
-
|
|
12066
|
+
consumePendingCollapsed();
|
|
11976
12067
|
state.incrementCounts(unifiedCount, splitCount);
|
|
11977
12068
|
unifiedLineIndex += unifiedCount;
|
|
11978
12069
|
splitLineIndex += splitCount;
|
|
@@ -11985,68 +12076,79 @@ function iterateOverDiff({ diff, diffStyle, startingLine = 0, totalLines = Infin
|
|
|
11985
12076
|
if (trailingRegion != null) {
|
|
11986
12077
|
const { collapsedLines, fromStart, fromEnd } = trailingRegion;
|
|
11987
12078
|
const len = fromStart + fromEnd;
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
|
|
11993
|
-
|
|
11994
|
-
|
|
11995
|
-
|
|
11996
|
-
|
|
11997
|
-
|
|
11998
|
-
|
|
11999
|
-
|
|
12000
|
-
|
|
12001
|
-
|
|
12002
|
-
|
|
12003
|
-
|
|
12004
|
-
|
|
12005
|
-
|
|
12006
|
-
|
|
12007
|
-
|
|
12008
|
-
|
|
12009
|
-
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
}
|
|
12013
|
-
})) break hunkIterator;
|
|
12014
|
-
} else state.incrementCounts(1, 1);
|
|
12015
|
-
index++;
|
|
12016
|
-
}
|
|
12079
|
+
if (walkContextLines(state, len, diffStyle, (index) => {
|
|
12080
|
+
const isLastLine = index === len - 1;
|
|
12081
|
+
return state.emit({
|
|
12082
|
+
hunkIndex: diff.hunks.length,
|
|
12083
|
+
hunk: void 0,
|
|
12084
|
+
collapsedBefore: 0,
|
|
12085
|
+
collapsedAfter: isLastLine ? collapsedLines : 0,
|
|
12086
|
+
type: "context-expanded",
|
|
12087
|
+
deletionLine: {
|
|
12088
|
+
lineNumber: deletionLineNumber + index,
|
|
12089
|
+
lineIndex: deletionLineIndex + index,
|
|
12090
|
+
noEOFCR: false,
|
|
12091
|
+
unifiedLineIndex: unifiedLineIndex + index,
|
|
12092
|
+
splitLineIndex: splitLineIndex + index
|
|
12093
|
+
},
|
|
12094
|
+
additionLine: {
|
|
12095
|
+
unifiedLineIndex: unifiedLineIndex + index,
|
|
12096
|
+
splitLineIndex: splitLineIndex + index,
|
|
12097
|
+
lineIndex: additionLineIndex + index,
|
|
12098
|
+
lineNumber: additionLineNumber + index,
|
|
12099
|
+
noEOFCR: false
|
|
12100
|
+
}
|
|
12101
|
+
});
|
|
12102
|
+
}, void 0, () => state.shouldBreak())) break hunkIterator;
|
|
12017
12103
|
}
|
|
12018
12104
|
}
|
|
12019
12105
|
}
|
|
12020
|
-
function
|
|
12021
|
-
rangeSize = Math.max(rangeSize, 0);
|
|
12022
|
-
if (rangeSize === 0 || isPartial) return {
|
|
12023
|
-
fromStart: 0,
|
|
12024
|
-
fromEnd: 0,
|
|
12025
|
-
rangeSize,
|
|
12026
|
-
collapsedLines: Math.max(rangeSize, 0)
|
|
12027
|
-
};
|
|
12028
|
-
if (expandedHunks === true || rangeSize <= collapsedContextThreshold) return {
|
|
12029
|
-
fromStart: rangeSize,
|
|
12030
|
-
fromEnd: 0,
|
|
12031
|
-
rangeSize,
|
|
12032
|
-
collapsedLines: 0
|
|
12033
|
-
};
|
|
12034
|
-
const region = expandedHunks?.get(hunkIndex);
|
|
12035
|
-
const fromStart = Math.min(Math.max(region?.fromStart ?? 0, 0), rangeSize);
|
|
12036
|
-
const fromEnd = Math.min(Math.max(region?.fromEnd ?? 0, 0), rangeSize);
|
|
12037
|
-
const expandedCount = fromStart + fromEnd;
|
|
12038
|
-
const renderAll = expandedCount >= rangeSize;
|
|
12106
|
+
function getIterationStartState({ diff, diffStyle, startingLine, expandedHunks, collapsedContextThreshold }) {
|
|
12039
12107
|
return {
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
collapsedLines: Math.max(rangeSize - expandedCount, 0)
|
|
12108
|
+
hunkIndex: 0,
|
|
12109
|
+
splitCount: 0,
|
|
12110
|
+
unifiedCount: 0
|
|
12044
12111
|
};
|
|
12045
12112
|
}
|
|
12046
|
-
function
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12113
|
+
function getContextLineIterationBounds(state, count, diffStyle) {
|
|
12114
|
+
if (!state.isWindowedHighlight || count <= 0) return [0, count];
|
|
12115
|
+
const ranges = [];
|
|
12116
|
+
function pushRange(currentCount) {
|
|
12117
|
+
const start$1 = Math.max(0, state.viewportStart - currentCount);
|
|
12118
|
+
const end$1 = Math.min(count, state.viewportEnd - currentCount);
|
|
12119
|
+
if (end$1 > start$1) ranges.push([start$1, end$1]);
|
|
12120
|
+
}
|
|
12121
|
+
pushRange(state.unifiedCount);
|
|
12122
|
+
pushRange(state.splitCount);
|
|
12123
|
+
if (ranges.length === 0) return [0, 0];
|
|
12124
|
+
let start = ranges[0][0];
|
|
12125
|
+
let end = ranges[0][1];
|
|
12126
|
+
for (let index = 1; index < ranges.length; index++) {
|
|
12127
|
+
const range2 = ranges[index];
|
|
12128
|
+
start = Math.min(start, range2[0]);
|
|
12129
|
+
end = Math.max(end, range2[1]);
|
|
12130
|
+
}
|
|
12131
|
+
return [start, end];
|
|
12132
|
+
}
|
|
12133
|
+
function walkContextLines(state, count, diffStyle, callback, onSkippedStart, shouldBreak) {
|
|
12134
|
+
const [startIndex, endIndex] = getContextLineIterationBounds(state, count);
|
|
12135
|
+
if (startIndex > 0) {
|
|
12136
|
+
state.incrementCounts(startIndex, startIndex);
|
|
12137
|
+
onSkippedStart?.();
|
|
12138
|
+
}
|
|
12139
|
+
let index = startIndex;
|
|
12140
|
+
while (index < count) {
|
|
12141
|
+
if (shouldBreak?.() === true) return true;
|
|
12142
|
+
if (index >= endIndex) {
|
|
12143
|
+
state.incrementCounts(count - index, count - index);
|
|
12144
|
+
break;
|
|
12145
|
+
}
|
|
12146
|
+
if (state.isInWindow(0, 0)) {
|
|
12147
|
+
if (callback(index) === true) return true;
|
|
12148
|
+
} else state.incrementCounts(1, 1);
|
|
12149
|
+
index++;
|
|
12150
|
+
}
|
|
12151
|
+
return false;
|
|
12050
12152
|
}
|
|
12051
12153
|
function getChangeIterationRanges(state, content, diffStyle) {
|
|
12052
12154
|
if (!state.isWindowedHighlight) return [[0, Math.max(content.deletions, content.additions)]];
|
|
@@ -12085,14 +12187,14 @@ function getChangeIterationRanges(state, content, diffStyle) {
|
|
|
12085
12187
|
}
|
|
12086
12188
|
function getChangeLineData({ hunkIndex, hunk, collapsedAfter, collapsedBefore, diffStyle, index, unifiedLineIndex, splitLineIndex, additionLineIndex, deletionLineIndex, additionLineNumber, deletionLineNumber, content, isLastContent, unifiedCount, splitCount }) {
|
|
12087
12189
|
const unifiedDeletionLineIndex = index < content.deletions ? unifiedLineIndex + index : void 0;
|
|
12088
|
-
const unifiedAdditionLineIndex = index < content.additions ? unifiedLineIndex + content.deletions + index : void 0;
|
|
12089
|
-
const resolvedSplitLineIndex = splitLineIndex + index;
|
|
12190
|
+
const unifiedAdditionLineIndex = diffStyle === "unified" ? index >= content.deletions ? unifiedLineIndex + index : void 0 : index < content.additions ? unifiedLineIndex + content.deletions + index : void 0;
|
|
12191
|
+
const resolvedSplitLineIndex = diffStyle === "unified" ? splitLineIndex + (index < content.deletions ? index : index - content.deletions) : splitLineIndex + index;
|
|
12090
12192
|
const deletionLineIndexValue = index < content.deletions ? deletionLineIndex + index : void 0;
|
|
12091
12193
|
const deletionLineNumberValue = index < content.deletions ? deletionLineNumber + index : void 0;
|
|
12092
|
-
const additionLineIndexValue = index < content.additions ? additionLineIndex + index : void 0;
|
|
12093
|
-
const additionLineNumberValue = index < content.additions ? additionLineNumber + index : void 0;
|
|
12094
|
-
const noEOFCRDeletion = isLastContent && index === splitCount - 1 && hunk.noEOFCRDeletions;
|
|
12095
|
-
const noEOFCRAddition = isLastContent && index === splitCount - 1 && hunk.noEOFCRAdditions;
|
|
12194
|
+
const additionLineIndexValue = diffStyle === "unified" ? index >= content.deletions ? additionLineIndex + (index - content.deletions) : void 0 : index < content.additions ? additionLineIndex + index : void 0;
|
|
12195
|
+
const additionLineNumberValue = diffStyle === "unified" ? index >= content.deletions ? additionLineNumber + (index - content.deletions) : void 0 : index < content.additions ? additionLineNumber + index : void 0;
|
|
12196
|
+
const noEOFCRDeletion = diffStyle === "unified" ? isLastContent && index === content.deletions - 1 && hunk.noEOFCRDeletions : isLastContent && index === splitCount - 1 && hunk.noEOFCRDeletions;
|
|
12197
|
+
const noEOFCRAddition = diffStyle === "unified" ? isLastContent && index === unifiedCount - 1 && hunk.noEOFCRAdditions : isLastContent && index === splitCount - 1 && hunk.noEOFCRAdditions;
|
|
12096
12198
|
const deletionLine = deletionLineIndexValue != null && deletionLineNumberValue != null && unifiedDeletionLineIndex != null ? {
|
|
12097
12199
|
lineNumber: deletionLineNumberValue,
|
|
12098
12200
|
lineIndex: deletionLineIndexValue,
|
|
@@ -12526,6 +12628,7 @@ async function handleMessage(request) {
|
|
|
12526
12628
|
} catch (error) {
|
|
12527
12629
|
console.error("Worker error:", error);
|
|
12528
12630
|
sendError(request.id, error);
|
|
12631
|
+
} finally {
|
|
12529
12632
|
}
|
|
12530
12633
|
}
|
|
12531
12634
|
async function handleInitialize({ id, renderOptions: options, preferredHighlighter, resolvedThemes, resolvedLanguages, customExtensionsVersion: customExtensionsVersion$1, customExtensionMap }) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, D as getConfig, i as sanitizeText, F as cleanAndMerge, G as defaultConfig_default, L as getThemeVariables3, M as band, N as computeDimensionOfText, K as linear, O as line } from "./index-
|
|
1
|
+
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, D as getConfig, i as sanitizeText, F as cleanAndMerge, G as defaultConfig_default, L as getThemeVariables3, M as band, N as computeDimensionOfText, K as linear, O as line } from "./index-COTYjomB.js";
|
|
2
2
|
var parser = (function() {
|
|
3
3
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
4
4
|
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
package/out/renderer/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
21
21
|
<meta name="apple-mobile-web-app-title" content="AiderDesk">
|
|
22
22
|
<link rel="apple-touch-icon" href="/icon-192.png">
|
|
23
|
-
<script type="module" crossorigin src="./assets/index-
|
|
24
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
23
|
+
<script type="module" crossorigin src="./assets/index-COTYjomB.js"></script>
|
|
24
|
+
<link rel="stylesheet" crossorigin href="./assets/index-D56aByCg.css">
|
|
25
25
|
</head>
|
|
26
26
|
|
|
27
27
|
<body>
|
|
@@ -112,6 +112,20 @@ Do not use when:
|
|
|
112
112
|
|
|
113
113
|
**If:** Component triggers actions, implement `executeUIExtensionAction()`
|
|
114
114
|
|
|
115
|
+
### Rule: Use external libraries when UI components need npm packages
|
|
116
|
+
|
|
117
|
+
**When:** Extension UI components need third-party npm packages (charts, calendars, kanban boards, etc.)
|
|
118
|
+
|
|
119
|
+
**Then:** Implement `getUIComponentsLibraries()` returning a Record<string, string> mapping camelCase keys to npm package specs
|
|
120
|
+
|
|
121
|
+
**Must:** Access loaded libraries in JSX via `props.libraries.<key>`
|
|
122
|
+
|
|
123
|
+
**Must:** Handle the loading state — libraries are async and `props.libraries.<key>` will be `undefined` on first render
|
|
124
|
+
|
|
125
|
+
**Never:** Bundle or import React in library specs — AiderDesk's React instance is externalized automatically
|
|
126
|
+
|
|
127
|
+
**Reference:** [external-libraries.md](references/external-libraries.md) for full details, loading patterns, and examples
|
|
128
|
+
|
|
115
129
|
### Rule: Add config component for extension settings
|
|
116
130
|
|
|
117
131
|
**When:** Extension needs user-configurable settings (shown in gear icon dialog)
|
|
@@ -295,6 +309,15 @@ After completing this skill, verify:
|
|
|
295
309
|
}
|
|
296
310
|
```
|
|
297
311
|
|
|
312
|
+
**Situation:** Extension UI components need third-party npm packages
|
|
313
|
+
|
|
314
|
+
**Pattern:**
|
|
315
|
+
- When: Extension needs a library like a chart, calendar, kanban board, etc. that isn't in the built-in `ui` prop
|
|
316
|
+
- Then: Implement `getUIComponentsLibraries()` returning `{ key: 'package@^version' }`
|
|
317
|
+
- Access: Use `props.libraries.<key>` in JSX — check for `undefined` (async loading)
|
|
318
|
+
- Example: `getUIComponentsLibraries() { return { chart: 'recharts@^2.12.0' } }`
|
|
319
|
+
- Reference: [external-libraries.md](references/external-libraries.md)
|
|
320
|
+
|
|
298
321
|
**Situation:** Extension needs config storage
|
|
299
322
|
|
|
300
323
|
**Pattern:**
|
|
@@ -331,6 +354,7 @@ After completing this skill, verify:
|
|
|
331
354
|
- [event-types.md](references/event-types.md) - All event types and payloads
|
|
332
355
|
- [command-definition.md](references/command-definition.md) - Command structure
|
|
333
356
|
- [ui-components.md](references/ui-components.md) - UI component system, placements, and available components
|
|
357
|
+
- [external-libraries.md](references/external-libraries.md) - Loading third-party npm libraries in UI components (getUIComponentsLibraries)
|
|
334
358
|
- [config-components.md](references/config-components.md) - Config component API (settings UI), methods, JSX format, and patterns
|
|
335
359
|
- [examples-gallery.md](references/examples-gallery.md) - Real extension examples
|
|
336
360
|
|
|
@@ -581,3 +581,14 @@ export default class ExternalRulesExtension implements Extension {
|
|
|
581
581
|
| Tools | chunkhound-search | Custom AI tools |
|
|
582
582
|
| UI Display | tps-counter | Show information in UI |
|
|
583
583
|
| UI Interactive | multi-model-run | User input in UI |
|
|
584
|
+
| **External Libraries** | **kanban-demo.ts** | **Third-party npm packages in UI components** |
|
|
585
|
+
|
|
586
|
+
### External Libraries (kanban-demo.ts)
|
|
587
|
+
|
|
588
|
+
Uses `getUIComponentsLibraries()` to load a npm package and render it in a UI component. See [external-libraries.md](external-libraries.md) for full documentation and a minimal example.
|
|
589
|
+
|
|
590
|
+
Key patterns:
|
|
591
|
+
- `getUIComponentsLibraries()` returns `{ kanban: 'react-kanban-kit@^0.0.2-beta.7' }`
|
|
592
|
+
- JSX accesses library via `props.libraries.kanban`
|
|
593
|
+
- Loading state handled with `undefined` check + timeout-based error fallback
|
|
594
|
+
- Uses `ui.Button` and `ui.ModalOverlayLayout` alongside the external library
|
|
@@ -16,6 +16,7 @@ interface Extension {
|
|
|
16
16
|
getAgents?(context: ExtensionContext): AgentProfile[];
|
|
17
17
|
getModes?(context: ExtensionContext): ModeDefinition[];
|
|
18
18
|
getUIComponents?(context: ExtensionContext): UIComponentDefinition[];
|
|
19
|
+
getUIComponentsLibraries?(): Record<string, string>;
|
|
19
20
|
|
|
20
21
|
// UI Component support
|
|
21
22
|
getUIExtensionData?(componentId: string, context: ExtensionContext): Promise<unknown>;
|
|
@@ -250,6 +251,9 @@ interface UIComponentProps {
|
|
|
250
251
|
// Extension actions
|
|
251
252
|
executeExtensionAction: (action: string, ...args: unknown[]) => Promise<unknown>;
|
|
252
253
|
|
|
254
|
+
// External libraries (loaded via getUIComponentsLibraries)
|
|
255
|
+
libraries: Record<string, Record<string, unknown>>;
|
|
256
|
+
|
|
253
257
|
// Data from getUIExtensionData() (if loadData: true)
|
|
254
258
|
data?: unknown;
|
|
255
259
|
|