@aiderdesk/aiderdesk 0.68.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.
Files changed (62) hide show
  1. package/out/renderer/assets/{arc-Cju-fnUJ.js → arc--tfU0Ahe.js} +1 -1
  2. package/out/renderer/assets/{architectureDiagram-3BPJPVTR-hVK8LPcC.js → architectureDiagram-3BPJPVTR-D2uDC6Pw.js} +3 -3
  3. package/out/renderer/assets/{blockDiagram-GPEHLZMM-B04Ulwbh.js → blockDiagram-GPEHLZMM-BKopmU2x.js} +4 -4
  4. package/out/renderer/assets/{c4Diagram-AAUBKEIU-DSP8EUB6.js → c4Diagram-AAUBKEIU-CU9NH6bi.js} +2 -2
  5. package/out/renderer/assets/{channel-CM1Bn7Zy.js → channel-CBm2XBi8.js} +1 -1
  6. package/out/renderer/assets/{chunk-2J33WTMH-Bd_3pGvb.js → chunk-2J33WTMH-Yb07TKpF.js} +1 -1
  7. package/out/renderer/assets/{chunk-4BX2VUAB-Csrpxz3N.js → chunk-4BX2VUAB-B1KgZMg1.js} +1 -1
  8. package/out/renderer/assets/{chunk-55IACEB6-BB7RTMZZ.js → chunk-55IACEB6-BQ1g6F53.js} +1 -1
  9. package/out/renderer/assets/{chunk-727SXJPM-D6Y9H3aA.js → chunk-727SXJPM-nQzqwjgJ.js} +5 -5
  10. package/out/renderer/assets/{chunk-AQP2D5EJ-D5f9Zgag.js → chunk-AQP2D5EJ-8vVOUXUS.js} +3 -3
  11. package/out/renderer/assets/{chunk-FMBD7UC4-Bstyl64g.js → chunk-FMBD7UC4-dVquqYuV.js} +1 -1
  12. package/out/renderer/assets/{chunk-ND2GUHAM-CVaUW2HV.js → chunk-ND2GUHAM-Bu2VSodd.js} +1 -1
  13. package/out/renderer/assets/{chunk-QZHKN3VN-AMfy7Nbn.js → chunk-QZHKN3VN-Bl58FmbX.js} +1 -1
  14. package/out/renderer/assets/{classDiagram-4FO5ZUOK-CPmL8t3E.js → classDiagram-4FO5ZUOK-Dmfohc7-.js} +6 -6
  15. package/out/renderer/assets/{classDiagram-v2-Q7XG4LA2-CPmL8t3E.js → classDiagram-v2-Q7XG4LA2-Dmfohc7-.js} +6 -6
  16. package/out/renderer/assets/{cose-bilkent-S5V4N54A-px_eCLil.js → cose-bilkent-S5V4N54A-8bgOaac3.js} +1 -1
  17. package/out/renderer/assets/{dagre-BM42HDAG-c63xhfuM.js → dagre-BM42HDAG-BZZ0JLHX.js} +3 -3
  18. package/out/renderer/assets/{diagram-2AECGRRQ-DISIyKng.js → diagram-2AECGRRQ-9oArT1ZV.js} +3 -3
  19. package/out/renderer/assets/{diagram-5GNKFQAL-BSkGLBgD.js → diagram-5GNKFQAL-OMRICVmJ.js} +4 -4
  20. package/out/renderer/assets/{diagram-KO2AKTUF-xiSl-Lui.js → diagram-KO2AKTUF-pjPRIjL7.js} +3 -3
  21. package/out/renderer/assets/{diagram-LMA3HP47-lJ69G8gJ.js → diagram-LMA3HP47-cRVrdFbD.js} +3 -3
  22. package/out/renderer/assets/{diagram-OG6HWLK6-AoDpX3QT.js → diagram-OG6HWLK6-gJvA5dOA.js} +4 -4
  23. package/out/renderer/assets/{erDiagram-TEJ5UH35-O7UNRkDw.js → erDiagram-TEJ5UH35-BvHOuuhD.js} +4 -4
  24. package/out/renderer/assets/{flowDiagram-I6XJVG4X-Dd9XTtIY.js → flowDiagram-I6XJVG4X-D17Inzho.js} +6 -6
  25. package/out/renderer/assets/{ganttDiagram-6RSMTGT7-Bc7FUk0Y.js → ganttDiagram-6RSMTGT7-CIorTPIp.js} +1 -1
  26. package/out/renderer/assets/{gitGraphDiagram-PVQCEYII-DwEksAhs.js → gitGraphDiagram-PVQCEYII-R3v9UanE.js} +4 -4
  27. package/out/renderer/assets/{graph-BPvbzKl1.js → graph-DNFReSa8.js} +1 -1
  28. package/out/renderer/assets/{index-BmQl7j8n.js → index-COTYjomB.js} +27701 -132358
  29. package/out/renderer/assets/{index-z-BItG-u.css → index-D56aByCg.css} +32 -0
  30. package/out/renderer/assets/{infoDiagram-5YYISTIA-DvophXOV.js → infoDiagram-5YYISTIA-B4hJmlOG.js} +2 -2
  31. package/out/renderer/assets/{ishikawaDiagram-YF4QCWOH-CDT4EDOF.js → ishikawaDiagram-YF4QCWOH-DxohqJKP.js} +1 -1
  32. package/out/renderer/assets/{journeyDiagram-JHISSGLW-B5FCPOti.js → journeyDiagram-JHISSGLW-BxFBZYTB.js} +4 -4
  33. package/out/renderer/assets/{jsx-dev-runtime-DuBp-Rhq.js → jsx-dev-runtime-BsbxiHH-.js} +1 -1
  34. package/out/renderer/assets/{kanban-definition-UN3LZRKU-CM_TQl4S.js → kanban-definition-UN3LZRKU-B39Yt2kD.js} +2 -2
  35. package/out/renderer/assets/{layout-DdBKGefG.js → layout-yXTq0RED.js} +2 -2
  36. package/out/renderer/assets/{mindmap-definition-RKZ34NQL-BeGrpK-H.js → mindmap-definition-RKZ34NQL-BD2OIaSH.js} +3 -3
  37. package/out/renderer/assets/{pieDiagram-4H26LBE5-CnMhRK3I.js → pieDiagram-4H26LBE5-COAWItT4.js} +4 -4
  38. package/out/renderer/assets/pierre-dark-C-Drv5KU.js +4 -0
  39. package/out/renderer/assets/pierre-dark-soft-Cd74uQaL.js +4 -0
  40. package/out/renderer/assets/pierre-light-CfQnmt6J.js +4 -0
  41. package/out/renderer/assets/pierre-light-soft-DMVdU74b.js +4 -0
  42. package/out/renderer/assets/{quadrantDiagram-W4KKPZXB-O_Q_JI2s.js → quadrantDiagram-W4KKPZXB-BLY0H2F6.js} +1 -1
  43. package/out/renderer/assets/{requirementDiagram-4Y6WPE33-vf9wLf04.js → requirementDiagram-4Y6WPE33-DEJf5mz_.js} +3 -3
  44. package/out/renderer/assets/{sankeyDiagram-5OEKKPKP-CE4n-uB4.js → sankeyDiagram-5OEKKPKP-D3BkTe8z.js} +1 -1
  45. package/out/renderer/assets/{sequenceDiagram-3UESZ5HK-DebEZhql.js → sequenceDiagram-3UESZ5HK-DUU_lUpD.js} +3 -3
  46. package/out/renderer/assets/{stateDiagram-AJRCARHV-DCsVosBt.js → stateDiagram-AJRCARHV-DnH4p93i.js} +6 -6
  47. package/out/renderer/assets/{stateDiagram-v2-BHNVJYJU-8oguEvt8.js → stateDiagram-v2-BHNVJYJU-CRXRiP95.js} +4 -4
  48. package/out/renderer/assets/{timeline-definition-PNZ67QCA-CSfXVnNf.js → timeline-definition-PNZ67QCA-Uv34KQP0.js} +2 -2
  49. package/out/renderer/assets/{vennDiagram-CIIHVFJN-DxOEVeC4.js → vennDiagram-CIIHVFJN-JyUQxmn1.js} +1 -1
  50. package/out/renderer/assets/{wardley-L42UT6IY-Cz6T4MDn.js → wardley-L42UT6IY-4X2JoJpL.js} +1 -1
  51. package/out/renderer/assets/{wardleyDiagram-YWT4CUSO-B4sA3LOJ.js → wardleyDiagram-YWT4CUSO-B9pIhVmY.js} +3 -3
  52. package/out/renderer/assets/{worker-CfJUABHG.js → worker-BdXuKH1Q.js} +274 -171
  53. package/out/renderer/assets/{xychartDiagram-2RQKCTM6-DbJjruqS.js → xychartDiagram-2RQKCTM6-PJZgkel8.js} +1 -1
  54. package/out/renderer/index.html +2 -2
  55. package/out/resources/skills/extension-creator/references/ui-components.md +11 -0
  56. package/out/runner.js +323 -422
  57. package/package.json +19 -32
  58. package/patches/{ai+5.0.179.patch → ai+5.0.195.patch} +9 -9
  59. package/out/renderer/assets/pierre-dark-DADY5eR0.js +0 -4
  60. package/out/renderer/assets/pierre-light-DUjirxKp.js +0 -4
  61. package/patches/@ai-sdk+deepseek+1.0.37.patch +0 -150
  62. 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: 0,
11769
- unifiedCount: 0,
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 (const [hunkIndex, hunk] of diff.hunks.entries()) {
11804
- let getTrailingCollapsedAfter2 = function(unifiedLineIndex$1, splitLineIndex$1) {
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
- }, getPendingCollapsed2 = function() {
11808
- if (leadingRegion.collapsedLines === 0) return 0;
11809
- const value = leadingRegion.collapsedLines;
11810
- leadingRegion.collapsedLines = 0;
11811
- return value;
11899
+ }, consumePendingCollapsed = function() {
11900
+ if (consumedCollapsed) return 0;
11901
+ consumedCollapsed = true;
11902
+ return leadingRegion.collapsedLines;
11812
11903
  };
11813
- var getTrailingCollapsedAfter = getTrailingCollapsedAfter2, getPendingCollapsed = getPendingCollapsed2;
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(diff.isPartial, hunk.collapsedBefore, expandedHunks, hunkIndex, collapsedContextThreshold);
11816
- const trailingRegion = (() => {
11817
- if (hunk !== state.finalHunk || !hasFinalCollapsedHunk(diff)) return;
11818
- const additionRemaining = diff.additionLines.length - (hunk.additionLineIndex + hunk.additionCount);
11819
- const deletionRemaining = diff.deletionLines.length - (hunk.deletionLineIndex + hunk.deletionCount);
11820
- if (additionRemaining !== deletionRemaining) throw new Error(`iterateOverDiff: trailing context mismatch (additions=${additionRemaining}, deletions=${deletionRemaining}) for ${diff.name}`);
11821
- const trailingRangeSize = Math.min(additionRemaining, deletionRemaining);
11822
- return getExpandedRegion(diff.isPartial, trailingRangeSize, expandedHunks, diff.hunks.length, collapsedContextThreshold);
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
- let index = 0;
11833
- while (index < leadingRegion.fromStart) {
11834
- if (state.isInWindow(0, 0)) {
11835
- if (state.emit({
11836
- hunkIndex,
11837
- hunk,
11838
- collapsedBefore: 0,
11839
- collapsedAfter: 0,
11840
- type: "context-expanded",
11841
- deletionLine: {
11842
- lineNumber: deletionLineNumber$1 + index,
11843
- lineIndex: deletionLineIndex$1 + index,
11844
- noEOFCR: false,
11845
- unifiedLineIndex: unifiedLineIndex$1 + index,
11846
- splitLineIndex: splitLineIndex$1 + index
11847
- },
11848
- additionLine: {
11849
- unifiedLineIndex: unifiedLineIndex$1 + index,
11850
- splitLineIndex: splitLineIndex$1 + index,
11851
- lineIndex: additionLineIndex$1 + index,
11852
- lineNumber: additionLineNumber$1 + index,
11853
- noEOFCR: false
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 = 0;
11866
- while (index < leadingRegion.fromEnd) {
11867
- if (state.isInWindow(0, 0)) {
11868
- if (state.emit({
11869
- hunkIndex,
11870
- hunk,
11871
- collapsedBefore: getPendingCollapsed2(),
11872
- collapsedAfter: 0,
11873
- type: "context-expanded",
11874
- deletionLine: {
11875
- lineNumber: deletionLineNumber$1 + index,
11876
- lineIndex: deletionLineIndex$1 + index,
11877
- noEOFCR: false,
11878
- unifiedLineIndex: unifiedLineIndex$1 + index,
11879
- splitLineIndex: splitLineIndex$1 + index
11880
- },
11881
- additionLine: {
11882
- unifiedLineIndex: unifiedLineIndex$1 + index,
11883
- splitLineIndex: splitLineIndex$1 + index,
11884
- lineIndex: additionLineIndex$1 + index,
11885
- lineNumber: additionLineNumber$1 + index,
11886
- noEOFCR: false
11887
- }
11888
- })) break hunkIterator;
11889
- } else state.incrementCounts(1, 1);
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
- getPendingCollapsed2();
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
- let index = 0;
11909
- while (index < content.lines) {
11910
- if (state.isInWindow(0, 0)) {
11911
- const isLastLine = isLastContent && index === content.lines - 1;
11912
- const unifiedRowIndex = unifiedLineIndex + index;
11913
- const splitRowIndex = splitLineIndex + index;
11914
- if (state.emit({
11915
- hunkIndex,
11916
- hunk,
11917
- collapsedBefore: getPendingCollapsed2(),
11918
- collapsedAfter: getTrailingCollapsedAfter2(unifiedRowIndex, splitRowIndex),
11919
- type: "context",
11920
- deletionLine: {
11921
- lineNumber: deletionLineNumber + index,
11922
- lineIndex: deletionLineIndex + index,
11923
- noEOFCR: isLastLine && hunk.noEOFCRDeletions,
11924
- unifiedLineIndex: unifiedRowIndex,
11925
- splitLineIndex: splitRowIndex
11926
- },
11927
- additionLine: {
11928
- unifiedLineIndex: unifiedRowIndex,
11929
- splitLineIndex: splitRowIndex,
11930
- lineIndex: additionLineIndex + index,
11931
- lineNumber: additionLineNumber + index,
11932
- noEOFCR: isLastLine && hunk.noEOFCRAdditions
11933
- }
11934
- })) break hunkIterator;
11935
- } else state.incrementCounts(1, 1);
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
- getPendingCollapsed2();
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 = getTrailingCollapsedAfter2(unifiedLineIndex + index, splitLineIndex + index);
12045
+ const collapsedAfter = getTrailingCollapsedAfter(unifiedLineIndex + index, splitLineIndex + index);
11955
12046
  if (state.emit(getChangeLineData({
11956
12047
  hunkIndex,
11957
12048
  hunk,
11958
- collapsedBefore: getPendingCollapsed2(),
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
- getPendingCollapsed2();
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
- let index = 0;
11989
- while (index < len) {
11990
- if (state.shouldBreak()) break hunkIterator;
11991
- if (state.isInWindow(0, 0)) {
11992
- const isLastLine = index === len - 1;
11993
- if (state.emit({
11994
- hunkIndex: diff.hunks.length,
11995
- hunk: void 0,
11996
- collapsedBefore: 0,
11997
- collapsedAfter: isLastLine ? collapsedLines : 0,
11998
- type: "context-expanded",
11999
- deletionLine: {
12000
- lineNumber: deletionLineNumber + index,
12001
- lineIndex: deletionLineIndex + index,
12002
- noEOFCR: false,
12003
- unifiedLineIndex: unifiedLineIndex + index,
12004
- splitLineIndex: splitLineIndex + index
12005
- },
12006
- additionLine: {
12007
- unifiedLineIndex: unifiedLineIndex + index,
12008
- splitLineIndex: splitLineIndex + index,
12009
- lineIndex: additionLineIndex + index,
12010
- lineNumber: additionLineNumber + index,
12011
- noEOFCR: false
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 getExpandedRegion(isPartial, rangeSize, expandedHunks, hunkIndex, collapsedContextThreshold) {
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
- fromStart: renderAll ? rangeSize : fromStart,
12041
- fromEnd: renderAll ? 0 : fromEnd,
12042
- rangeSize,
12043
- collapsedLines: Math.max(rangeSize - expandedCount, 0)
12108
+ hunkIndex: 0,
12109
+ splitCount: 0,
12110
+ unifiedCount: 0
12044
12111
  };
12045
12112
  }
12046
- function hasFinalCollapsedHunk(diff) {
12047
- const lastHunk = diff.hunks.at(-1);
12048
- if (lastHunk == null || diff.isPartial || diff.additionLines.length === 0 || diff.deletionLines.length === 0) return false;
12049
- return lastHunk.additionLineIndex + lastHunk.additionCount < diff.additionLines.length || lastHunk.deletionLineIndex + lastHunk.deletionCount < diff.deletionLines.length;
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-BmQl7j8n.js";
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) ;
@@ -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-BmQl7j8n.js"></script>
24
- <link rel="stylesheet" crossorigin href="./assets/index-z-BItG-u.css">
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>
@@ -28,6 +28,7 @@ getUIComponents(context: ExtensionContext): UIComponentDefinition[] {
28
28
 
29
29
  - **id** (string, required): Unique identifier for the component
30
30
  - **placement** (UIComponentPlacement, required): Where to render the component
31
+ - **name** (string, optional): Display name for the component (used as floating panel title)
31
32
  - **jsx** (string, required): JSX/TSX component code as a string
32
33
  - **loadData** (boolean, optional): Whether to load data via `getUIExtensionData()` (default: false)
33
34
  - **noDataCache** (boolean, optional): Always fetch fresh data on render (default: false)
@@ -140,6 +141,16 @@ UI components can be placed in various locations throughout the AiderDesk interf
140
141
  - *Layout*: Full page layout
141
142
  - *Note*: Replaces default welcome screen entirely
142
143
 
144
+ ### Floating Panels
145
+
146
+ - **floating**: Draggable, resizable floating panel rendered as a React portal
147
+ - *Use for*: Side-by-side tools that need to coexist with the chat (inspectors, previews, dashboards, scratchpads)
148
+ - *Layout*: Free-form floating panel — extension JSX is the panel content, panel chrome (title bar, resize handles) is automatic
149
+ - *Portal*: Rendered inside the project area via a portal host — has access to current task context
150
+ - *Title*: Set via the `name` property on `UIComponentDefinition` — used as the floating panel title
151
+ - *Behavior*: Draggable by title bar, resizable from edges, minimizable. Position and size are persisted in local storage
152
+ - *Note*: Extension JSX should only contain the inner content — never wrap in a panel component
153
+
143
154
  ## Component Props
144
155
 
145
156
  All UI components receive these props via the `data` prop passed by `string-to-react-component`.