vibe64 0.1.37 → 0.1.39

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 (38) hide show
  1. package/bin/upgrade-state.js +3930 -3912
  2. package/dist/assets/{GithubBrowserTabs-BykoCFfz.js → GithubBrowserTabs-C2NO5l8g.js} +1 -1
  3. package/dist/assets/{Vibe64AuthSettingsButton-CIwtchKm.js → Vibe64AuthSettingsButton-fY4ZiIFF.js} +1 -1
  4. package/dist/assets/{Vibe64DashboardShell-DXVDJUAY.js → Vibe64DashboardShell-BSq7uXEW.js} +1 -1
  5. package/dist/assets/{Vibe64DatabaseWorkspace-Ca8IHSRq.js → Vibe64DatabaseWorkspace-CEml9BWn.js} +1 -1
  6. package/dist/assets/{Vibe64OutputControls-DngQNTTt.js → Vibe64OutputControls-_zhGX9ne.js} +1 -1
  7. package/dist/assets/{Vibe64RepositoryWorkspace-BfsZozSJ.js → Vibe64RepositoryWorkspace-obZFXkoG.js} +1 -1
  8. package/dist/assets/{Vibe64SessionFiles-n87RqqY6.js → Vibe64SessionFiles-CQzs6fee.js} +1 -1
  9. package/dist/assets/{_sessionId_-B_TTRB4c.js → _sessionId_-CKkGH3Rx.js} +1 -1
  10. package/dist/assets/{_slug_-DsqilUs_.js → _slug_-BclonbST.js} +7 -7
  11. package/dist/assets/{_slug_-Buxpw0T4.css → _slug_-CZ1bxO9C.css} +1 -1
  12. package/dist/assets/{access-tl4ht_d8.js → access-WlhPvPgy.js} +1 -1
  13. package/dist/assets/{app-DT4_MliP.js → app-BNP_n_Tt.js} +1 -1
  14. package/dist/assets/{changes-DZWHZguL.js → changes-CHJjrZAc.js} +1 -1
  15. package/dist/assets/{dashboard-iREwhGqv.js → dashboard-CuutW8iv.js} +1 -1
  16. package/dist/assets/{definitions-CNu5E87y.js → definitions-BrMvu6yV.js} +1 -1
  17. package/dist/assets/{env-D5KpTEw7.js → env-D3KQGvRe.js} +1 -1
  18. package/dist/assets/{history-DVURy45X.js → history-1_NU8azF.js} +1 -1
  19. package/dist/assets/{index-GBRpNZLy.js → index-dNxr4Lg9.js} +4 -4
  20. package/dist/assets/{integrations-Dy5jIiJ5.js → integrations-BMzWQQpa.js} +1 -1
  21. package/dist/assets/{issues-lh7R775d.js → issues-Bywux4s7.js} +1 -1
  22. package/dist/assets/{learning-_O1PEaam.js → learning-Bdi3XRS7.js} +1 -1
  23. package/dist/assets/{pull-requests-ByE-Dvk7.js → pull-requests-ncmKT3sS.js} +1 -1
  24. package/dist/assets/{repository-BUfUAyS9.js → repository-BL_2bgzC.js} +1 -1
  25. package/dist/assets/{settings-CzhIcn9K.js → settings-1rpuL7eR.js} +1 -1
  26. package/dist/assets/{useArchivedVibe64Sessions-CLHJOyeW.js → useArchivedVibe64Sessions-_LB2XxEa.js} +1 -1
  27. package/dist/assets/{useVibe64ConversationLog-B4JgmxUf.js → useVibe64ConversationLog-BqUI0S5n.js} +1 -1
  28. package/dist/assets/{useVibe64SessionData-YhhE_5pC.js → useVibe64SessionData-B686lToN.js} +1 -1
  29. package/dist/assets/{useVibe64SessionSelection-CuZCzAcY.js → useVibe64SessionSelection-BzL1y_Vq.js} +1 -1
  30. package/dist/assets/{vibe64SessionFocus-Cz5Vq1re.js → vibe64SessionFocus-CqZNTvYF.js} +1 -1
  31. package/dist/index.html +1 -1
  32. package/docs/colleague-usage/learning-environment.md +1 -2
  33. package/docs/colleague-usage/lesson-step-bar.md +15 -16
  34. package/docs/colleague-usage/project-language-tools.md +7 -2
  35. package/docs/training-content.md +2 -1
  36. package/node_modules/@local/vibe64-genesis/src/server/index.js +47 -46
  37. package/package.json +3 -3
  38. package/server.bundle.mjs +23990 -23879
@@ -1,4 +1,4 @@
1
- import{Zn as __toESM,d as VProgressLinear,h as VIcon,qn as __commonJSMin}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,Pt as useId,Zn as normalizeClass,_ as createBaseVNode,b as createElementBlock,bt as renderList,ct as onMounted,er as normalizeStyle,g as computed,gn as reactive,it as onBeforeUnmount,mt as openBlock,o as Fragment,pn as onScopeDispose,qt as withCtx,tr as toDisplayString,v as createBlock,vn as ref,w as createSlots,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{n as useRealtimeEvent,p as getHttpWebClient}from"./useRealtimeEvent-Bwapstla.js";import{t as VChip}from"./VChip-CcI-Oo2J.js";import{Ct as mdiFileCompare,H as mdiClockOutline,I as mdiChevronRight,K as mdiCloudRefreshOutline,U as mdiClose,er as mdiSourceBranchSync,ir as mdiSourceRepository,nr as mdiSourceMerge,o as mdiAccountOutline,tr as mdiSourceCommit}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VDivider}from"./VDivider-BMEqUoAB.js";import{t as VSheet}from"./VSheet-DZWsu0kL.js";import{t as VDialog}from"./VDialog-Bu3EfKb1.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-mXy0k4aS.js";import{t as VSpacer}from"./VSpacer-Dhmsvk4t.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{t as StudioErrorNotice_default}from"./StudioErrorNotice-CSrUw1QV.js";import{r as writeLocalStorageJson,t as readLocalStorageJson}from"./browserLocalStorage-B4C7rHrs.js";import"./shared-BEwrtWSp.js";import{n as vibe64ApiResponseError}from"./vibe64ApiResponses-DNLY1Kel.js";import{D as VIBE64_SESSION_CHANGED_EVENT,J as vibe64RepositoryVersionFilesPath,K as vibe64RepositoryHistoryPath,O as VIBE64_SOURCE_EDITOR_FILE_CHANGED_EVENT,X as vibe64SessionChangesPath,Y as vibe64SessionChangeDiffPath,Z as vibe64SessionCheckUpdatesPath,q as vibe64RepositoryVersionDiffPath,y as readRefOrGetterValue}from"./index-GBRpNZLy.js";import{t as Vibe64TemporaryAiFixAction_default}from"./Vibe64TemporaryAiFixAction-BiuIE9mC.js";import{n as diffWordsWithSpace,r as diffChars}from"./libesm-CR-iGldz.js";import{n as repositoryStatusRealtimeShouldRefresh,r as repositoryStatusSessionId,t as repositoryStatusRealtimeNeedsCanonicalCheck}from"./vibe64RepositoryRealtime-DXk0Jai3.js";import{t as Vibe64DashboardPageHeader_default}from"./Vibe64DashboardPageHeader-BXQR00HK.js";function nonnegativeInteger(value){const number=Number(value);return Number.isSafeInteger(number)&&number>=0?number:0}function repositoryUpdateRelationship(aheadValue=0,behindValue=0){const ahead=nonnegativeInteger(aheadValue);const behind=nonnegativeInteger(behindValue);if(ahead>0&&behind>0)return`diverged`;if(behind>0)return`behind`;if(ahead>0)return`ahead`;return`current`}var LineType;(function(LineType){LineType[`INSERT`]=`insert`;LineType[`DELETE`]=`delete`;LineType[`CONTEXT`]=`context`})(LineType||(LineType={}));var OutputFormatType={LINE_BY_LINE:`line-by-line`,SIDE_BY_SIDE:`side-by-side`};var LineMatchingType={LINES:`lines`,WORDS:`words`,NONE:`none`};var DiffStyleType={WORD:`word`,CHAR:`char`};var ColorSchemeType;(function(ColorSchemeType){ColorSchemeType[`AUTO`]=`auto`;ColorSchemeType[`DARK`]=`dark`;ColorSchemeType[`LIGHT`]=`light`})(ColorSchemeType||(ColorSchemeType={}));var regex=RegExp(`[`+[`-`,`[`,`]`,`/`,`{`,`}`,`(`,`)`,`*`,`+`,`?`,`.`,`\\`,`^`,`$`,`|`].join(`\\`)+`]`,`g`);function escapeForRegExp(str){return str.replace(regex,`\\$&`)}function unifyPath(path){return path?path.replace(/\\/g,`/`):path}function hashCode(text){let i,chr,len;let hash=0;for(i=0,len=text.length;i<len;i++){chr=text.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0}return hash}function max(arr){const length=arr.length;let max=-Infinity;for(let i=0;i<length;i++)max=Math.max(max,arr[i]);return max}function getExtension(filename,language){const filenameParts=filename.split(`.`);return filenameParts.length>1?filenameParts[filenameParts.length-1]:language}function startsWithAny(str,prefixes){return prefixes.reduce((startsWith,prefix)=>startsWith||str.startsWith(prefix),false)}var baseDiffFilenamePrefixes=[`a/`,`b/`,`i/`,`w/`,`c/`,`o/`];function getFilename(line,linePrefix,extraPrefix){const prefixes=extraPrefix!==void 0?[...baseDiffFilenamePrefixes,extraPrefix]:baseDiffFilenamePrefixes;const[,filename=``]=(linePrefix?new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`):new RegExp(`^"?(.+?)"?$`)).exec(line)||[];const matchingPrefix=prefixes.find(p=>filename.indexOf(p)===0);return(matchingPrefix?filename.slice(matchingPrefix.length):filename).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,``)}function getSrcFilename(line,srcPrefix){return getFilename(line,`---`,srcPrefix)}function getDstFilename(line,dstPrefix){return getFilename(line,`+++`,dstPrefix)}function parse(diffInput,config={}){const files=[];let currentFile=null;let currentBlock=null;let oldLine=null;let oldLine2=null;let newLine=null;let possibleOldName=null;let possibleNewName=null;const oldFileNameHeader=`--- `;const newFileNameHeader=`+++ `;const hunkHeaderPrefix=`@@`;const oldMode=/^old mode (\d{6})/;const newMode=/^new mode (\d{6})/;const deletedFileMode=/^deleted file mode (\d{6})/;const newFileMode=/^new file mode (\d{6})/;const copyFrom=/^copy from "?(.+)"?/;const copyTo=/^copy to "?(.+)"?/;const renameFrom=/^rename from "?(.+)"?/;const renameTo=/^rename to "?(.+)"?/;const similarityIndex=/^similarity index (\d+)%/;const dissimilarityIndex=/^dissimilarity index (\d+)%/;const index=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/;const binaryFiles=/^Binary files (.*) and (.*) differ/;const binaryDiff=/^GIT binary patch/;const combinedIndex=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/;const combinedMode=/^mode (\d{6}),(\d{6})\.\.(\d{6})/;const combinedNewFile=/^new file mode (\d{6})/;const combinedDeletedFile=/^deleted file mode (\d{6}),(\d{6})/;const diffLines=diffInput.replace(/\/g,``).replace(/\r\n?/g,`
1
+ import{Zn as __toESM,d as VProgressLinear,h as VIcon,qn as __commonJSMin}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,Pt as useId,Zn as normalizeClass,_ as createBaseVNode,b as createElementBlock,bt as renderList,ct as onMounted,er as normalizeStyle,g as computed,gn as reactive,it as onBeforeUnmount,mt as openBlock,o as Fragment,pn as onScopeDispose,qt as withCtx,tr as toDisplayString,v as createBlock,vn as ref,w as createSlots,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{n as useRealtimeEvent,p as getHttpWebClient}from"./useRealtimeEvent-Bwapstla.js";import{t as VChip}from"./VChip-CcI-Oo2J.js";import{Ct as mdiFileCompare,H as mdiClockOutline,I as mdiChevronRight,K as mdiCloudRefreshOutline,U as mdiClose,er as mdiSourceBranchSync,ir as mdiSourceRepository,nr as mdiSourceMerge,o as mdiAccountOutline,tr as mdiSourceCommit}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VDivider}from"./VDivider-BMEqUoAB.js";import{t as VSheet}from"./VSheet-DZWsu0kL.js";import{t as VDialog}from"./VDialog-Bu3EfKb1.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-mXy0k4aS.js";import{t as VSpacer}from"./VSpacer-Dhmsvk4t.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{t as StudioErrorNotice_default}from"./StudioErrorNotice-CSrUw1QV.js";import{r as writeLocalStorageJson,t as readLocalStorageJson}from"./browserLocalStorage-B4C7rHrs.js";import"./shared-BEwrtWSp.js";import{n as vibe64ApiResponseError}from"./vibe64ApiResponses-DNLY1Kel.js";import{D as VIBE64_SESSION_CHANGED_EVENT,J as vibe64RepositoryVersionFilesPath,K as vibe64RepositoryHistoryPath,O as VIBE64_SOURCE_EDITOR_FILE_CHANGED_EVENT,X as vibe64SessionChangesPath,Y as vibe64SessionChangeDiffPath,Z as vibe64SessionCheckUpdatesPath,q as vibe64RepositoryVersionDiffPath,y as readRefOrGetterValue}from"./index-dNxr4Lg9.js";import{t as Vibe64TemporaryAiFixAction_default}from"./Vibe64TemporaryAiFixAction-BiuIE9mC.js";import{n as diffWordsWithSpace,r as diffChars}from"./libesm-CR-iGldz.js";import{n as repositoryStatusRealtimeShouldRefresh,r as repositoryStatusSessionId,t as repositoryStatusRealtimeNeedsCanonicalCheck}from"./vibe64RepositoryRealtime-DXk0Jai3.js";import{t as Vibe64DashboardPageHeader_default}from"./Vibe64DashboardPageHeader-BXQR00HK.js";function nonnegativeInteger(value){const number=Number(value);return Number.isSafeInteger(number)&&number>=0?number:0}function repositoryUpdateRelationship(aheadValue=0,behindValue=0){const ahead=nonnegativeInteger(aheadValue);const behind=nonnegativeInteger(behindValue);if(ahead>0&&behind>0)return`diverged`;if(behind>0)return`behind`;if(ahead>0)return`ahead`;return`current`}var LineType;(function(LineType){LineType[`INSERT`]=`insert`;LineType[`DELETE`]=`delete`;LineType[`CONTEXT`]=`context`})(LineType||(LineType={}));var OutputFormatType={LINE_BY_LINE:`line-by-line`,SIDE_BY_SIDE:`side-by-side`};var LineMatchingType={LINES:`lines`,WORDS:`words`,NONE:`none`};var DiffStyleType={WORD:`word`,CHAR:`char`};var ColorSchemeType;(function(ColorSchemeType){ColorSchemeType[`AUTO`]=`auto`;ColorSchemeType[`DARK`]=`dark`;ColorSchemeType[`LIGHT`]=`light`})(ColorSchemeType||(ColorSchemeType={}));var regex=RegExp(`[`+[`-`,`[`,`]`,`/`,`{`,`}`,`(`,`)`,`*`,`+`,`?`,`.`,`\\`,`^`,`$`,`|`].join(`\\`)+`]`,`g`);function escapeForRegExp(str){return str.replace(regex,`\\$&`)}function unifyPath(path){return path?path.replace(/\\/g,`/`):path}function hashCode(text){let i,chr,len;let hash=0;for(i=0,len=text.length;i<len;i++){chr=text.charCodeAt(i);hash=(hash<<5)-hash+chr;hash|=0}return hash}function max(arr){const length=arr.length;let max=-Infinity;for(let i=0;i<length;i++)max=Math.max(max,arr[i]);return max}function getExtension(filename,language){const filenameParts=filename.split(`.`);return filenameParts.length>1?filenameParts[filenameParts.length-1]:language}function startsWithAny(str,prefixes){return prefixes.reduce((startsWith,prefix)=>startsWith||str.startsWith(prefix),false)}var baseDiffFilenamePrefixes=[`a/`,`b/`,`i/`,`w/`,`c/`,`o/`];function getFilename(line,linePrefix,extraPrefix){const prefixes=extraPrefix!==void 0?[...baseDiffFilenamePrefixes,extraPrefix]:baseDiffFilenamePrefixes;const[,filename=``]=(linePrefix?new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`):new RegExp(`^"?(.+?)"?$`)).exec(line)||[];const matchingPrefix=prefixes.find(p=>filename.indexOf(p)===0);return(matchingPrefix?filename.slice(matchingPrefix.length):filename).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,``)}function getSrcFilename(line,srcPrefix){return getFilename(line,`---`,srcPrefix)}function getDstFilename(line,dstPrefix){return getFilename(line,`+++`,dstPrefix)}function parse(diffInput,config={}){const files=[];let currentFile=null;let currentBlock=null;let oldLine=null;let oldLine2=null;let newLine=null;let possibleOldName=null;let possibleNewName=null;const oldFileNameHeader=`--- `;const newFileNameHeader=`+++ `;const hunkHeaderPrefix=`@@`;const oldMode=/^old mode (\d{6})/;const newMode=/^new mode (\d{6})/;const deletedFileMode=/^deleted file mode (\d{6})/;const newFileMode=/^new file mode (\d{6})/;const copyFrom=/^copy from "?(.+)"?/;const copyTo=/^copy to "?(.+)"?/;const renameFrom=/^rename from "?(.+)"?/;const renameTo=/^rename to "?(.+)"?/;const similarityIndex=/^similarity index (\d+)%/;const dissimilarityIndex=/^dissimilarity index (\d+)%/;const index=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/;const binaryFiles=/^Binary files (.*) and (.*) differ/;const binaryDiff=/^GIT binary patch/;const combinedIndex=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/;const combinedMode=/^mode (\d{6}),(\d{6})\.\.(\d{6})/;const combinedNewFile=/^new file mode (\d{6})/;const combinedDeletedFile=/^deleted file mode (\d{6}),(\d{6})/;const diffLines=diffInput.replace(/\/g,``).replace(/\r\n?/g,`
2
2
  `).split(`
3
3
  `);function saveBlock(){if(currentBlock!==null&&currentFile!==null){currentFile.blocks.push(currentBlock);currentBlock=null}}function saveFile(){if(currentFile!==null){if(!currentFile.oldName&&possibleOldName!==null)currentFile.oldName=possibleOldName;if(!currentFile.newName&&possibleNewName!==null)currentFile.newName=possibleNewName;if(currentFile.newName){files.push(currentFile);currentFile=null}}possibleOldName=null;possibleNewName=null}function startFile(){saveBlock();saveFile();currentFile={blocks:[],deletedLines:0,addedLines:0}}function startBlock(line){saveBlock();let values;if(currentFile!==null){if(values=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line)){currentFile.isCombined=false;oldLine=parseInt(values[1],10);newLine=parseInt(values[2],10)}else if(values=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(line)){currentFile.isCombined=true;oldLine=parseInt(values[1],10);oldLine2=parseInt(values[2],10);newLine=parseInt(values[3],10)}else{if(line.startsWith(hunkHeaderPrefix))console.error(`Failed to parse lines, starting in 0!`);oldLine=0;newLine=0;currentFile.isCombined=false}}currentBlock={lines:[],oldStartLine:oldLine,oldStartLine2:oldLine2,newStartLine:newLine,header:line}}function createLine(line){if(currentFile===null||currentBlock===null||oldLine===null||newLine===null)return;const currentLine={content:line};const addedPrefixes=currentFile.isCombined?[`+ `,` +`,`++`]:[`+`];const deletedPrefixes=currentFile.isCombined?[`- `,` -`,`--`]:[`-`];if(startsWithAny(line,addedPrefixes)){currentFile.addedLines++;currentLine.type=LineType.INSERT;currentLine.oldNumber=void 0;currentLine.newNumber=newLine++}else if(startsWithAny(line,deletedPrefixes)){currentFile.deletedLines++;currentLine.type=LineType.DELETE;currentLine.oldNumber=oldLine++;currentLine.newNumber=void 0}else{currentLine.type=LineType.CONTEXT;currentLine.oldNumber=oldLine++;currentLine.newNumber=newLine++}currentBlock.lines.push(currentLine)}function existHunkHeader(line,lineIdx){let idx=lineIdx;while(idx<diffLines.length-3){if(line.startsWith(`diff`))return false;if(diffLines[idx].startsWith(oldFileNameHeader)&&diffLines[idx+1].startsWith(newFileNameHeader)&&diffLines[idx+2].startsWith(hunkHeaderPrefix))return true;idx++}return false}diffLines.forEach((line,lineIndex)=>{if(!line||line.startsWith(`*`))return;let values;const prevLine=diffLines[lineIndex-1];const nxtLine=diffLines[lineIndex+1];const afterNxtLine=diffLines[lineIndex+2];if(line.startsWith(`diff --git`)||line.startsWith(`diff --combined`)){startFile();if(values=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(line)){possibleOldName=getFilename(values[1],void 0,config.dstPrefix);possibleNewName=getFilename(values[2],void 0,config.srcPrefix)}if(currentFile===null)throw new Error(`Where is my file !!!`);currentFile.isGitDiff=true;return}if(line.startsWith(`Binary files`)&&!(currentFile===null||currentFile===void 0?void 0:currentFile.isGitDiff)){startFile();if(values=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(line)){possibleOldName=getFilename(values[1],void 0,config.dstPrefix);possibleNewName=getFilename(values[2],void 0,config.srcPrefix)}if(currentFile===null)throw new Error(`Where is my file !!!`);currentFile.isBinary=true;return}if(!currentFile||!currentFile.isGitDiff&&currentFile&&line.startsWith(oldFileNameHeader)&&nxtLine.startsWith(newFileNameHeader)&&afterNxtLine.startsWith(hunkHeaderPrefix))startFile();if(currentFile===null||currentFile===void 0?void 0:currentFile.isTooBig)return;if(currentFile&&(typeof config.diffMaxChanges===`number`&&currentFile.addedLines+currentFile.deletedLines>config.diffMaxChanges||typeof config.diffMaxLineLength===`number`&&line.length>config.diffMaxLineLength)){currentFile.isTooBig=true;currentFile.addedLines=0;currentFile.deletedLines=0;currentFile.blocks=[];currentBlock=null;startBlock(typeof config.diffTooBigMessage===`function`?config.diffTooBigMessage(files.length):`Diff too big to be displayed`);return}if(line.startsWith(oldFileNameHeader)&&nxtLine.startsWith(newFileNameHeader)||line.startsWith(newFileNameHeader)&&prevLine.startsWith(oldFileNameHeader)){if(currentFile&&!currentFile.oldName&&line.startsWith(`--- `)&&(values=getSrcFilename(line,config.srcPrefix))){currentFile.oldName=values;currentFile.language=getExtension(currentFile.oldName,currentFile.language);return}if(currentFile&&!currentFile.newName&&line.startsWith(`+++ `)&&(values=getDstFilename(line,config.dstPrefix))){currentFile.newName=values;currentFile.language=getExtension(currentFile.newName,currentFile.language);return}}if(currentFile&&(line.startsWith(hunkHeaderPrefix)||currentFile.isGitDiff&&currentFile.oldName&&currentFile.newName&&!currentBlock)){startBlock(line);return}if(currentBlock&&(line.startsWith(`+`)||line.startsWith(`-`)||line.startsWith(` `))){createLine(line);return}const doesNotExistHunkHeader=!existHunkHeader(line,lineIndex);if(currentFile===null)throw new Error(`Where is my file !!!`);if(values=oldMode.exec(line))currentFile.oldMode=values[1];else if(values=newMode.exec(line))currentFile.newMode=values[1];else if(values=deletedFileMode.exec(line)){currentFile.deletedFileMode=values[1];currentFile.isDeleted=true}else if(values=newFileMode.exec(line)){currentFile.newFileMode=values[1];currentFile.isNew=true}else if(values=copyFrom.exec(line)){if(doesNotExistHunkHeader)currentFile.oldName=values[1];currentFile.isCopy=true}else if(values=copyTo.exec(line)){if(doesNotExistHunkHeader)currentFile.newName=values[1];currentFile.isCopy=true}else if(values=renameFrom.exec(line)){if(doesNotExistHunkHeader)currentFile.oldName=values[1];currentFile.isRename=true}else if(values=renameTo.exec(line)){if(doesNotExistHunkHeader)currentFile.newName=values[1];currentFile.isRename=true}else if(values=binaryFiles.exec(line)){currentFile.isBinary=true;currentFile.oldName=getFilename(values[1],void 0,config.srcPrefix);currentFile.newName=getFilename(values[2],void 0,config.dstPrefix);startBlock(`Binary file`)}else if(binaryDiff.test(line)){currentFile.isBinary=true;startBlock(line)}else if(values=similarityIndex.exec(line))currentFile.unchangedPercentage=parseInt(values[1],10);else if(values=dissimilarityIndex.exec(line))currentFile.changedPercentage=parseInt(values[1],10);else if(values=index.exec(line)){currentFile.checksumBefore=values[1];currentFile.checksumAfter=values[2];if(values[3])currentFile.mode=values[3]}else if(values=combinedIndex.exec(line)){currentFile.checksumBefore=[values[2],values[3]];currentFile.checksumAfter=values[1]}else if(values=combinedMode.exec(line)){currentFile.oldMode=[values[2],values[3]];currentFile.newMode=values[1]}else if(values=combinedNewFile.exec(line)){currentFile.newFileMode=values[1];currentFile.isNew=true}else if(values=combinedDeletedFile.exec(line)){currentFile.deletedFileMode=values[1];currentFile.isDeleted=true}});saveBlock();saveFile();return files}function levenshtein(a,b){if(a.length===0)return b.length;if(b.length===0)return a.length;const matrix=[];let i=0;for(;i<=b.length;i++)matrix[i]=[i];let j=0;for(;j<=a.length;j++)matrix[0][j]=j;for(i=1;i<=b.length;i++)for(j=1;j<=a.length;j++)if(b.charAt(i-1)===a.charAt(j-1))matrix[i][j]=matrix[i-1][j-1];else matrix[i][j]=Math.min(matrix[i-1][j-1]+1,Math.min(matrix[i][j-1]+1,matrix[i-1][j]+1));return matrix[b.length][a.length]}function newDistanceFn(str){return(x,y)=>{const xValue=str(x).trim();const yValue=str(y).trim();return levenshtein(xValue,yValue)/(xValue.length+yValue.length)}}function newMatcherFn(distance){function findBestMatch(a,b,cache=new Map){let bestMatchDist=Infinity;let bestMatch;for(let i=0;i<a.length;++i)for(let j=0;j<b.length;++j){const cacheKey=JSON.stringify([a[i],b[j]]);let md;if(!(cache.has(cacheKey)&&(md=cache.get(cacheKey)))){md=distance(a[i],b[j]);cache.set(cacheKey,md)}if(md<bestMatchDist){bestMatchDist=md;bestMatch={indexA:i,indexB:j,score:bestMatchDist}}}return bestMatch}function group(a,b,level=0,cache=new Map){const bm=findBestMatch(a,b,cache);if(!bm||a.length+b.length<3)return[[a,b]];const a1=a.slice(0,bm.indexA);const b1=b.slice(0,bm.indexB);const aMatch=[a[bm.indexA]];const bMatch=[b[bm.indexB]];const tailA=bm.indexA+1;const tailB=bm.indexB+1;const a2=a.slice(tailA);const b2=b.slice(tailB);const group1=group(a1,b1,level+1,cache);const groupMatch=group(aMatch,bMatch,level+1,cache);const group2=group(a2,b2,level+1,cache);let result=groupMatch;if(bm.indexA>0||bm.indexB>0)result=group1.concat(result);if(a.length>tailA||b.length>tailB)result=result.concat(group2);return result}return group}var CSSLineClass={INSERTS:`d2h-ins`,DELETES:`d2h-del`,CONTEXT:`d2h-cntx`,INFO:`d2h-info`,INSERT_CHANGES:`d2h-ins d2h-change`,DELETE_CHANGES:`d2h-del d2h-change`};var defaultRenderConfig={matching:LineMatchingType.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:DiffStyleType.WORD,colorScheme:ColorSchemeType.LIGHT};var separator=`/`;var distance=newDistanceFn(change=>change.value);var matcher=newMatcherFn(distance);function isDevNullName(name){return name.indexOf(`dev/null`)!==-1}function removeInsElements(line){return line.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,``)}function removeDelElements(line){return line.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,``)}function toCSSClass(lineType){switch(lineType){case LineType.CONTEXT:return CSSLineClass.CONTEXT;case LineType.INSERT:return CSSLineClass.INSERTS;case LineType.DELETE:return CSSLineClass.DELETES}}function colorSchemeToCss(colorScheme){switch(colorScheme){case ColorSchemeType.DARK:return`d2h-dark-color-scheme`;case ColorSchemeType.AUTO:return`d2h-auto-color-scheme`;case ColorSchemeType.LIGHT:default:return`d2h-light-color-scheme`}}function prefixLength(isCombined){return isCombined?2:1}function escapeForHtml(str){return str.slice(0).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`).replace(/\//g,`&#x2F;`)}function deconstructLine(line,isCombined,escape=true){const indexToSplit=prefixLength(isCombined);return{prefix:line.substring(0,indexToSplit),content:escape?escapeForHtml(line.substring(indexToSplit)):line.substring(indexToSplit)}}function filenameDiff(file){const oldFilename=unifyPath(file.oldName);const newFilename=unifyPath(file.newName);if(oldFilename!==newFilename&&!isDevNullName(oldFilename)&&!isDevNullName(newFilename)){const prefixPaths=[];const suffixPaths=[];const oldFilenameParts=oldFilename.split(separator);const newFilenameParts=newFilename.split(separator);const oldFilenamePartsSize=oldFilenameParts.length;const newFilenamePartsSize=newFilenameParts.length;let i=0;let j=oldFilenamePartsSize-1;let k=newFilenamePartsSize-1;while(i<j&&i<k)if(oldFilenameParts[i]===newFilenameParts[i]){prefixPaths.push(newFilenameParts[i]);i+=1}else break;while(j>i&&k>i)if(oldFilenameParts[j]===newFilenameParts[k]){suffixPaths.unshift(newFilenameParts[k]);j-=1;k-=1}else break;const finalPrefix=prefixPaths.join(separator);const finalSuffix=suffixPaths.join(separator);const oldRemainingPath=oldFilenameParts.slice(i,j+1).join(separator);const newRemainingPath=newFilenameParts.slice(i,k+1).join(separator);if(finalPrefix.length&&finalSuffix.length)return finalPrefix+`/{`+oldRemainingPath+` → `+newRemainingPath+`}/`+finalSuffix;else if(finalPrefix.length)return finalPrefix+`/{`+oldRemainingPath+` → `+newRemainingPath+`}`;else if(finalSuffix.length)return`{`+oldRemainingPath+` → `+newRemainingPath+`}/`+finalSuffix;return oldFilename+` → `+newFilename}else if(!isDevNullName(newFilename))return newFilename;else return oldFilename}function getHtmlId(file){return`d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`}function getFileIcon(file){let templateName=`file-changed`;if(file.isRename)templateName=`file-renamed`;else if(file.isCopy)templateName=`file-renamed`;else if(file.isNew)templateName=`file-added`;else if(file.isDeleted)templateName=`file-deleted`;else if(file.newName!==file.oldName)templateName=`file-renamed`;return templateName}function diffHighlight(diffLine1,diffLine2,isCombined,config={}){const{matching,maxLineLengthHighlight,matchWordsThreshold,diffStyle}=Object.assign(Object.assign({},defaultRenderConfig),config);const line1=deconstructLine(diffLine1,isCombined,false);const line2=deconstructLine(diffLine2,isCombined,false);if(line1.content.length>maxLineLengthHighlight||line2.content.length>maxLineLengthHighlight)return{oldLine:{prefix:line1.prefix,content:escapeForHtml(line1.content)},newLine:{prefix:line2.prefix,content:escapeForHtml(line2.content)}};const diff=diffStyle===`char`?diffChars(line1.content,line2.content):diffWordsWithSpace(line1.content,line2.content);const changedWords=[];if(diffStyle===`word`&&matching===`words`){const removed=diff.filter(element=>element.removed);const added=diff.filter(element=>element.added);matcher(added,removed).forEach(chunk=>{if(chunk[0].length===1&&chunk[1].length===1){if(distance(chunk[0][0],chunk[1][0])<matchWordsThreshold){changedWords.push(chunk[0][0]);changedWords.push(chunk[1][0])}}})}const highlightedLine=diff.reduce((highlightedLine,part)=>{const elemType=part.added?`ins`:part.removed?`del`:null;const addClass=changedWords.indexOf(part)>-1?` class="d2h-change"`:``;const escapedValue=escapeForHtml(part.value);return elemType!==null?`${highlightedLine}<${elemType}${addClass}>${escapedValue}</${elemType}>`:`${highlightedLine}${escapedValue}`},``);return{oldLine:{prefix:line1.prefix,content:removeInsElements(highlightedLine)},newLine:{prefix:line2.prefix,content:removeDelElements(highlightedLine)}}}var baseTemplatesPath$2=`file-summary`;var iconsBaseTemplatesPath$2=`icon`;var defaultFileListRendererConfig={colorScheme:defaultRenderConfig.colorScheme};var FileListRenderer=class{constructor(hoganUtils,config={}){this.hoganUtils=hoganUtils;this.config=Object.assign(Object.assign({},defaultFileListRendererConfig),config)}render(diffFiles){const files=diffFiles.map(file=>this.hoganUtils.render(baseTemplatesPath$2,`line`,{fileHtmlId:getHtmlId(file),oldName:file.oldName,newName:file.newName,fileName:filenameDiff(file),deletedLines:`-`+file.deletedLines,addedLines:`+`+file.addedLines},{fileIcon:this.hoganUtils.template(iconsBaseTemplatesPath$2,getFileIcon(file))})).join(`
4
4
  `);return this.hoganUtils.render(baseTemplatesPath$2,`wrapper`,{colorScheme:colorSchemeToCss(this.config.colorScheme),filesNumber:diffFiles.length,files})}};var defaultLineByLineRendererConfig=Object.assign(Object.assign({},defaultRenderConfig),{renderNothingWhenEmpty:false,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200});var genericTemplatesPath$1=`generic`;var baseTemplatesPath$1=`line-by-line`;var iconsBaseTemplatesPath$1=`icon`;var tagsBaseTemplatesPath$1=`tag`;var LineByLineRenderer=class{constructor(hoganUtils,config={}){this.hoganUtils=hoganUtils;this.config=Object.assign(Object.assign({},defaultLineByLineRendererConfig),config)}render(diffFiles){const diffsHtml=diffFiles.map(file=>{let diffs;if(file.blocks.length)diffs=this.generateFileHtml(file);else diffs=this.generateEmptyDiff();return this.makeFileDiffHtml(file,diffs)}).join(`
@@ -1,4 +1,4 @@
1
- import{B as VDefaultsProvider,E as useDensity,F as useBackgroundColor,Gn as withKeys,Kn as withModifiers,L as useTextColor,N as makeRoundedProps,P as useRounded,R as makeDimensionProps,T as makeDensityProps,V as makeTagProps,Wn as vShow,an as pick,ft as provideDefaults,gt as propsFactory,h as VIcon,ht as makeComponentProps,i as useLink,it as useRender,kn as isString,n as makeRouterProps,st as genericComponent,tt as IconValue,z as useDimension}from"./ripple-BVltMmyV.js";import{$n as normalizeProps,D as createVNode,E as createTextVNode,En as toValue,Ht as watch,On as unref,St as resolveComponent,Yt as withDirectives,Zn as normalizeClass,_ as createBaseVNode,an as getCurrentScope,b as createElementBlock,bt as renderList,ct as onMounted,er as normalizeStyle,et as mergeProps,g as computed,gn as reactive,it as onBeforeUnmount,mt as openBlock,o as Fragment,pn as onScopeDispose,qt as withCtx,tr as toDisplayString,tt as nextTick,v as createBlock,vn as ref,w as createSlots,wn as toRef,wt as resolveDynamicComponent,xt as renderSlot,y as createCommentVNode,z as guardReactiveProps}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{T as ROUTE_VISIBILITY_PUBLIC,t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{n as useRealtimeEvent,p as getHttpWebClient}from"./useRealtimeEvent-Bwapstla.js";import{g as useDisplay}from"./VAvatar-DPzqDH4r.js";import{n as VList,s as VListItem,t as VMenu}from"./VMenu-C_x18lwb.js";import{t as VChip}from"./VChip-CcI-Oo2J.js";import{t as VTextField}from"./VTextField-BR2eZeFT.js";import{r as scopedDevelopmentApiUrl,t as resolveStudioRequestUrl}from"./studioUrls-DmMMIScP.js";import{Bn as mdiRedoVariant,Cn as mdiMicrophoneOff,Dt as mdiFileOutline,F as mdiChevronLeft,Ft as mdiFolderPlusOutline,Gn as mdiRobotOutline,I as mdiChevronRight,Jn as mdiSend,Ot as mdiFilePlusOutline,Pt as mdiFolderOutline,Q as mdiCollapseAllOutline,Sn as mdiMicrophone,Sr as mdiVolumeOff,Tt as mdiFileDocumentOutline,U as mdiClose,Un as mdiRestore,Vn as mdiRefresh,_ as mdiArrowLeft,_r as mdiUndoVariant,ar as mdiStar,at as mdiContentSaveOutline,ft as mdiDeleteOutline,gt as mdiDownload,ht as mdiDotsVertical,ir as mdiSourceRepository,jn as mdiPencilOutline,kt as mdiFileSearchOutline,m as mdiArchiveClockOutline,or as mdiStarOutline,pr as mdiTrayArrowUp,pt as mdiDotsHorizontal,rt as mdiContentCopy,sr as mdiStop,vr as mdiUpload,xr as mdiVolumeHigh,xt as mdiFileCodeOutline,yn as mdiMagnify}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VDialog}from"./VDialog-Bu3EfKb1.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-mXy0k4aS.js";import{t as VSpacer}from"./VSpacer-Dhmsvk4t.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-CttxM1tw.js";import{t as VTextarea}from"./VTextarea-DbqamXJd.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{_ as parseLongTextReviewBlocks,a as AssistantAttachmentQueue_default,c as AssistantPromptInput_default,g as LongTextPreviewBlocks_default,h as _sfc_main$14,m as useScrollToBottom,n as AssistantConversationElement_default,t as AssistantAttachmentPreview_default,u as scrollElementNearBottom,v as AssistantMessageAttachments_default}from"./conversation-B90ERX9h.js";import{t as usePaths}from"./usePaths-Db88-HOm.js";import{a as conversationAttachmentReference,c as vibe64AssistantSelectionLabel,h as vibe64AgentExecutionProfileAuditSnapshot,i as conversationAttachmentContentType,o as normalizeVibe64ConversationAttachments}from"./shared-DpMvYJO3.js";import{a as assistantGoalObjective,i as assistantGoalManagementMessage,o as assistantModeLabel}from"./assistantRouting-D4XpXcEf.js";import{t as useCommand}from"./useCommand-Bqxb-naz.js";import{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{n as stableLocalStorageKeyPart,r as writeLocalStorageJson,t as readLocalStorageJson}from"./browserLocalStorage-B4C7rHrs.js";import{t as writeClipboardText}from"./clipboard-CZs9aH3L.js";import"./shared-BEwrtWSp.js";import{n as vibe64ApiResponseError,t as vibe64ApiError}from"./vibe64ApiResponses-DNLY1Kel.js";import{r as vibe64RealtimePayloadFromCurrentTab,t as vibe64BrowserTabOriginId}from"./vibe64BrowserTabOrigin-SF9E31vi.js";import{t as useVibe64SystemGraph}from"./useVibe64SystemGraph-B4RmsC9Y.js";import{A as VIBE64_SOURCE_EDITOR_SYNC_READY_EVENT,Bt as VoiceConversationSettings_default,D as VIBE64_SESSION_CHANGED_EVENT,E as VIBE64_SESSIONS_API_SUFFIX,Ht as useVoiceLauncher,Kt as VTabs,N as vibe64AgentAttachmentFilePath,O as VIBE64_SOURCE_EDITOR_FILE_CHANGED_EVENT,P as vibe64AgentAttachmentPath,Pt as createProjectVoiceBinding,Rt as useVibe64Voice,Ut as VoiceAvatar_default,Vt as VoiceConversationControls_default,at as vibe64SourceEditorChangesStreamPath,ct as vibe64SourceEditorExplanationFollowupsStreamPath,dt as vibe64SourceEditorExplanationsCleanupPath,ft as vibe64SourceEditorExplanationsStreamPath,gt as vibe64SourceEditorSearchPath,h as F,ht as vibe64SourceEditorResolvePathPath,it as vibe64SessionsQueryKey,k as VIBE64_SOURCE_EDITOR_SYNC_ERROR_EVENT,lt as vibe64SourceEditorExplanationPath,m as GithubMarkdown_default,mt as vibe64SourceEditorFilesPath,ot as vibe64SourceEditorCreateFilePath,pt as vibe64SourceEditorFilePath,qt as VTab,st as vibe64SourceEditorDownloadPath,tn as usePageActivity,ut as vibe64SourceEditorExplanationStopPath,vt as vibe64SourceEditorTreePath,y as readRefOrGetterValue,zt as VoiceConversationHost_default}from"./index-GBRpNZLy.js";import{$ as rectangularSelection,A as foldService,B as tags$1,C as continuedIndent,Ct as NodeWeakMap,D as flatIndent,E as delimitedIndent,Et as parseMixed,F as sublanguageProp,G as drawSelection,H as EditorView,I as syntaxHighlighting,J as getPanel,K as dropCursor,L as syntaxTree,M as indentOnInput,N as indentUnit,O as foldInside,P as languageDataProp,Q as lineNumbers,R as Tag,S as bracketMatchingHandle,St as NodeType,T as defineLanguageFacet,Tt as Tree,U as ViewPlugin,V as Decoration,W as crosshairCursor,X as highlightActiveLineGutter,Z as keymap,_ as LanguageDescription,_t as findClusterBreak,a as redo,at as Compartment,b as StreamLanguage,bt as NodeProp,c as completeFromList,ct as Facet,d as ContextTracker,dt as StateEffect,et as runScopeHandlers,f as ExternalTokenizer,ft as StateField,g as Language,gt as countColumn,h as LRLanguage,ht as combineConfig,i as indentWithTab,it as CharCategory,j as indentNodeProp,k as foldNodeProp,l as ifNotIn,lt as Prec,m as LocalTokenGroup,mt as codePointSize,n as history,nt as showPanel,o as undo,ot as EditorSelection,p as LRParser,pt as codePointAt,q as getDialog,r as historyKeymap,rt as crelt,s as CompletionContext,st as EditorState,t as defaultKeymap,tt as showDialog,u as snippetCompletion,ut as RangeSetBuilder,v as LanguageSupport,vt as fromCodePoint,w as defaultHighlightStyle,wt as Parser,x as bracketMatching,xt as NodeSet,y as ParseContext,yt as IterMode,z as styleTags}from"./dist-CDa9Iec1.js";import{a as vibe64SessionDebugError,o as vibe64SessionDebugLog}from"./vibe64SessionPanelModel-DDorOuiL.js";import{t as diffLines}from"./libesm-CR-iGldz.js";var makeVBreadcrumbsDividerProps=propsFactory({divider:[Number,String],...makeComponentProps()},`VBreadcrumbsDivider`);var VBreadcrumbsDivider=genericComponent()({name:`VBreadcrumbsDivider`,props:makeVBreadcrumbsDividerProps(),setup(props,{slots}){useRender(()=>createBaseVNode(`li`,{"aria-hidden":`true`,"class":normalizeClass([`v-breadcrumbs-divider`,props.class]),"style":normalizeStyle(props.style)},[slots?.default?.()??props.divider]));return{}}});var makeVBreadcrumbsItemProps=propsFactory({active:Boolean,activeClass:String,activeColor:String,color:String,disabled:Boolean,title:String,...makeComponentProps(),...pick(makeDimensionProps(),[`width`,`maxWidth`]),...makeRouterProps(),...makeTagProps({tag:`li`})},`VBreadcrumbsItem`);var VBreadcrumbsItem=genericComponent()({name:`VBreadcrumbsItem`,props:makeVBreadcrumbsItemProps(),setup(props,{slots,attrs}){const link=useLink(props,attrs);const isActive=computed(()=>props.active||link.isActive?.value);const{dimensionStyles}=useDimension(props);const{textColorClasses,textColorStyles}=useTextColor(()=>isActive.value?props.activeColor:props.color);useRender(()=>{return createVNode(props.tag,{"class":normalizeClass([`v-breadcrumbs-item`,{"v-breadcrumbs-item--active":isActive.value,"v-breadcrumbs-item--disabled":props.disabled,[`${props.activeClass}`]:isActive.value&&props.activeClass},textColorClasses.value,props.class]),"style":normalizeStyle([textColorStyles.value,dimensionStyles.value,props.style]),"aria-current":isActive.value?`page`:void 0},{default:()=>[!link.isLink.value?slots.default?.()??props.title:createBaseVNode(`a`,mergeProps({"class":`v-breadcrumbs-item--link`,"onClick":link.navigate.value},link.linkProps),[slots.default?.()??props.title])]})});return{}}});var makeVBreadcrumbsProps=propsFactory({activeClass:String,activeColor:String,bgColor:String,color:String,disabled:Boolean,divider:{type:String,default:`/`},icon:IconValue,items:{type:Array,default:()=>[]},...makeComponentProps(),...makeDensityProps(),...makeRoundedProps(),...makeTagProps({tag:`ul`})},`VBreadcrumbs`);var VBreadcrumbs=genericComponent()({name:`VBreadcrumbs`,props:makeVBreadcrumbsProps(),setup(props,{slots}){const{backgroundColorClasses,backgroundColorStyles}=useBackgroundColor(()=>props.bgColor);const{densityClasses}=useDensity(props);const{roundedClasses,roundedStyles}=useRounded(props);provideDefaults({VBreadcrumbsDivider:{divider:toRef(()=>props.divider)},VBreadcrumbsItem:{activeClass:toRef(()=>props.activeClass),activeColor:toRef(()=>props.activeColor),color:toRef(()=>props.color),disabled:toRef(()=>props.disabled)}});const items=computed(()=>props.items.map(item=>{return isString(item)?{item:{title:item},raw:item}:{item,raw:item}}));useRender(()=>{const hasPrepend=!!(slots.prepend||props.icon);return createVNode(props.tag,{"class":normalizeClass([`v-breadcrumbs`,backgroundColorClasses.value,densityClasses.value,roundedClasses.value,props.class]),"style":normalizeStyle([backgroundColorStyles.value,roundedStyles.value,props.style])},{default:()=>[hasPrepend&&createBaseVNode(`li`,{"key":`prepend`,"class":`v-breadcrumbs__prepend`},[!slots.prepend?createVNode(VIcon,{"key":`prepend-icon`,"start":true,"icon":props.icon},null):createVNode(VDefaultsProvider,{"key":`prepend-defaults`,"disabled":!props.icon,"defaults":{VIcon:{icon:props.icon,start:true}}},slots.prepend)]),items.value.map(({item,raw},index,array)=>createBaseVNode(Fragment,null,[slots.item?.({item,index})??createVNode(VBreadcrumbsItem,mergeProps({"key":index,"disabled":index>=array.length-1},isString(item)?{title:item}:item),{default:slots.title?()=>slots.title?.({item,index}):void 0}),index<array.length-1&&createVNode(VBreadcrumbsDivider,null,{default:slots.divider?()=>slots.divider?.({item:raw,index}):void 0})])),slots.default?.()]})});return{}}});function assistantAttachmentSessionId(sessionId){return String(toValue(sessionId)||``).trim()}function assistantAttachmentUploadAllowed(canUpload){return toValue(canUpload)!==false}function assistantAttachmentFiles(fileList=[]){return Array.from(fileList||[]).filter(file=>file&&file.size>=0)}function assistantAttachmentFilesFromTransferItems(items=[]){return assistantAttachmentFiles(Array.from(items||[]).map(item=>{if(item?.kind!==`file`||typeof item.getAsFile!==`function`)return null;return item.getAsFile()}))}function assistantAttachmentFilesFromDropEvent(event){const dataTransfer=event?.dataTransfer;const itemFiles=assistantAttachmentFilesFromTransferItems(dataTransfer?.items);if(itemFiles.length>0)return itemFiles;return assistantAttachmentFiles(dataTransfer?.files)}function assistantAttachmentFilesFromPasteEvent(event){const clipboardData=event?.clipboardData;const itemFiles=assistantAttachmentFilesFromTransferItems(clipboardData?.items);if(itemFiles.length>0)return itemFiles;return assistantAttachmentFiles(clipboardData?.files)}function assistantAttachmentEventHasFiles(event){const dataTransfer=event?.dataTransfer;return assistantAttachmentFilesFromDropEvent(event).length>0||Array.from(dataTransfer?.items||[]).some(item=>item?.kind===`file`)||Array.from(dataTransfer?.types||[]).some(type=>type===`Files`||type===`application/x-moz-file`)}function assistantAttachmentClipboardText(event){if(typeof event?.clipboardData?.getData!==`function`)return``;return String(event.clipboardData.getData(`text/plain`)||``)}function assistantAttachmentClipboardLocalFileReference(event){const clipboardData=event?.clipboardData;if(!clipboardData||typeof clipboardData.getData!==`function`)return``;const types=Array.from(clipboardData.types||[]);const text=[clipboardData.getData(`x-special/gnome-copied-files`),clipboardData.getData(`text/uri-list`),clipboardData.getData(`text/plain`)].map(value=>String(value||``).trim()).filter(Boolean).join(`
1
+ import{B as VDefaultsProvider,E as useDensity,F as useBackgroundColor,Gn as withKeys,Kn as withModifiers,L as useTextColor,N as makeRoundedProps,P as useRounded,R as makeDimensionProps,T as makeDensityProps,V as makeTagProps,Wn as vShow,an as pick,ft as provideDefaults,gt as propsFactory,h as VIcon,ht as makeComponentProps,i as useLink,it as useRender,kn as isString,n as makeRouterProps,st as genericComponent,tt as IconValue,z as useDimension}from"./ripple-BVltMmyV.js";import{$n as normalizeProps,D as createVNode,E as createTextVNode,En as toValue,Ht as watch,On as unref,St as resolveComponent,Yt as withDirectives,Zn as normalizeClass,_ as createBaseVNode,an as getCurrentScope,b as createElementBlock,bt as renderList,ct as onMounted,er as normalizeStyle,et as mergeProps,g as computed,gn as reactive,it as onBeforeUnmount,mt as openBlock,o as Fragment,pn as onScopeDispose,qt as withCtx,tr as toDisplayString,tt as nextTick,v as createBlock,vn as ref,w as createSlots,wn as toRef,wt as resolveDynamicComponent,xt as renderSlot,y as createCommentVNode,z as guardReactiveProps}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{T as ROUTE_VISIBILITY_PUBLIC,t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{n as useRealtimeEvent,p as getHttpWebClient}from"./useRealtimeEvent-Bwapstla.js";import{g as useDisplay}from"./VAvatar-DPzqDH4r.js";import{n as VList,s as VListItem,t as VMenu}from"./VMenu-C_x18lwb.js";import{t as VChip}from"./VChip-CcI-Oo2J.js";import{t as VTextField}from"./VTextField-BR2eZeFT.js";import{r as scopedDevelopmentApiUrl,t as resolveStudioRequestUrl}from"./studioUrls-DmMMIScP.js";import{Bn as mdiRedoVariant,Cn as mdiMicrophoneOff,Dt as mdiFileOutline,F as mdiChevronLeft,Ft as mdiFolderPlusOutline,Gn as mdiRobotOutline,I as mdiChevronRight,Jn as mdiSend,Ot as mdiFilePlusOutline,Pt as mdiFolderOutline,Q as mdiCollapseAllOutline,Sn as mdiMicrophone,Sr as mdiVolumeOff,Tt as mdiFileDocumentOutline,U as mdiClose,Un as mdiRestore,Vn as mdiRefresh,_ as mdiArrowLeft,_r as mdiUndoVariant,ar as mdiStar,at as mdiContentSaveOutline,ft as mdiDeleteOutline,gt as mdiDownload,ht as mdiDotsVertical,ir as mdiSourceRepository,jn as mdiPencilOutline,kt as mdiFileSearchOutline,m as mdiArchiveClockOutline,or as mdiStarOutline,pr as mdiTrayArrowUp,pt as mdiDotsHorizontal,rt as mdiContentCopy,sr as mdiStop,vr as mdiUpload,xr as mdiVolumeHigh,xt as mdiFileCodeOutline,yn as mdiMagnify}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VDialog}from"./VDialog-Bu3EfKb1.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-mXy0k4aS.js";import{t as VSpacer}from"./VSpacer-Dhmsvk4t.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-CttxM1tw.js";import{t as VTextarea}from"./VTextarea-DbqamXJd.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{_ as parseLongTextReviewBlocks,a as AssistantAttachmentQueue_default,c as AssistantPromptInput_default,g as LongTextPreviewBlocks_default,h as _sfc_main$14,m as useScrollToBottom,n as AssistantConversationElement_default,t as AssistantAttachmentPreview_default,u as scrollElementNearBottom,v as AssistantMessageAttachments_default}from"./conversation-B90ERX9h.js";import{t as usePaths}from"./usePaths-Db88-HOm.js";import{a as conversationAttachmentReference,c as vibe64AssistantSelectionLabel,h as vibe64AgentExecutionProfileAuditSnapshot,i as conversationAttachmentContentType,o as normalizeVibe64ConversationAttachments}from"./shared-DpMvYJO3.js";import{a as assistantGoalObjective,i as assistantGoalManagementMessage,o as assistantModeLabel}from"./assistantRouting-D4XpXcEf.js";import{t as useCommand}from"./useCommand-Bqxb-naz.js";import{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{n as stableLocalStorageKeyPart,r as writeLocalStorageJson,t as readLocalStorageJson}from"./browserLocalStorage-B4C7rHrs.js";import{t as writeClipboardText}from"./clipboard-CZs9aH3L.js";import"./shared-BEwrtWSp.js";import{n as vibe64ApiResponseError,t as vibe64ApiError}from"./vibe64ApiResponses-DNLY1Kel.js";import{r as vibe64RealtimePayloadFromCurrentTab,t as vibe64BrowserTabOriginId}from"./vibe64BrowserTabOrigin-SF9E31vi.js";import{t as useVibe64SystemGraph}from"./useVibe64SystemGraph-B4RmsC9Y.js";import{A as VIBE64_SOURCE_EDITOR_SYNC_READY_EVENT,Bt as VoiceConversationSettings_default,D as VIBE64_SESSION_CHANGED_EVENT,E as VIBE64_SESSIONS_API_SUFFIX,Ht as useVoiceLauncher,Kt as VTabs,N as vibe64AgentAttachmentFilePath,O as VIBE64_SOURCE_EDITOR_FILE_CHANGED_EVENT,P as vibe64AgentAttachmentPath,Pt as createProjectVoiceBinding,Rt as useVibe64Voice,Ut as VoiceAvatar_default,Vt as VoiceConversationControls_default,at as vibe64SourceEditorChangesStreamPath,ct as vibe64SourceEditorExplanationFollowupsStreamPath,dt as vibe64SourceEditorExplanationsCleanupPath,ft as vibe64SourceEditorExplanationsStreamPath,gt as vibe64SourceEditorSearchPath,h as F,ht as vibe64SourceEditorResolvePathPath,it as vibe64SessionsQueryKey,k as VIBE64_SOURCE_EDITOR_SYNC_ERROR_EVENT,lt as vibe64SourceEditorExplanationPath,m as GithubMarkdown_default,mt as vibe64SourceEditorFilesPath,ot as vibe64SourceEditorCreateFilePath,pt as vibe64SourceEditorFilePath,qt as VTab,st as vibe64SourceEditorDownloadPath,tn as usePageActivity,ut as vibe64SourceEditorExplanationStopPath,vt as vibe64SourceEditorTreePath,y as readRefOrGetterValue,zt as VoiceConversationHost_default}from"./index-dNxr4Lg9.js";import{$ as rectangularSelection,A as foldService,B as tags$1,C as continuedIndent,Ct as NodeWeakMap,D as flatIndent,E as delimitedIndent,Et as parseMixed,F as sublanguageProp,G as drawSelection,H as EditorView,I as syntaxHighlighting,J as getPanel,K as dropCursor,L as syntaxTree,M as indentOnInput,N as indentUnit,O as foldInside,P as languageDataProp,Q as lineNumbers,R as Tag,S as bracketMatchingHandle,St as NodeType,T as defineLanguageFacet,Tt as Tree,U as ViewPlugin,V as Decoration,W as crosshairCursor,X as highlightActiveLineGutter,Z as keymap,_ as LanguageDescription,_t as findClusterBreak,a as redo,at as Compartment,b as StreamLanguage,bt as NodeProp,c as completeFromList,ct as Facet,d as ContextTracker,dt as StateEffect,et as runScopeHandlers,f as ExternalTokenizer,ft as StateField,g as Language,gt as countColumn,h as LRLanguage,ht as combineConfig,i as indentWithTab,it as CharCategory,j as indentNodeProp,k as foldNodeProp,l as ifNotIn,lt as Prec,m as LocalTokenGroup,mt as codePointSize,n as history,nt as showPanel,o as undo,ot as EditorSelection,p as LRParser,pt as codePointAt,q as getDialog,r as historyKeymap,rt as crelt,s as CompletionContext,st as EditorState,t as defaultKeymap,tt as showDialog,u as snippetCompletion,ut as RangeSetBuilder,v as LanguageSupport,vt as fromCodePoint,w as defaultHighlightStyle,wt as Parser,x as bracketMatching,xt as NodeSet,y as ParseContext,yt as IterMode,z as styleTags}from"./dist-CDa9Iec1.js";import{a as vibe64SessionDebugError,o as vibe64SessionDebugLog}from"./vibe64SessionPanelModel-DDorOuiL.js";import{t as diffLines}from"./libesm-CR-iGldz.js";var makeVBreadcrumbsDividerProps=propsFactory({divider:[Number,String],...makeComponentProps()},`VBreadcrumbsDivider`);var VBreadcrumbsDivider=genericComponent()({name:`VBreadcrumbsDivider`,props:makeVBreadcrumbsDividerProps(),setup(props,{slots}){useRender(()=>createBaseVNode(`li`,{"aria-hidden":`true`,"class":normalizeClass([`v-breadcrumbs-divider`,props.class]),"style":normalizeStyle(props.style)},[slots?.default?.()??props.divider]));return{}}});var makeVBreadcrumbsItemProps=propsFactory({active:Boolean,activeClass:String,activeColor:String,color:String,disabled:Boolean,title:String,...makeComponentProps(),...pick(makeDimensionProps(),[`width`,`maxWidth`]),...makeRouterProps(),...makeTagProps({tag:`li`})},`VBreadcrumbsItem`);var VBreadcrumbsItem=genericComponent()({name:`VBreadcrumbsItem`,props:makeVBreadcrumbsItemProps(),setup(props,{slots,attrs}){const link=useLink(props,attrs);const isActive=computed(()=>props.active||link.isActive?.value);const{dimensionStyles}=useDimension(props);const{textColorClasses,textColorStyles}=useTextColor(()=>isActive.value?props.activeColor:props.color);useRender(()=>{return createVNode(props.tag,{"class":normalizeClass([`v-breadcrumbs-item`,{"v-breadcrumbs-item--active":isActive.value,"v-breadcrumbs-item--disabled":props.disabled,[`${props.activeClass}`]:isActive.value&&props.activeClass},textColorClasses.value,props.class]),"style":normalizeStyle([textColorStyles.value,dimensionStyles.value,props.style]),"aria-current":isActive.value?`page`:void 0},{default:()=>[!link.isLink.value?slots.default?.()??props.title:createBaseVNode(`a`,mergeProps({"class":`v-breadcrumbs-item--link`,"onClick":link.navigate.value},link.linkProps),[slots.default?.()??props.title])]})});return{}}});var makeVBreadcrumbsProps=propsFactory({activeClass:String,activeColor:String,bgColor:String,color:String,disabled:Boolean,divider:{type:String,default:`/`},icon:IconValue,items:{type:Array,default:()=>[]},...makeComponentProps(),...makeDensityProps(),...makeRoundedProps(),...makeTagProps({tag:`ul`})},`VBreadcrumbs`);var VBreadcrumbs=genericComponent()({name:`VBreadcrumbs`,props:makeVBreadcrumbsProps(),setup(props,{slots}){const{backgroundColorClasses,backgroundColorStyles}=useBackgroundColor(()=>props.bgColor);const{densityClasses}=useDensity(props);const{roundedClasses,roundedStyles}=useRounded(props);provideDefaults({VBreadcrumbsDivider:{divider:toRef(()=>props.divider)},VBreadcrumbsItem:{activeClass:toRef(()=>props.activeClass),activeColor:toRef(()=>props.activeColor),color:toRef(()=>props.color),disabled:toRef(()=>props.disabled)}});const items=computed(()=>props.items.map(item=>{return isString(item)?{item:{title:item},raw:item}:{item,raw:item}}));useRender(()=>{const hasPrepend=!!(slots.prepend||props.icon);return createVNode(props.tag,{"class":normalizeClass([`v-breadcrumbs`,backgroundColorClasses.value,densityClasses.value,roundedClasses.value,props.class]),"style":normalizeStyle([backgroundColorStyles.value,roundedStyles.value,props.style])},{default:()=>[hasPrepend&&createBaseVNode(`li`,{"key":`prepend`,"class":`v-breadcrumbs__prepend`},[!slots.prepend?createVNode(VIcon,{"key":`prepend-icon`,"start":true,"icon":props.icon},null):createVNode(VDefaultsProvider,{"key":`prepend-defaults`,"disabled":!props.icon,"defaults":{VIcon:{icon:props.icon,start:true}}},slots.prepend)]),items.value.map(({item,raw},index,array)=>createBaseVNode(Fragment,null,[slots.item?.({item,index})??createVNode(VBreadcrumbsItem,mergeProps({"key":index,"disabled":index>=array.length-1},isString(item)?{title:item}:item),{default:slots.title?()=>slots.title?.({item,index}):void 0}),index<array.length-1&&createVNode(VBreadcrumbsDivider,null,{default:slots.divider?()=>slots.divider?.({item:raw,index}):void 0})])),slots.default?.()]})});return{}}});function assistantAttachmentSessionId(sessionId){return String(toValue(sessionId)||``).trim()}function assistantAttachmentUploadAllowed(canUpload){return toValue(canUpload)!==false}function assistantAttachmentFiles(fileList=[]){return Array.from(fileList||[]).filter(file=>file&&file.size>=0)}function assistantAttachmentFilesFromTransferItems(items=[]){return assistantAttachmentFiles(Array.from(items||[]).map(item=>{if(item?.kind!==`file`||typeof item.getAsFile!==`function`)return null;return item.getAsFile()}))}function assistantAttachmentFilesFromDropEvent(event){const dataTransfer=event?.dataTransfer;const itemFiles=assistantAttachmentFilesFromTransferItems(dataTransfer?.items);if(itemFiles.length>0)return itemFiles;return assistantAttachmentFiles(dataTransfer?.files)}function assistantAttachmentFilesFromPasteEvent(event){const clipboardData=event?.clipboardData;const itemFiles=assistantAttachmentFilesFromTransferItems(clipboardData?.items);if(itemFiles.length>0)return itemFiles;return assistantAttachmentFiles(clipboardData?.files)}function assistantAttachmentEventHasFiles(event){const dataTransfer=event?.dataTransfer;return assistantAttachmentFilesFromDropEvent(event).length>0||Array.from(dataTransfer?.items||[]).some(item=>item?.kind===`file`)||Array.from(dataTransfer?.types||[]).some(type=>type===`Files`||type===`application/x-moz-file`)}function assistantAttachmentClipboardText(event){if(typeof event?.clipboardData?.getData!==`function`)return``;return String(event.clipboardData.getData(`text/plain`)||``)}function assistantAttachmentClipboardLocalFileReference(event){const clipboardData=event?.clipboardData;if(!clipboardData||typeof clipboardData.getData!==`function`)return``;const types=Array.from(clipboardData.types||[]);const text=[clipboardData.getData(`x-special/gnome-copied-files`),clipboardData.getData(`text/uri-list`),clipboardData.getData(`text/plain`)].map(value=>String(value||``).trim()).filter(Boolean).join(`
2
2
  `);if(types.includes(`Files`)||types.includes(`application/x-moz-file`)||types.includes(`x-special/gnome-copied-files`)||/^file:/imu.test(text))return text||`file://`;return``}function attachmentUploadError(attachment={}){return attachment?.error||attachment?.errors?.[0]?.message||``}function attachmentIdentity(attachment={}){return String(attachment?.clientId||attachment?.attachmentId||attachment?.path||attachment?.fileName||``)}var ASSISTANT_ATTACHMENT_MAX_BYTES=1e8;var ASSISTANT_ATTACHMENT_MAX_ITEMS=10;var ASSISTANT_ATTACHMENT_UPLOAD_CONCURRENCY=2;var ASSISTANT_ATTACHMENT_UNRESOLVED_PHASES=new Set([`preparing`,`queued`,`uploading`,`delivering`,`failed`]);var attachmentClientSequence=0;function nextAttachmentClientId(){attachmentClientSequence+=1;return`attachment-${Date.now().toString(36)}-${attachmentClientSequence.toString(36)}`}function attachmentFileName(file={}){return String(file?.name||`attachment`)}function attachmentUploadResult(upload=null){if(upload&&typeof upload.then===`function`)return{cancel:typeof upload.cancel===`function`?()=>upload.cancel():null,promise:upload};if(upload?.promise&&typeof upload.promise.then===`function`)return{cancel:typeof upload.abort===`function`?()=>upload.abort():typeof upload.cancel===`function`?()=>upload.cancel():null,promise:upload.promise};return{cancel:null,promise:Promise.resolve(upload)}}function attachmentProgress(progress={},possibleTotal,fallbackTotal=0){const directNumericProgress=typeof progress===`number`?progress:null;const progressObject=progress&&typeof progress===`object`?progress:{};const totalBytes=Math.max(0,Number(progressObject.totalBytes??progressObject.total??possibleTotal??fallbackTotal)||0);const bytesValue=progressObject.bytesSent??progressObject.loaded??progressObject.uploadedBytes??directNumericProgress;const bytesKnown=bytesValue!==null&&bytesValue!==void 0&&bytesValue!==``;let bytesSent=bytesKnown?Number(bytesValue)||0:0;const directPercent=progressObject.percent;let percent=directPercent!==null&&directPercent!==void 0&&directPercent!==``?Number(directPercent):null;const progressValue=progressObject.progress;if(!Number.isFinite(percent)&&progressValue!==null&&progressValue!==void 0&&progressValue!==``){const numericProgressValue=Number(progressValue);if(Number.isFinite(numericProgressValue))percent=numericProgressValue<=1?numericProgressValue*100:numericProgressValue}if(!Number.isFinite(percent))percent=bytesKnown&&totalBytes>0?bytesSent/totalBytes*100:null;if(percent!==null)percent=Math.max(0,Math.min(100,percent));if(totalBytes>0){const inferredBytes=percent===null?0:totalBytes*percent/100;bytesSent=Math.max(0,Math.min(totalBytes,bytesSent||inferredBytes))}else bytesSent=Math.max(0,bytesSent);return{bytesSent,percent,totalBytes}}function attachmentReceipt(row,uploaded={}){return{...uploaded,attachmentId:String(uploaded?.attachmentId||``),clientId:row.clientId,fileName:String(uploaded?.fileName||row.fileName),sessionId:row.sessionId,size:Number(uploaded?.size??row.size)||0}}function useAssistantAttachments({canUpload=()=>true,deleteAttachment=null,onError=null,onUploaded=async()=>null,sessionId,uploadAttachment,maxBytes=ASSISTANT_ATTACHMENT_MAX_BYTES,maxItems=10,uploadConcurrency=2}={}){if(![maxBytes,maxItems,uploadConcurrency].every(value=>Number.isSafeInteger(value)&&value>0))throw new TypeError(`Attachment limits must be positive integers.`);const maxSizeLabel=maxBytes%1048576===0?`${maxBytes/1048576} MiB`:`${maxBytes/1e6} MB`;const attachments=ref([]);const queueItems=ref([]);const dragDepth=ref(0);const status=ref(``);const activeUploadCount=ref(0);const uploadQueue=[];const rowsById=new Map;const activeAttempts=new Map;const cleanupTasks=new Set;const receiptCleanupById=new Map;const cleanedReceiptIds=new Set;let disposed=false;let stopSessionWatch=null;const dragActive=computed(()=>dragDepth.value>0);const uploading=computed(()=>activeUploadCount.value>0||queueItems.value.some(item=>[`preparing`,`uploading`,`delivering`].includes(item.phase)));const hasUnresolved=computed(()=>queueItems.value.some(item=>ASSISTANT_ATTACHMENT_UNRESOLVED_PHASES.has(item.phase)));const canSubmit=computed(()=>!hasUnresolved.value);const retainedItemCount=computed(()=>queueItems.value.filter(item=>item.phase!==`cancelled`).length);const atCapacity=computed(()=>retainedItemCount.value>=maxItems);const canAddFiles=computed(()=>Boolean(!disposed&&assistantAttachmentSessionId(sessionId)&&assistantAttachmentUploadAllowed(canUpload)&&!atCapacity.value&&typeof uploadAttachment===`function`));const aggregateProgress=computed(()=>{const retainedItems=queueItems.value.filter(item=>item.phase!==`cancelled`);const totalBytes=retainedItems.reduce((sum,item)=>sum+item.totalBytes,0);const bytesSent=retainedItems.reduce((sum,item)=>sum+item.bytesSent,0);return{bytesSent,percent:totalBytes>0?Math.round(bytesSent/totalBytes*100):0,totalBytes}});function reportAttachmentError(error,fallbackMessage=`Attachment upload failed.`,{notify=true}={}){const message=String(error?.message||error||fallbackMessage);status.value=message;if(notify&&typeof onError===`function`)try{onError(error||new Error(message),fallbackMessage)}catch{}return message}function resetDragState(){dragDepth.value=0}function clearStatus(){status.value=``}function createWaiter(row){let resolve=null;row.waiter={promise:new Promise(currentResolve=>{resolve=currentResolve}),resolve,settled:false};return row.waiter}function settleWaiter(row,value=null,waiter=row.waiter){if(!waiter||waiter.settled)return;waiter.settled=true;waiter.resolve(value)}function canonicalRow(attachment={}){const identity=attachmentIdentity(attachment);return identity?rowsById.get(identity)||queueItems.value.find(row=>attachmentIdentity(row)===identity||row.attachmentId===identity):null}function trackCleanup(task){const cleanup=Promise.resolve(task).catch(error=>{reportAttachmentError(error,`Attachment cleanup failed.`);return false});cleanupTasks.add(cleanup);cleanup.finally(()=>cleanupTasks.delete(cleanup));return cleanup}async function deleteUploadedAttachment(currentSessionId,attachment={}){const attachmentId=String(attachment?.attachmentId||``).trim();if(!attachmentId||typeof deleteAttachment!==`function`)return false;const response=await deleteAttachment(currentSessionId,attachmentId);if(response?.ok===false)throw new Error(attachmentUploadError(response)||`Attachment cleanup failed.`);return true}function cleanupReceipt(currentSessionId,receipt={}){const attachmentId=String(receipt?.attachmentId||``).trim();const cleanupId=`${currentSessionId}:${attachmentId}`;if(!attachmentId)return Promise.resolve(false);if(cleanedReceiptIds.has(cleanupId))return Promise.resolve(false);if(receiptCleanupById.has(cleanupId))return receiptCleanupById.get(cleanupId);const cleanup=trackCleanup(deleteUploadedAttachment(currentSessionId,receipt)).then(deleted=>{if(deleted)cleanedReceiptIds.add(cleanupId);return deleted});receiptCleanupById.set(cleanupId,cleanup);cleanup.finally(()=>receiptCleanupById.delete(cleanupId));return cleanup}function updateProgress(row,progress,total){if(!row.retained||row.phase!==`uploading`)return;const next=attachmentProgress(progress,total,row.totalBytes);row.bytesSent=Math.max(row.bytesSent,next.bytesSent);row.totalBytes=next.totalBytes||row.totalBytes;if(next.percent!==null)row.progress=Math.max(Number(row.progress)||0,next.percent)}function removeReadyReceipt(row){const removed=attachments.value.filter(attachment=>attachment.clientId===row.clientId);attachments.value=attachments.value.filter(attachment=>attachment.clientId!==row.clientId);return removed}async function handOffUploadedAttachment(row,receipt,waiter=row.waiter){const token=Symbol(`${row.clientId}-handoff`);row.activeHandoffToken=token;row.phase=`delivering`;if(!attachments.value.some(attachment=>attachment.clientId===row.clientId))attachments.value.push(receipt);try{const accepted=(await onUploaded([receipt]))?.accepted===true;if(row.activeHandoffToken!==token||!row.retained||row.phase===`cancelled`){removeReadyReceipt(row);if(!accepted)await cleanupReceipt(row.sessionId,receipt);settleWaiter(row,null,waiter);return null}row.activeHandoffToken=null;row.error=``;row.failureStage=``;if(accepted){removeReadyReceipt(row);row.retained=false;rowsById.delete(row.clientId);queueItems.value=queueItems.value.filter(candidate=>candidate.clientId!==row.clientId);settleWaiter(row,receipt,waiter);return receipt}row.phase=`ready`;settleWaiter(row,receipt,waiter);return receipt}catch(error){if(row.activeHandoffToken!==token||!row.retained||row.phase===`cancelled`){await cleanupReceipt(row.sessionId,receipt);settleWaiter(row,null,waiter);return null}row.activeHandoffToken=null;removeReadyReceipt(row);row.error=String(error?.message||error||`Uploaded attachment could not be used.`);row.failureStage=`handoff`;row.phase=`failed`;settleWaiter(row,null,waiter);reportAttachmentError(error,`Uploaded attachment could not be used.`,{notify:false});return null}}async function finishUploadAttempt(attempt,uploaded,uploadError=null){activeAttempts.delete(attempt.token);activeUploadCount.value=activeAttempts.size;pumpQueue();const{row}=attempt;const isCurrentAttempt=row.activeToken===attempt.token;const uploadSucceeded=Boolean(!uploadError&&uploaded&&uploaded.ok!==false&&String(uploaded.attachmentId||``).trim());if(!isCurrentAttempt||!row.retained||disposed){if(uploadSucceeded)await cleanupReceipt(attempt.sessionId,uploaded);settleWaiter(row,null,attempt.waiter);pumpQueue();return}row.activeToken=null;if(uploadSucceeded){const receipt=attachmentReceipt(row,uploaded);row.receipt=receipt;row.attachmentId=receipt.attachmentId;row.path=String(receipt.path||``);row.bytesSent=row.totalBytes;row.progress=100;row.error=``;row.failureStage=``;await handOffUploadedAttachment(row,receipt,attempt.waiter)}else{const error=uploadError||new Error(attachmentUploadError(uploaded)||`Attachment upload failed.`);row.error=String(error?.message||error||`Attachment upload failed.`);row.failureStage=`upload`;row.phase=`failed`;settleWaiter(row,null,attempt.waiter);reportAttachmentError(error,`Attachment upload failed.`,{notify:false})}pumpQueue()}function startUpload(row){const token=Symbol(row.clientId);const abortController=typeof AbortController===`function`?new AbortController:null;const attempt={abortController,cancel:null,row,sessionId:row.sessionId,settled:null,token,waiter:row.waiter};row.activeToken=token;row.phase=`uploading`;row.error=``;activeAttempts.set(token,attempt);activeUploadCount.value=activeAttempts.size;try{const transport=attachmentUploadResult(uploadAttachment(row.sessionId,row.file,{onProgress:(progress,total)=>updateProgress(row,progress,total),signal:abortController?.signal}));attempt.cancel=transport.cancel;attempt.settled=transport.promise.then(uploaded=>finishUploadAttempt(attempt,uploaded),error=>finishUploadAttempt(attempt,null,error))}catch(error){attempt.settled=finishUploadAttempt(attempt,null,error)}}function pumpQueue(){if(disposed)return;while(activeAttempts.size<uploadConcurrency&&uploadQueue.length>0){const row=uploadQueue.shift();if(!row?.retained||row.phase!==`queued`)continue;startUpload(row)}}function cancelAttachment(attachment={}){const row=canonicalRow(attachment);if(!row||!row.retained||![`preparing`,`queued`,`uploading`].includes(row.phase))return false;const token=row.activeToken;row.activeToken=null;row.activeHandoffToken=null;row.phase=`cancelled`;row.error=``;const receipt=row.receipt;removeReadyReceipt(row);if(receipt)cleanupReceipt(row.sessionId,receipt);row.receipt=null;row.failureStage=``;settleWaiter(row,null);const attempt=token?activeAttempts.get(token):null;try{row.producerAbortController?.abort();attempt?.abortController?.abort();attempt?.cancel?.()}catch{}row.producerAbortController=null;row.producerToken=null;pumpQueue();return true}function retryAttachment(attachment={}){const row=canonicalRow(attachment);if(!row||!row.retained||![`failed`,`cancelled`].includes(row.phase)||row.sessionId!==assistantAttachmentSessionId(sessionId)||!assistantAttachmentUploadAllowed(canUpload)||typeof uploadAttachment!==`function`)return Promise.resolve(null);if(row.phase===`cancelled`&&retainedItemCount.value>=maxItems){reportAttachmentError(`A message can keep at most ${maxItems} attachments.`);return Promise.resolve(null)}if(row.failureStage===`handoff`&&row.receipt){row.error=``;row.phase=`uploading`;const waiter=createWaiter(row);handOffUploadedAttachment(row,row.receipt,waiter);return waiter.promise}if(row.producer&&!row.file){const waiter=createWaiter(row);startAttachmentProducer(row);return waiter.promise}if(row.size>maxBytes){row.error=`${row.fileName} is larger than the ${maxSizeLabel} attachment limit.`;row.failureStage=`validation`;row.phase=`failed`;reportAttachmentError(row.error,`Attachment upload failed.`,{notify:false});return Promise.resolve(null)}row.bytesSent=0;row.progress=null;row.error=``;row.failureStage=``;row.phase=`queued`;const waiter=createWaiter(row);uploadQueue.push(row);pumpQueue();return waiter.promise}function detachRow(row){if([`preparing`,`queued`,`uploading`].includes(row.phase))cancelAttachment(row);row.retained=false;rowsById.delete(row.clientId);settleWaiter(row,null)}function removeAttachment(attachment={}){const row=canonicalRow(attachment);if(!row)return[];const removedReceipts=removeReadyReceipt(row);const removed=removedReceipts.length>0?removedReceipts:[row];const receiptToClean=removedReceipts[0]||row.receipt;detachRow(row);queueItems.value=queueItems.value.filter(candidate=>candidate.clientId!==row.clientId);if(receiptToClean)cleanupReceipt(row.sessionId,receiptToClean);return removed}function clearAttachments({accepted=true,attachmentIds=null}={}){if(!accepted)return abandonAttachments();const selectedIds=Array.isArray(attachmentIds)?new Set(attachmentIds):null;const cleared=attachments.value.filter(attachment=>!selectedIds||selectedIds.has(attachment.attachmentId));const readyIds=new Set(cleared.map(attachment=>attachment.clientId));const remaining=[];for(const row of[...queueItems.value]){if(selectedIds&&!readyIds.has(row.clientId)){remaining.push(row);continue}if(readyIds.has(row.clientId)){row.retained=false;rowsById.delete(row.clientId);continue}detachRow(row);if(row.receipt)cleanupReceipt(row.sessionId,row.receipt)}attachments.value=attachments.value.filter(attachment=>!readyIds.has(attachment.clientId));queueItems.value=remaining;return cleared}async function abandonAttachments({onlySessionId=``}={}){const normalizedSessionId=String(onlySessionId||``).trim();const rows=queueItems.value.filter(row=>!normalizedSessionId||row.sessionId===normalizedSessionId);const rowIds=new Set(rows.map(row=>row.clientId));const readyReceipts=rows.map(row=>row.receipt).filter(Boolean);const attempts=[...activeAttempts.values()].filter(attempt=>rowIds.has(attempt.row.clientId));for(const row of rows)detachRow(row);queueItems.value=queueItems.value.filter(row=>!rowIds.has(row.clientId));attachments.value=attachments.value.filter(attachment=>!rowIds.has(attachment.clientId));const readyCleanup=readyReceipts.map(attachment=>cleanupReceipt(attachment.sessionId,attachment));await Promise.allSettled([...readyCleanup,...attempts.map(attempt=>attempt.settled).filter(Boolean)]);await waitForAttachmentCleanup();return rows}async function waitForAttachmentCleanup(){while(cleanupTasks.size>0)await Promise.allSettled([...cleanupTasks])}async function disposeAttachments(){if(disposed){await waitForAttachmentCleanup();return[]}disposed=true;stopSessionWatch?.();stopSessionWatch=null;return abandonAttachments()}function handleDragEnter(event){if(!assistantAttachmentEventHasFiles(event))return;dragDepth.value+=1;if(event?.dataTransfer)event.dataTransfer.dropEffect=`copy`}function handleDragOver(event){if(event?.dataTransfer)event.dataTransfer.dropEffect=`copy`}function handleDragLeave(){dragDepth.value=Math.max(0,dragDepth.value-1)}function createQueueRow({currentSessionId,file=null,fileName=`attachment`,phase=`queued`,producer=null,size=0}={}){const normalizedSize=Number(file?.size??size)||0;const row=reactive({activeHandoffToken:null,activeToken:null,attachmentId:``,bytesSent:0,clientId:nextAttachmentClientId(),error:``,failureStage:``,file,fileName:file?attachmentFileName(file):String(fileName||`attachment`),path:``,phase,producer,producerAbortController:null,producerToken:null,progress:null,receipt:null,retained:true,sessionId:currentSessionId,size:normalizedSize,totalBytes:normalizedSize,waiter:null});rowsById.set(row.clientId,row);queueItems.value.push(row);createWaiter(row);return row}function queuePreparedFile(row,file,waiter=row.waiter){const preparedFile=assistantAttachmentFiles([file])[0];if(!preparedFile)throw new Error(`The prepared attachment did not produce a file.`);row.file=preparedFile;row.fileName=attachmentFileName(preparedFile);row.size=Number(preparedFile.size)||0;row.totalBytes=row.size;if(row.size>maxBytes){row.error=`${row.fileName} is larger than the ${maxSizeLabel} attachment limit.`;row.failureStage=`validation`;row.phase=`failed`;settleWaiter(row,null,waiter);reportAttachmentError(row.error,`Attachment upload failed.`,{notify:false});return false}row.phase=`queued`;uploadQueue.push(row);pumpQueue();return true}function startAttachmentProducer(row){const token=Symbol(`${row.clientId}-producer`);const waiter=row.waiter;const abortController=typeof AbortController===`function`?new AbortController:null;row.file=null;row.producerAbortController=abortController;row.producerToken=token;row.phase=`preparing`;row.error=``;row.failureStage=``;row.producerSettled=Promise.resolve().then(()=>row.producer({signal:abortController?.signal})).then(file=>{if(row.producerToken!==token||!row.retained||disposed){settleWaiter(row,null,waiter);return null}row.producerAbortController=null;row.producerToken=null;try{queuePreparedFile(row,file,waiter)}catch(error){row.error=String(error?.message||error||`Attachment preparation failed.`);row.failureStage=`preparing`;row.phase=`failed`;settleWaiter(row,null,waiter);reportAttachmentError(error,`Attachment preparation failed.`,{notify:false})}return file},error=>{if(row.producerToken!==token||!row.retained||disposed){settleWaiter(row,null,waiter);return null}row.producerAbortController=null;row.producerToken=null;if(error?.name===`AbortError`){row.phase=`cancelled`;row.error=``}else{row.error=String(error?.message||error||`Attachment preparation failed.`);row.failureStage=`preparing`;row.phase=`failed`;reportAttachmentError(error,`Attachment preparation failed.`,{notify:false})}settleWaiter(row,null,waiter);return null})}function uploadFileProducer({fileName=`Preparing attachment…`,produce}={}){const currentSessionId=assistantAttachmentSessionId(sessionId);if(!canAddFiles.value||typeof produce!==`function`){if(atCapacity.value)reportAttachmentError(`A message can keep at most ${maxItems} attachments.`);return Promise.resolve(null)}status.value=``;const row=createQueueRow({currentSessionId,fileName,phase:`preparing`,producer:produce});const waiter=row.waiter;startAttachmentProducer(row);return waiter.promise}async function uploadFiles(files=[]){const uploadableFiles=assistantAttachmentFiles(files);const currentSessionId=assistantAttachmentSessionId(sessionId);if(uploadableFiles.length<1||!currentSessionId||disposed||!assistantAttachmentUploadAllowed(canUpload)||typeof uploadAttachment!==`function`)return[];status.value=``;const availableSlots=Math.max(0,maxItems-retainedItemCount.value);const acceptedFiles=uploadableFiles.slice(0,availableSlots);if(acceptedFiles.length<uploadableFiles.length)reportAttachmentError(`A message can keep at most ${maxItems} attachments.`);const waiters=[];for(const file of acceptedFiles){const row=createQueueRow({currentSessionId,file});const waiter=row.waiter;waiters.push(waiter.promise);if(row.size>maxBytes){row.error=`${row.fileName} is larger than the ${maxSizeLabel} attachment limit.`;row.failureStage=`validation`;row.phase=`failed`;settleWaiter(row,null);reportAttachmentError(row.error,`Attachment upload failed.`,{notify:false})}else uploadQueue.push(row)}pumpQueue();return(await Promise.all(waiters)).filter(attachment=>attachment&&attachments.value.some(candidate=>candidate.clientId===attachment.clientId))}async function handleDrop(event){resetDragState();return uploadFiles(assistantAttachmentFilesFromDropEvent(event))}async function handlePaste(event){const files=assistantAttachmentFilesFromPasteEvent(event);if(files.length<1){if(assistantAttachmentClipboardLocalFileReference(event))reportAttachmentError(`Copied local files cannot be pasted from this browser. Drop the file or use Attach files.`);return[]}if(!assistantAttachmentClipboardText(event))event?.preventDefault?.();return uploadFiles(files)}stopSessionWatch=watch(()=>assistantAttachmentSessionId(sessionId),(nextSessionId,previousSessionId)=>{if(nextSessionId!==previousSessionId&&previousSessionId)abandonAttachments({onlySessionId:previousSessionId})},{flush:`sync`});if(getCurrentScope())onScopeDispose(()=>{disposeAttachments()});return{maxBytes,maxItems,abandonAttachments,aggregateProgress,attachments,atCapacity,canAddFiles,cancelAttachment,canSubmit,clearAttachments,clearStatus,disposeAttachments,dragActive,hasUnresolved,handleDragEnter,handleDragLeave,handleDragOver,handleDrop,handlePaste,queueItems,removeAttachment,resetDragState,retryAttachment,status,uploading,uploadFiles,uploadFileProducer,waitForAttachmentCleanup}}function parseIntegrationSetupRequest(message){if(message?.role!==`assistant`||typeof message.text!==`string`)return null;const lines=message.text.replace(/\r\n/gu,`
3
3
  `).split(`
4
4
  `);let fence=null;for(let index=0;index<lines.length;index+=1){const line=lines[index];if(fence){const closing=/^ {0,3}(`{3,}|~{3,})\s*$/u.exec(line);if(!closing||closing[1][0]!==fence.character||closing[1].length<fence.length)continue;if(fence.request){if(lines.slice(index+1).some(tail=>tail.trim()))return null;const payload=lines.slice(fence.start+1,index).join(`
@@ -1 +1 @@
1
- import{d as VProgressLinear,h as VIcon}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,On as unref,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,v as createBlock,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{Vn as mdiRefresh,_ as mdiArrowLeft,f as mdiArchiveCancelOutline}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VSheet}from"./VSheet-DZWsu0kL.js";import{r as Vibe64ConversationLog_default,t as Vibe64SessionFiles_default}from"./Vibe64SessionFiles-n87RqqY6.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{a as useArchivedVibe64SessionDetail,i as shortSessionId,t as archiveFactRows}from"./useArchivedVibe64Sessions-CLHJOyeW.js";var _hoisted_1$1={class:`studio-archived-session-detail__header`};var _hoisted_2$1={class:`studio-archived-session-detail__title`};var _hoisted_3={class:`studio-archived-session-detail__grid`};var _hoisted_4={class:`studio-archived-session-detail__section`};var _hoisted_5={class:`studio-archived-session-detail__fact-list`};var _hoisted_6={class:`studio-archived-session-detail__section studio-archived-session-detail__conversation`};var _hoisted_7={key:0,class:`studio-archived-session-detail__muted`};var _sfc_main$1={__name:`ArchivedVibe64SessionDetail`,props:{sessionsApiPath:{type:String,default:``},projectSlug:{type:String,default:``},backTo:{default:null,type:[Object,String]},conversationLog:{default:()=>({}),type:Object},session:{default:null,type:Object}},setup(__props){const props=__props;const archiveIcon=mdiArchiveCancelOutline;const conversationTurns=computed(()=>Array.isArray(props.conversationLog?.turns)?props.conversationLog.turns:[]);const conversationError=computed(()=>String(props.conversationLog?.error||``));const conversationLoadMoreError=computed(()=>String(props.conversationLog?.loadMoreError||``));const conversationHasMoreBefore=computed(()=>Boolean(props.conversationLog?.hasMoreBefore));const conversationLoading=computed(()=>Boolean(props.conversationLog?.loading));const conversationLoadingMore=computed(()=>Boolean(props.conversationLog?.loadingMore));return(_ctx,_cache)=>{return __props.session?(openBlock(),createBlock(VSheet,{key:0,class:`studio-archived-session-detail`,rounded:`lg`,border:``},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$1,[createBaseVNode(`div`,_hoisted_2$1,[createVNode(VIcon,{icon:unref(archiveIcon),size:`20`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`h2`,null,`Archived session `+toDisplayString(unref(shortSessionId)(__props.session.sessionId)),1),_cache[0]||(_cache[0]=createBaseVNode(`p`,null,`Read-only history. Source restore is not available from archived sessions.`,-1))])]),__props.backTo?(openBlock(),createBlock(VBtn,{key:0,class:`studio-archived-session-detail__back`,"prepend-icon":unref(mdiArrowLeft),size:`small`,to:__props.backTo,variant:`tonal`},{default:withCtx(()=>[..._cache[1]||(_cache[1]=[createTextVNode(` Back to sessions `,-1)])]),_:1},8,[`prepend-icon`,`to`])):createCommentVNode(``,true)]),createBaseVNode(`div`,_hoisted_3,[createBaseVNode(`section`,_hoisted_4,[_cache[2]||(_cache[2]=createBaseVNode(`h3`,null,`Facts`,-1)),createBaseVNode(`dl`,_hoisted_5,[(openBlock(true),createElementBlock(Fragment,null,renderList(unref(archiveFactRows)(__props.session),fact=>{return openBlock(),createElementBlock(`div`,{key:fact.label,class:`studio-archived-session-detail__fact-row`},[createBaseVNode(`dt`,null,[createVNode(VIcon,{icon:fact.icon,size:`16`},null,8,[`icon`]),createBaseVNode(`span`,null,toDisplayString(fact.label),1)]),createBaseVNode(`dd`,null,toDisplayString(fact.value),1)])}),128))])])]),__props.sessionsApiPath?(openBlock(),createBlock(Vibe64SessionFiles_default,{key:0,archived:``,"session-id":__props.session.sessionId,"sessions-api-path":__props.sessionsApiPath,"project-slug":__props.projectSlug,style:{"height":`30rem`}},null,8,[`session-id`,`sessions-api-path`,`project-slug`])):createCommentVNode(``,true),createBaseVNode(`section`,_hoisted_6,[_cache[3]||(_cache[3]=createBaseVNode(`h3`,null,`Conversation`,-1)),createVNode(Vibe64ConversationLog_default,{"session-id":__props.session.sessionId,error:conversationError.value,"has-more-before":conversationHasMoreBefore.value,loading:conversationLoading.value,"loading-more":conversationLoadingMore.value,"load-more-error":conversationLoadMoreError.value,reloadable:true,reloading:conversationLoading.value,"source-root":__props.session.source||``,turns:conversationTurns.value,visible:true,onLoadMore:__props.conversationLog.loadMore,onReload:__props.conversationLog.reload},null,8,[`session-id`,`error`,`has-more-before`,`loading`,`loading-more`,`load-more-error`,`reloading`,`source-root`,`turns`,`onLoadMore`,`onReload`]),!conversationLoading.value&&!conversationError.value&&conversationTurns.value.length<1?(openBlock(),createElementBlock(`p`,_hoisted_7,` No conversation messages were recorded for this archive. `)):createCommentVNode(``,true)])]),_:1})):createCommentVNode(``,true)}}};var ArchivedVibe64SessionDetail_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-36f98390`]]);var _hoisted_1={class:`vibe64-dashboard-page vibe64-dashboard-page--archive-detail`};var _hoisted_2={class:`vibe64-dashboard-page__empty-actions`};var _sfc_main={__name:`[sessionId]`,setup(__props){const{backTo,conversationLog,error,loading,reload,session,sessionId,sessionsApiPath,projectSlug}=useArchivedVibe64SessionDetail();return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1,[_cache[3]||(_cache[3]=createBaseVNode(`header`,{class:`vibe64-dashboard-page__header`},[createBaseVNode(`h1`,{class:`text-headline-small font-weight-bold ma-0`},`Archived Session`)],-1)),unref(error)?(openBlock(),createBlock(VAlert,{key:0,type:`error`,variant:`tonal`,density:`comfortable`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(error)),1)]),_:1})):createCommentVNode(``,true),unref(loading)&&!unref(session)?(openBlock(),createBlock(VProgressLinear,{key:1,color:`primary`,height:`6`,indeterminate:``,rounded:``})):createCommentVNode(``,true),unref(session)?(openBlock(),createBlock(ArchivedVibe64SessionDetail_default,{key:2,"back-to":unref(backTo),"conversation-log":unref(conversationLog),session:unref(session),"sessions-api-path":unref(sessionsApiPath),"project-slug":unref(projectSlug)},null,8,[`back-to`,`conversation-log`,`session`,`sessions-api-path`,`project-slug`])):!unref(loading)?(openBlock(),createBlock(VSheet,{key:3,class:`vibe64-dashboard-page__empty`,rounded:`lg`,border:``},{default:withCtx(()=>[_cache[2]||(_cache[2]=createBaseVNode(`h2`,null,`Archived session unavailable`,-1)),createBaseVNode(`p`,null,`Session `+toDisplayString(unref(sessionId)||`unknown`)+` could not be loaded.`,1),createBaseVNode(`div`,_hoisted_2,[createVNode(VBtn,{"prepend-icon":unref(mdiArrowLeft),to:unref(backTo),variant:`tonal`},{default:withCtx(()=>[..._cache[0]||(_cache[0]=[createTextVNode(` Back to sessions `,-1)])]),_:1},8,[`prepend-icon`,`to`]),createVNode(VBtn,{"prepend-icon":unref(mdiRefresh),variant:`text`,onClick:unref(reload)},{default:withCtx(()=>[..._cache[1]||(_cache[1]=[createTextVNode(` Retry `,-1)])]),_:1},8,[`prepend-icon`,`onClick`])])]),_:1})):createCommentVNode(``,true)])}}};var _sessionId__default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-9d04455c`]]);export{_sessionId__default as default};
1
+ import{d as VProgressLinear,h as VIcon}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,On as unref,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,v as createBlock,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{Vn as mdiRefresh,_ as mdiArrowLeft,f as mdiArchiveCancelOutline}from"./mdi-CG9pWOSj.js";import{t as VBtn}from"./VBtn-B2MBK2DL.js";import{t as VAlert}from"./VAlert-P256xaE0.js";import{t as VSheet}from"./VSheet-DZWsu0kL.js";import{r as Vibe64ConversationLog_default,t as Vibe64SessionFiles_default}from"./Vibe64SessionFiles-CQzs6fee.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{a as useArchivedVibe64SessionDetail,i as shortSessionId,t as archiveFactRows}from"./useArchivedVibe64Sessions-_LB2XxEa.js";var _hoisted_1$1={class:`studio-archived-session-detail__header`};var _hoisted_2$1={class:`studio-archived-session-detail__title`};var _hoisted_3={class:`studio-archived-session-detail__grid`};var _hoisted_4={class:`studio-archived-session-detail__section`};var _hoisted_5={class:`studio-archived-session-detail__fact-list`};var _hoisted_6={class:`studio-archived-session-detail__section studio-archived-session-detail__conversation`};var _hoisted_7={key:0,class:`studio-archived-session-detail__muted`};var _sfc_main$1={__name:`ArchivedVibe64SessionDetail`,props:{sessionsApiPath:{type:String,default:``},projectSlug:{type:String,default:``},backTo:{default:null,type:[Object,String]},conversationLog:{default:()=>({}),type:Object},session:{default:null,type:Object}},setup(__props){const props=__props;const archiveIcon=mdiArchiveCancelOutline;const conversationTurns=computed(()=>Array.isArray(props.conversationLog?.turns)?props.conversationLog.turns:[]);const conversationError=computed(()=>String(props.conversationLog?.error||``));const conversationLoadMoreError=computed(()=>String(props.conversationLog?.loadMoreError||``));const conversationHasMoreBefore=computed(()=>Boolean(props.conversationLog?.hasMoreBefore));const conversationLoading=computed(()=>Boolean(props.conversationLog?.loading));const conversationLoadingMore=computed(()=>Boolean(props.conversationLog?.loadingMore));return(_ctx,_cache)=>{return __props.session?(openBlock(),createBlock(VSheet,{key:0,class:`studio-archived-session-detail`,rounded:`lg`,border:``},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$1,[createBaseVNode(`div`,_hoisted_2$1,[createVNode(VIcon,{icon:unref(archiveIcon),size:`20`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`h2`,null,`Archived session `+toDisplayString(unref(shortSessionId)(__props.session.sessionId)),1),_cache[0]||(_cache[0]=createBaseVNode(`p`,null,`Read-only history. Source restore is not available from archived sessions.`,-1))])]),__props.backTo?(openBlock(),createBlock(VBtn,{key:0,class:`studio-archived-session-detail__back`,"prepend-icon":unref(mdiArrowLeft),size:`small`,to:__props.backTo,variant:`tonal`},{default:withCtx(()=>[..._cache[1]||(_cache[1]=[createTextVNode(` Back to sessions `,-1)])]),_:1},8,[`prepend-icon`,`to`])):createCommentVNode(``,true)]),createBaseVNode(`div`,_hoisted_3,[createBaseVNode(`section`,_hoisted_4,[_cache[2]||(_cache[2]=createBaseVNode(`h3`,null,`Facts`,-1)),createBaseVNode(`dl`,_hoisted_5,[(openBlock(true),createElementBlock(Fragment,null,renderList(unref(archiveFactRows)(__props.session),fact=>{return openBlock(),createElementBlock(`div`,{key:fact.label,class:`studio-archived-session-detail__fact-row`},[createBaseVNode(`dt`,null,[createVNode(VIcon,{icon:fact.icon,size:`16`},null,8,[`icon`]),createBaseVNode(`span`,null,toDisplayString(fact.label),1)]),createBaseVNode(`dd`,null,toDisplayString(fact.value),1)])}),128))])])]),__props.sessionsApiPath?(openBlock(),createBlock(Vibe64SessionFiles_default,{key:0,archived:``,"session-id":__props.session.sessionId,"sessions-api-path":__props.sessionsApiPath,"project-slug":__props.projectSlug,style:{"height":`30rem`}},null,8,[`session-id`,`sessions-api-path`,`project-slug`])):createCommentVNode(``,true),createBaseVNode(`section`,_hoisted_6,[_cache[3]||(_cache[3]=createBaseVNode(`h3`,null,`Conversation`,-1)),createVNode(Vibe64ConversationLog_default,{"session-id":__props.session.sessionId,error:conversationError.value,"has-more-before":conversationHasMoreBefore.value,loading:conversationLoading.value,"loading-more":conversationLoadingMore.value,"load-more-error":conversationLoadMoreError.value,reloadable:true,reloading:conversationLoading.value,"source-root":__props.session.source||``,turns:conversationTurns.value,visible:true,onLoadMore:__props.conversationLog.loadMore,onReload:__props.conversationLog.reload},null,8,[`session-id`,`error`,`has-more-before`,`loading`,`loading-more`,`load-more-error`,`reloading`,`source-root`,`turns`,`onLoadMore`,`onReload`]),!conversationLoading.value&&!conversationError.value&&conversationTurns.value.length<1?(openBlock(),createElementBlock(`p`,_hoisted_7,` No conversation messages were recorded for this archive. `)):createCommentVNode(``,true)])]),_:1})):createCommentVNode(``,true)}}};var ArchivedVibe64SessionDetail_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-36f98390`]]);var _hoisted_1={class:`vibe64-dashboard-page vibe64-dashboard-page--archive-detail`};var _hoisted_2={class:`vibe64-dashboard-page__empty-actions`};var _sfc_main={__name:`[sessionId]`,setup(__props){const{backTo,conversationLog,error,loading,reload,session,sessionId,sessionsApiPath,projectSlug}=useArchivedVibe64SessionDetail();return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1,[_cache[3]||(_cache[3]=createBaseVNode(`header`,{class:`vibe64-dashboard-page__header`},[createBaseVNode(`h1`,{class:`text-headline-small font-weight-bold ma-0`},`Archived Session`)],-1)),unref(error)?(openBlock(),createBlock(VAlert,{key:0,type:`error`,variant:`tonal`,density:`comfortable`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(error)),1)]),_:1})):createCommentVNode(``,true),unref(loading)&&!unref(session)?(openBlock(),createBlock(VProgressLinear,{key:1,color:`primary`,height:`6`,indeterminate:``,rounded:``})):createCommentVNode(``,true),unref(session)?(openBlock(),createBlock(ArchivedVibe64SessionDetail_default,{key:2,"back-to":unref(backTo),"conversation-log":unref(conversationLog),session:unref(session),"sessions-api-path":unref(sessionsApiPath),"project-slug":unref(projectSlug)},null,8,[`back-to`,`conversation-log`,`session`,`sessions-api-path`,`project-slug`])):!unref(loading)?(openBlock(),createBlock(VSheet,{key:3,class:`vibe64-dashboard-page__empty`,rounded:`lg`,border:``},{default:withCtx(()=>[_cache[2]||(_cache[2]=createBaseVNode(`h2`,null,`Archived session unavailable`,-1)),createBaseVNode(`p`,null,`Session `+toDisplayString(unref(sessionId)||`unknown`)+` could not be loaded.`,1),createBaseVNode(`div`,_hoisted_2,[createVNode(VBtn,{"prepend-icon":unref(mdiArrowLeft),to:unref(backTo),variant:`tonal`},{default:withCtx(()=>[..._cache[0]||(_cache[0]=[createTextVNode(` Back to sessions `,-1)])]),_:1},8,[`prepend-icon`,`to`]),createVNode(VBtn,{"prepend-icon":unref(mdiRefresh),variant:`text`,onClick:unref(reload)},{default:withCtx(()=>[..._cache[1]||(_cache[1]=[createTextVNode(` Retry `,-1)])]),_:1},8,[`prepend-icon`,`onClick`])])]),_:1})):createCommentVNode(``,true)])}}};var _sessionId__default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-9d04455c`]]);export{_sessionId__default as default};