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 +1 @@
1
- import{Ht as watch,On as unref,g as computed,hn as proxyRefs,pn as onScopeDispose,vn as ref}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{J as useQueryClient,T as ROUTE_VISIBILITY_PUBLIC,t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{n as useRealtimeEvent}from"./useRealtimeEvent-Bwapstla.js";import{t as usePaths}from"./usePaths-Db88-HOm.js";import{t as useCommand}from"./useCommand-Bqxb-naz.js";import{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{t as useVibe64ProjectSlug}from"./useVibe64ProjectScope-Bp1ImZlz.js";import{n as vibe64RealtimeOriginPayload}from"./vibe64BrowserTabOrigin-SF9E31vi.js";import{$ as vibe64SessionPath,D as VIBE64_SESSION_CHANGED_EVENT,E as VIBE64_SESSIONS_API_SUFFIX,T as VIBE64_CURRENT_SESSION_API_SUFFIX,it as vibe64SessionsQueryKey,rt as vibe64SessionQueryKey,y as readRefOrGetterValue}from"./index-GBRpNZLy.js";import{a as vibe64SessionDebugError,i as vibe64SessionDebugDurationMs,n as enrichVibe64SessionForDisplay,o as vibe64SessionDebugLog,r as visibleVibe64Sessions,s as vibe64SessionDebugSummary}from"./vibe64SessionPanelModel-DDorOuiL.js";import{c as vibe64SessionStatusLabel,i as vibe64SessionDisplayTitle,o as vibe64SessionRevision,r as shortVibe64SessionId,s as vibe64SessionStatusColor,t as isArchivedVibe64Session}from"./vibe64SessionViewModel-DR4tOlGM.js";import{y as VIBE64_PROJECT_CHANGED_EVENT}from"./studioGateApi-DcCqiD9V.js";import{n as useVibe64SessionSelection,t as selectedSessionIdFromRoute}from"./useVibe64SessionSelection-CuZCzAcY.js";function plainObjectValue(value=null){return value&&typeof value===`object`&&!Array.isArray(value)?value:{}}function sessionChangedReason$1(payload={}){return String(payload?.reason||``).trim()}function sessionRevision(value){const revision=Number(value);return Number.isSafeInteger(revision)&&revision>=0?revision:null}function agentTurnRealtimeOverlayFromPayload(payload={},selectedSessionId=``){const changedSessionId=String(payload?.sessionId||payload?.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(selectedSessionId||``).trim())return null;const agentSession=plainObjectValue(payload.agentSession);const turn=plainObjectValue(agentSession.turn);const run=plainObjectValue(payload.agentRun);const revision=sessionRevision(payload.revision);if(revision===null||!Object.keys(turn).length&&!Object.keys(run).length)return null;const active=turn.active===true||run.active===true;return{active,agentRun:{...run,active},agentSession:{...agentSession,turn:{...turn,active}},reason:sessionChangedReason$1(payload),revision,sessionId:changedSessionId}}function latestAgentTurnRealtimeOverlay(current=null,candidate=null){if(!candidate)return current;if(!current||candidate.revision>current.revision)return candidate;return current}function mergeAgentRunOverlay(agentRuns=[],overlayRun={}){const runs=Array.isArray(agentRuns)?agentRuns:[];const runId=String(overlayRun.id||``).trim();if(!runId)return runs;const nextRun={...overlayRun,id:runId};const index=runs.findIndex(run=>String(run?.id||``).trim()===runId);if(index<0)return[...runs,nextRun];return runs.map((run,runIndex)=>runIndex===index?{...run,...nextRun}:run)}function sessionWithAgentTurnRealtimeOverlay(session=null,overlay=null){const currentRevision=sessionRevision(session?.revision);if(!session||!overlay||session?.ok===false||session.sessionId!==overlay.sessionId||currentRevision!==null&&overlay.revision<=currentRevision)return session;const overlayAgentSession=plainObjectValue(overlay.agentSession);return{...session,agentRuns:mergeAgentRunOverlay(session.agentRuns,plainObjectValue(overlay.agentRun)),agentSession:{...plainObjectValue(session.agentSession),...overlayAgentSession,thread:{...plainObjectValue(session.agentSession?.thread),...plainObjectValue(overlayAgentSession.thread)},turn:{...plainObjectValue(session.agentSession?.turn),...plainObjectValue(overlayAgentSession.turn),active:overlay.active===true}},revision:overlay.revision}}var MOUNTED_SESSION_IGNORED_REALTIME_REASONS=new Set([`assistant-stream`,`assistant-response-bundle`,`codex-app-server-commentary`,`codex-app-server-prompt-injected`,`codex-app-server-ready`,`codex-app-server-final-assistant-message`,`codex-app-server-live-progress`,`codex-app-server-reasoning-summary`,`codex-app-server-running`,`codex-app-server-terminal-assistant-message`,`codex-app-server-terminal-thinking-message`,`codex-app-server-terminal-user-message`,`codex-app-server-turn-active`,`codex-app-server-turn-claimed`,`codex-app-server-turn-finalizing`,`codex-app-server-turn-idle`,`codex-app-server-turn-state`,`codex-app-server-message-delivered`,`codex-context-replaced`,`codex-prompt-injected`,`opencode-server-assistant-message`,`opencode-server-message-delivered`,`opencode-server-progress`,`opencode-server-reasoning`,`opencode-server-tool`,`opencode-server-turn-active`,`opencode-server-turn-idle`,`output-target-started`,`output-target-ready`,`output-target-closed`,`output-target-stopped`]);function sessionRecordHasDetailProjection(session=null){return Boolean(session&&typeof session===`object`&&Object.hasOwn(session,`agentSession`))}function sessionRecordHasActiveAgentWork(session=null){return(session?.agentSession?.turn?.active??session?.agentActivity?.active)===true}function sessionRecordMatchesId(session=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();return Boolean(normalizedSessionId&&session?.sessionId===normalizedSessionId&&session?.ok!==false)}function latestSessionDetailRecord(current=null,candidate=null,sessionId=``){if(!sessionRecordMatchesId(candidate,sessionId))return current;if(!sessionRecordMatchesId(current,sessionId))return candidate;const currentRevision=vibe64SessionRevision(current);const candidateRevision=vibe64SessionRevision(candidate);if(currentRevision!==null&&candidateRevision!==null&&candidateRevision<currentRevision)return current;return candidate}function mountedSessionRecord(detailSession=null,listSession=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();const listSessionMatches=sessionRecordMatchesId(listSession,normalizedSessionId);if(!sessionRecordMatchesId(detailSession,normalizedSessionId))return listSessionMatches?listSession:null;const detailRevision=vibe64SessionRevision(detailSession);const listRevision=vibe64SessionRevision(listSession);if(listSessionMatches&&listRevision!==null&&detailRevision!==null&&listRevision>detailRevision){if(sessionRecordHasDetailProjection(detailSession)&&!sessionRecordHasDetailProjection(listSession))return detailSession;return listSession}return detailSession}function mountedSessionDetailRefreshReason(detailSession=null,listSession=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(!sessionRecordMatchesId(detailSession,normalizedSessionId)||!sessionRecordMatchesId(listSession,normalizedSessionId))return``;const detailRevision=vibe64SessionRevision(detailSession);const listRevision=vibe64SessionRevision(listSession);if(listRevision!==null&&detailRevision!==null&&listRevision>detailRevision&&sessionRecordHasDetailProjection(detailSession)&&!sessionRecordHasDetailProjection(listSession))return`newer_summary_without_detail`;return``}function mountedSessionDetailLoadState({detailSession=null,fetching=false,listSession=null,loadError=``,loading=false,sessionId=``}={}){const normalizedSessionId=String(sessionId||``).trim();const hasDetail=sessionRecordMatchesId(detailSession,normalizedSessionId);const hasSummary=sessionRecordMatchesId(listSession,normalizedSessionId);const error=String(loadError||``).trim();if(!normalizedSessionId)return{error:``,label:``,loading:false,ready:false,restoring:false,sessionId:``,state:`summaryOnly`};if(error&&!hasDetail)return{error,label:`Session could not load.`,loading:false,ready:false,restoring:false,sessionId:normalizedSessionId,state:`detailError`};if(hasDetail)return{error:``,label:``,loading:false,ready:true,refreshing:Boolean(fetching||loading),restoring:false,sessionId:normalizedSessionId,state:`detailReady`};if(loading||fetching)return{error:``,label:`Loading session...`,loading:true,ready:false,restoring:false,sessionId:normalizedSessionId,state:`detailLoading`};return{error:``,label:hasSummary?`Session could not load.`:`Loading session...`,loading:false,ready:false,restoring:false,sessionId:normalizedSessionId,state:`summaryOnly`}}function mountedSessionRealtimeShouldRefresh({payload={}}={},sessionId=``){const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(sessionId||``).trim())return false;const reason=String(payload?.reason||``).trim();return!reason||!MOUNTED_SESSION_IGNORED_REALTIME_REASONS.has(reason)}function useVibe64SessionDialogs({archiveAllowed=true,beginArchive=()=>null,finishArchive=()=>null,isSelectedSessionArchived,refreshSessionData=async()=>null,selectedSessionId,selectedSessionTitle,sessionsApiPath}={}){const archiveDialogOpen=ref(false);const archiveDialogSessionId=ref(``);const archiveDialogSessionTitle=ref(``);const archivingSessionId=ref(``);const resolvedSessionsApiPath=computed(()=>String(readRefOrGetterValue(sessionsApiPath)||``));const archiveCommand=useCommand({access:`never`,apiSuffix:VIBE64_SESSIONS_API_SUFFIX,buildRawPayload:()=>vibe64RealtimeOriginPayload(),buildCommandOptions:(_payload,{context})=>({method:`POST`,path:vibe64SessionPath(resolvedSessionsApiPath.value,context?.sessionId,`/archive`)}),fallbackRunError:`Vibe64 session could not be archived.`,messages:{error:`Vibe64 session could not be archived.`,success:`Vibe64 session archived.`},onRunSuccess:async response=>{if(response?.ok!==true)throw new Error(response?.errors?.[0]?.message||response?.error||`Vibe64 session could not be archived.`)},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.archive`,surfaceId:`app`,writeMethod:`POST`});function clearArchiveDialog(){archiveDialogOpen.value=false;archiveDialogSessionId.value=``;archiveDialogSessionTitle.value=``}function requestArchiveSelectedSession(){if(!readRefOrGetterValue(archiveAllowed)||!unref(selectedSessionId)||archivingSessionId.value||archiveCommand.isRunning||unref(isSelectedSessionArchived))return;archiveDialogSessionId.value=unref(selectedSessionId);archiveDialogSessionTitle.value=unref(selectedSessionTitle);archiveDialogOpen.value=true}function cancelArchiveSession(){if(!archiveCommand.isRunning)clearArchiveDialog()}async function confirmArchiveSession(){if(!archiveDialogSessionId.value||archivingSessionId.value||archiveCommand.isRunning)return false;const sessionId=archiveDialogSessionId.value;archivingSessionId.value=sessionId;clearArchiveDialog();const archiveScope=beginArchive(sessionId);let succeeded=false;try{const response=await archiveCommand.run({sessionId});succeeded=response?.ok===true;return response}catch{return false}finally{finishArchive(sessionId,succeeded,archiveScope);if(archivingSessionId.value===sessionId)archivingSessionId.value=``;refreshSessionData({includeList:true,reason:`archive-session`}).catch(()=>null)}}function clear(){clearArchiveDialog()}return{archive:{archiving:computed(()=>Boolean(archivingSessionId.value)),archivingSessionId,cancel:cancelArchiveSession,command:archiveCommand,confirm:confirmArchiveSession,open:archiveDialogOpen,request:requestArchiveSelectedSession,sessionId:archiveDialogSessionId,sessionTitle:archiveDialogSessionTitle},busy:computed(()=>Boolean(archivingSessionId.value)),clear}}function createVibe64CurrentSessionPublisher({coalesceByPath=false,onError=()=>null,publish}={}){if(typeof publish!==`function`)throw new TypeError(`Current Vibe64 session publisher requires publish().`);const pendingPublications=new Map;let publicationChain=Promise.resolve();let lastPublishedIdentity=null;let stopped=false;function request(publication={}){if(stopped)return publicationChain;const apiPath=String(publication?.apiPath||``);const sessionId=String(publication?.sessionId||``).trim();const publicationKey=(typeof coalesceByPath===`function`?coalesceByPath():coalesceByPath)?apiPath:``;pendingPublications.set(publicationKey,{apiPath,identity:JSON.stringify([apiPath,sessionId]),sessionId});publicationChain=publicationChain.catch(()=>null).then(async()=>{if(stopped||pendingPublications.size===0)return;const[key,publication]=pendingPublications.entries().next().value;pendingPublications.delete(key);if(publication.identity===lastPublishedIdentity)return;try{await publish({apiPath:publication.apiPath,sessionId:publication.sessionId});lastPublishedIdentity=publication.identity}catch(error){onError(error,publication)}});return publicationChain}function stop(){stopped=true;pendingPublications.clear()}return Object.freeze({request,stop})}function vibe64SessionListRefreshRequested(payload={}){return payload?.clientRefresh?.includeList===true}var SESSION_LIST_IGNORED_REALTIME_REASONS=new Set([`assistant-stream`,`assistant-response-bundle`,`codex-app-server-ready`,`codex-app-server-agent-result`,`codex-app-server-agent-result-invalid`,`codex-app-server-agent-result-missing`,`codex-app-server-agent-result-provider-failed`,`codex-app-server-blocked`,`codex-app-server-commentary`,`codex-app-server-failed`,`codex-app-server-final-assistant-message`,`codex-app-server-live-progress`,`codex-app-server-prompt-injected`,`codex-app-server-reasoning-summary`,`codex-app-server-running`,`codex-app-server-terminal-assistant-message`,`codex-app-server-terminal-thinking-message`,`codex-app-server-terminal-user-message`,`codex-app-server-turn-active`,`codex-app-server-turn-claimed`,`codex-app-server-turn-finalizing`,`codex-app-server-turn-idle`,`codex-app-server-turn-state`,`codex-app-server-message-delivered`,`codex-prompt-injected`,`codex-context-replaced`,`opencode-server-assistant-message`,`opencode-server-message-delivered`,`opencode-server-progress`,`opencode-server-reasoning`,`opencode-server-tool`,`opencode-server-turn-active`,`opencode-server-turn-idle`,`agent-terminal-started`,`agent-terminal-closed`,`output-target-started`,`output-target-ready`,`output-target-closed`,`output-target-stopped`]);function sessionArchiveOperation(session){try{return JSON.parse(session?.metadata?.session_archive_operation||`null`)}catch{return{status:`failed`,error:`Session archive state could not be read.`}}}function sessionIdExistsInList(sessionId=``,nextSessions=[]){const normalizedSessionId=String(sessionId||``).trim();return Boolean(normalizedSessionId)&&nextSessions.some(session=>session.sessionId===normalizedSessionId)}function renewedSuccessorSessionId({predecessorSessionId=``,sessions=[]}={}){const predecessorId=String(predecessorSessionId||``).trim();if(!predecessorId)return``;const matches=sessions.filter(session=>String(session?.metadata?.renewed_from||``).trim()===predecessorId);return matches.length===1?String(matches[0]?.sessionId||``).trim():``}function shouldPreserveSelectedSessionDuringRefresh({createSessionRunning=false,currentSessionId=``,nextSessions=[],selectedSessionLoading=false,sessionListLoading=false}={}){const normalizedSessionId=String(currentSessionId||``).trim();if(!normalizedSessionId||sessionIdExistsInList(normalizedSessionId,nextSessions))return false;return Boolean(sessionListLoading||createSessionRunning||selectedSessionLoading)}function selectedSessionIdForCurrentAlias({createSessionRunning=false,selectedSessionId=``,selectedSessionLoading=false,sessionListLoaded=true,sessionListLoadError=``,sessionListLoading=false,sessions=[]}={}){if(!sessionListLoaded||sessionListLoading||String(sessionListLoadError||``).trim())return null;const normalizedSessionId=String(selectedSessionId||``).trim();if(sessionIdExistsInList(normalizedSessionId,sessions))return normalizedSessionId;if(sessions.length>0||createSessionRunning||selectedSessionLoading)return null;return``}function sessionChangedReason(payload={}){return String(payload?.reason||``).trim()}function sessionListRealtimeShouldRefresh({payload={}}={},projectSlug=``){if(payload.projectSlug&&payload.projectSlug!==projectSlug)return false;if(vibe64SessionListRefreshRequested(payload))return true;const reason=sessionChangedReason(payload);if(reason===`assistant-routing-changed`&&payload.assistantRoutingRequest)return false;return!reason||!SESSION_LIST_IGNORED_REALTIME_REASONS.has(reason)}function refetchEndpointResource(resource){if(typeof resource?.query?.refetch===`function`)return resource.query.refetch({cancelRefetch:false});return resource?.reload?.()}function useVibe64SessionData({onTitleChange=null}={}){const notifyTitleChange=typeof onTitleChange===`function`?onTitleChange:()=>null;const queryClient=useQueryClient();const projectSlug=useVibe64ProjectSlug();const route=useRoute();const router=useRouter();const paths=usePaths();const selectionScope=computed(()=>String(projectSlug.value||``).trim());const sessionSelection=useVibe64SessionSelection({projectSlug});const selectedSessionId=sessionSelection.selectedId;const sessionsApiPath=computed(()=>paths.api(VIBE64_SESSIONS_API_SUFFIX,{surface:`app`}));const currentSessionApiPath=computed(()=>paths.api(VIBE64_CURRENT_SESSION_API_SUFFIX,{surface:`app`}));const sessionListQueryKey=computed(()=>vibe64SessionsQueryKey(`app`,ROUTE_VISIBILITY_PUBLIC,projectSlug.value));const sessionListResource=useEndpointResource({fallbackLoadError:`Vibe64 sessions could not be loaded.`,path:sessionsApiPath,queryKey:sessionListQueryKey,readQuery:{limit:20},queryOptions:{refetchOnMount:false,refetchOnWindowFocus:false},requestRecoveryLabel:`Vibe64 sessions`,realtime:{events:[VIBE64_SESSION_CHANGED_EVENT,VIBE64_PROJECT_CHANGED_EVENT,`connect`],matches:event=>!event?.payload?.learningAttemptId&&sessionListRealtimeShouldRefresh(event,projectSlug.value)}});const sessionList=proxyRefs({unavailableItems:computed(()=>sessionListResource.data.value?.unavailableSessions||[]),items:computed(()=>{const payload=sessionListResource.data.value||{};return Array.isArray(payload.sessions)?payload.sessions:[]}),loadError:computed(()=>sessionListResource.loadError.value),isInitialLoading:computed(()=>sessionListResource.isInitialLoading.value),isLoading:computed(()=>sessionListResource.isLoading.value),pages:computed(()=>{const payload=sessionListResource.data.value;return payload&&typeof payload===`object`&&!Array.isArray(payload)?[payload]:[]}),reload:sessionListResource.reload,resource:sessionListResource});let emptySessionListObservedForProject=``;const createSessionCommand=useCommand({access:`never`,apiSuffix:VIBE64_SESSIONS_API_SUFFIX,buildCommandOptions:(_model,{context})=>({method:`POST`,path:context?.apiPath}),buildRawPayload:(_model,{context})=>vibe64RealtimeOriginPayload({assistantSelection:context?.assistantSelection||{},...context?.workflowEngineId?{workflowEngineId:context.workflowEngineId}:{},...context?.repositoryBranch?{repositoryBranch:context.repositoryBranch}:{},...context?.pullRequestNumber?{pullRequestNumber:context.pullRequestNumber}:{}}),fallbackRunError:`Vibe64 session could not be created.`,messages:{error:`Vibe64 session could not be created.`,success:`Vibe64 session created.`},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.create`,surfaceId:`app`,writeMethod:`POST`});const createSessionPending=ref(false);const createSessionRunning=computed(()=>createSessionPending.value);const updateCurrentSessionCommand=useCommand({access:`never`,apiSuffix:VIBE64_CURRENT_SESSION_API_SUFFIX,buildCommandOptions:(_model,{context})=>({method:`PUT`,path:String(context?.apiPath||``)}),buildRawPayload:(_model,{context})=>({sessionId:String(context?.sessionId||``).trim()}),fallbackRunError:`The current session shortcut could not be updated.`,messages:{error:`The current session shortcut could not be updated.`},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.current.update`,suppressSuccessMessage:true,surfaceId:`app`,writeMethod:`PUT`});const currentSessionPublisher=createVibe64CurrentSessionPublisher({async publish({apiPath,sessionId}){const response=await updateCurrentSessionCommand.run({apiPath,sessionId});if(!response||response.ok===false)throw new Error(String(response?.error||`The current session shortcut could not be updated.`))},onError(error,publication){vibe64SessionDebugLog(`client.sessionData.currentSession.error`,{error:vibe64SessionDebugError(error),sessionId:publication.sessionId})}});let sessionDataDisposed=false;onScopeDispose(()=>{sessionDataDisposed=true;currentSessionPublisher.stop()});const archiveAttempts=ref({});const agentActivityBySessionId=ref({});const sessions=computed(()=>{const items=new Map((sessionList.items||[]).map(session=>[session.sessionId,session]));for(const[id,attempt]of Object.entries(archiveAttempts.value))if(attempt.succeeded)items.delete(id);else items.set(id,{...items.get(id)||attempt.session,archiving:true,archiveStartedAt:attempt.startedAt});return visibleVibe64Sessions([...items.values()]).map(session=>{const operation=sessionArchiveOperation(session);return{...session,agentActivity:latestAgentTurnRealtimeOverlay(session.agentActivity,agentActivityBySessionId.value[session.sessionId]),archiveOperation:operation,archiveStartedAt:operation?.startedAt||session.archiveStartedAt,archiveError:operation?.status===`failed`?operation.error:``,archiving:Boolean(session.archiving||operation?.status===`running`||operation?.status!==`failed`&&session.metadata?.session_closing_reason===`archived`)}})});const availableSessions=computed(()=>sessions.value.filter(session=>!session.archiving));const selectedListSession=computed(()=>{return sessions.value.find(session=>session.sessionId===selectedSessionId.value)||null});const selectedSessionMissing=computed(()=>{const selectedId=String(selectedSessionId.value||``).trim();if(!selectedId||sessionList.pages.length<1||String(sessionList.loadError||``).trim()||sessionIdExistsInList(selectedId,sessions.value))return false;return true});const selectionRenewalPredecessorId=computed(()=>{const selectedId=String(selectedSessionId.value||``).trim();if(!selectedId||sessionList.pages.length<1||String(sessionList.loadError||``).trim())return``;if(sessionList.unavailableItems.some(session=>session.sessionId===selectedId))return``;if(selectedSessionMissing.value)return selectedId;return String(selectedListSession.value?.metadata?.renewed_from||``).trim()});const selectionRenewalPath=computed(()=>selectionRenewalPredecessorId.value?vibe64SessionPath(sessionsApiPath.value,selectionRenewalPredecessorId.value,`/renewal`):``);const selectionRenewalResource=useEndpointResource({enabled:computed(()=>Boolean(selectionRenewalPredecessorId.value)),fallbackLoadError:`The selected session renewal could not be checked.`,path:selectionRenewalPath,queryKey:computed(()=>[...vibe64SessionQueryKey(`app`,ROUTE_VISIBILITY_PUBLIC,projectSlug.value),selectionRenewalPredecessorId.value,`renewal`]),queryOptions:{refetchOnMount:`always`,refetchOnWindowFocus:false},readMethod:`GET`,realtime:{event:VIBE64_SESSION_CHANGED_EVENT,matches:({payload={}}={})=>mountedSessionRealtimeShouldRefresh({payload},selectionRenewalPredecessorId.value)},requestRecoveryLabel:`Selected session renewal`});const creationOptions=computed(()=>sessionList.pages?.[0]?.creation||{});const selectedSession=computed(()=>enrichVibe64SessionForDisplay(selectedListSession.value));const isSelectedSessionArchived=computed(()=>isArchivedVibe64Session(selectedSession.value||{}));const pageLoading=computed(()=>Boolean(sessionList.isLoading));const canCreateSession=computed(()=>{return creationOptions.value.canCreate===true});const createSessionVisible=computed(()=>creationOptions.value.showCreateAction===true);const createSessionTitle=computed(()=>{if(creationOptions.value.disabledReason)return String(creationOptions.value.disabledReason);if(creationOptions.value.canCreate!==true)return`Session creation is unavailable.`;return`Create a new Vibe64 session`});const selectedSessionTitle=computed(()=>{return vibe64SessionDisplayTitle(selectedSession.value||{})||`Session ${shortVibe64SessionId(selectedSessionId.value)}`});async function refreshSessionList(){return refetchEndpointResource(sessionListResource)}let refreshSessionDataInFlight=null;async function refreshSessionData(options={}){const reason=typeof options===`string`?options:String(options?.reason||``);if(refreshSessionDataInFlight){vibe64SessionDebugLog(`client.sessionData.refresh.join`,{reason,selectedSessionId:String(selectedSessionId.value||``)});return refreshSessionDataInFlight}const startedAtMs=Date.now();vibe64SessionDebugLog(`client.sessionData.refresh.start`,{reason,selectedSessionId:String(selectedSessionId.value||``)});refreshSessionDataInFlight=refreshSessionList();try{const result=await refreshSessionDataInFlight;vibe64SessionDebugLog(`client.sessionData.refresh.done`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),reason,selectedSessionId:String(selectedSessionId.value||``),sessionCount:sessions.value.length});return result}catch(error){vibe64SessionDebugLog(`client.sessionData.refresh.error`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),error:vibe64SessionDebugError(error),reason,selectedSessionId:String(selectedSessionId.value||``)});throw error}finally{refreshSessionDataInFlight=null}}function refreshSessionDataInBackground(options={}){refreshSessionData(options).catch(()=>{})}function selectSessionId(sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(sessions.value.some(session=>session.sessionId===normalizedSessionId&&session.archiving))return;vibe64SessionDebugLog(`client.sessionData.selectSession`,{fromSessionId:String(selectedSessionId.value||``),toSessionId:normalizedSessionId});if(normalizedSessionId)emptySessionListObservedForProject=``;sessionSelection.select(normalizedSessionId)}function clearSelectedSession(){emptySessionListObservedForProject=selectionScope.value;sessionSelection.clear()}function selectPreviousSession(sessionId){const navigation=sessions.value;const index=navigation.findIndex(session=>session.sessionId===sessionId);selectSessionId(navigation.slice(0,Math.max(0,index)).filter(session=>!session.archiving).at(-1)?.sessionId||availableSessions.value.at(-1)?.sessionId||``)}const archive=proxyRefs(useVibe64SessionDialogs({beginArchive(sessionId){archiveAttempts.value[sessionId]={startedAt:new Date().toISOString(),session:sessions.value.find(session=>session.sessionId===sessionId)};if(selectedSessionId.value===sessionId)selectPreviousSession(sessionId);return projectSlug.value},finishArchive(sessionId,succeeded,archiveProject){if(projectSlug.value!==archiveProject)return;if(succeeded)archiveAttempts.value[sessionId]={succeeded:true};else{delete archiveAttempts.value[sessionId];if(!selectedSessionId.value)selectSessionId(sessionId)}},isSelectedSessionArchived,refreshSessionData,selectedSessionId,selectedSessionTitle,sessionsApiPath}).archive);const archiveFeedback=useUiFeedback({source:`vibe64.sessions.archive.remote`});const shownArchiveFailures=new Set;watch(projectSlug,()=>{archiveAttempts.value={};agentActivityBySessionId.value={};shownArchiveFailures.clear()});useRealtimeEvent({event:VIBE64_SESSION_CHANGED_EVENT,matches:({payload={}}={})=>payload.projectSlug===projectSlug.value,onEvent:({payload={}}={})=>{const id=String(payload.sessionId||``);if(!id)return;const activity=agentTurnRealtimeOverlayFromPayload(payload,id);if(activity)agentActivityBySessionId.value[id]=latestAgentTurnRealtimeOverlay(agentActivityBySessionId.value[id],{active:activity.active,revision:activity.revision});if(payload.reason===`session-archiving`){const session=sessions.value.find(item=>item.sessionId===id);if(session)archiveAttempts.value[id]={session,startedAt:archiveAttempts.value[id]?.startedAt||new Date().toISOString()};if(selectedSessionId.value===id)selectPreviousSession(id)}else if(payload.reason===`session-archived`)archiveAttempts.value[id]={succeeded:true};else if(payload.reason===`session-archive-failed`){delete archiveAttempts.value[id];if(!selectedSessionId.value)selectSessionId(id)}}});watch(()=>sessionList.items,items=>{for(const id of Object.keys(agentActivityBySessionId.value))if(!items.some(session=>session.sessionId===id))delete agentActivityBySessionId.value[id];for(const[id,attempt]of Object.entries(archiveAttempts.value)){if(attempt.succeeded||archive.archivingSessionId===id)continue;const session=items.find(item=>item.sessionId===id);const operation=sessionArchiveOperation(session);if(!session||operation?.status===`failed`||operation?.status!==`running`&&session.metadata?.session_closing_reason!==`archived`)delete archiveAttempts.value[id]}});watch(sessions,items=>{for(const session of items){const key=`${session.sessionId}:${session.metadata?.session_archive_operation}`;if(!session.archiveError||shownArchiveFailures.has(key))continue;shownArchiveFailures.add(key);if(archive.archivingSessionId!==session.sessionId)archiveFeedback.error(new Error(session.archiveError))}},{immediate:true});let createSessionInFlight=null;async function createSession(assistantSelection={},{pullRequestNumber,workflowEngineId,repositoryBranch}={}){if(createSessionInFlight)return createSessionInFlight;const startedAtMs=Date.now();const creationProjectSlug=String(projectSlug.value||``).trim();const creationApiPath=sessionsApiPath.value;const creationQueryKey=[...sessionListQueryKey.value];vibe64SessionDebugLog(`client.sessionData.createSession.start`);createSessionPending.value=true;createSessionInFlight=(async()=>{try{const response=await createSessionCommand.run({assistantSelection,pullRequestNumber,workflowEngineId,repositoryBranch,apiPath:creationApiPath});if(!sessionDataDisposed&&creationProjectSlug===String(projectSlug.value||``).trim()){if(response?.creation&&response?.limits)queryClient.setQueryData(creationQueryKey,currentPayload=>{if(!currentPayload||typeof currentPayload!==`object`||Array.isArray(currentPayload))return currentPayload;const currentSessions=Array.isArray(currentPayload.sessions)?currentPayload.sessions:[];const createdSession=response.sessionId?Object.fromEntries(Object.entries(response).filter(([key])=>![`creation`,`limits`,`ok`].includes(key))):null;return{...currentPayload,creation:response.creation,limits:response.limits,...createdSession&&!currentSessions.some(item=>item?.sessionId===createdSession.sessionId)?{sessions:[...currentSessions,createdSession]}:{}}});if(response?.sessionId)selectSessionId(response.sessionId);refreshSessionDataInBackground({includeList:true,reason:`create-session`})}vibe64SessionDebugLog(`client.sessionData.createSession.done`,{...vibe64SessionDebugSummary(response||{}),code:String(response?.code||response?.errors?.[0]?.code||``),durationMs:vibe64SessionDebugDurationMs(startedAtMs),ok:response?.ok!==false});return response}catch(error){vibe64SessionDebugLog(`client.sessionData.createSession.error`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),error:vibe64SessionDebugError(error)});throw error}finally{createSessionPending.value=false;createSessionInFlight=null}})();return createSessionInFlight}let pendingRenewalNavigation=null;function syncRenewalSuccessorUrl(predecessorId,successorId){if(selectedSessionIdFromRoute(route)!==predecessorId)return;const capturedProject=String(projectSlug.value||``).trim();const capturedApiPath=sessionsApiPath.value;const predecessorUrl=route.fullPath;if(pendingRenewalNavigation?.predecessorUrl===predecessorUrl&&pendingRenewalNavigation?.successorId===successorId)return;const sameRenewal=()=>{const renewal=selectionRenewalResource.data.value?.renewal;return!sessionDataDisposed&&String(projectSlug.value||``).trim()===capturedProject&&sessionsApiPath.value===capturedApiPath&&selectedSessionId.value===successorId&&!selectionRenewalResource.loadError?.value&&!selectionRenewalResource.isInitialLoading?.value&&!selectionRenewalResource.isLoading?.value&&renewal?.status===`completed`&&String(renewal.sessionId||``).trim()===predecessorId&&String(renewal.successor?.sessionId||``).trim()===successorId&&renewedSuccessorSessionId({predecessorSessionId:predecessorId,sessions:availableSessions.value})===successorId};if(!sameRenewal())return;const target={path:route.path,hash:route.hash,query:{...route.query,session:successorId}};const targetUrl=router.resolve(target).fullPath;const navigation={predecessorUrl,successorId};const removeGuard=router.beforeResolve(to=>{if(to.fullPath===targetUrl&&(!sameRenewal()||route.fullPath!==predecessorUrl))return false});pendingRenewalNavigation=navigation;(async()=>{try{await router.replace(target)}catch(error){if(sameRenewal())vibe64SessionDebugLog(`client.sessionData.renewalNavigation.error`,{error:vibe64SessionDebugError(error),sessionId:successorId})}finally{removeGuard();if(pendingRenewalNavigation===navigation)pendingRenewalNavigation=null}})()}const selectionReconciliationState=computed(()=>{const nextSessions=availableSessions.value;return{createSessionRunning:createSessionRunning.value,currentSessionApiPath:currentSessionApiPath.value,selectionScope:selectionScope.value,selectionRenewal:selectionRenewalResource.data.value?.renewal||null,selectionRenewalLoadError:String(selectionRenewalResource.loadError?.value||``),selectionRenewalLoaded:Boolean(selectionRenewalResource.data.value&&typeof selectionRenewalResource.data.value===`object`&&!Array.isArray(selectionRenewalResource.data.value)),selectionRenewalLoading:Boolean(selectionRenewalResource.isInitialLoading?.value||selectionRenewalResource.isLoading?.value),selectionRenewalPredecessorId:selectionRenewalPredecessorId.value,projectSlug:String(projectSlug.value||``).trim(),selectedSessionMissing:selectedSessionMissing.value,nextSessions,selectedSessionId:String(selectedSessionId.value||``),sessionIds:nextSessions.map(session=>session.sessionId).join(`|`),sessionListInitialLoading:sessionList.isInitialLoading,sessionListLoaded:sessionList.pages.length>0,sessionListLoadError:String(sessionList.loadError||``),sessionListLoading:sessionList.isLoading}});watch(selectionReconciliationState,state=>{const nextSessions=state.nextSessions;if(sessions.value.some(session=>session.sessionId===state.selectedSessionId&&session.archiving)){selectPreviousSession(state.selectedSessionId);return}vibe64SessionDebugLog(`client.sessionData.sessions.changed`,{selectedSessionId:String(selectedSessionId.value||``),sessionCount:nextSessions.length});if(state.sessionListInitialLoading||state.sessionListLoadError||shouldPreserveSelectedSessionDuringRefresh({createSessionRunning:state.createSessionRunning,currentSessionId:state.selectedSessionId,nextSessions,sessionListLoading:state.sessionListLoading}))return;if(!state.selectedSessionId&&nextSessions.length===0)emptySessionListObservedForProject=state.selectionScope;if(state.selectionRenewalPredecessorId){if(state.selectionRenewalLoading||state.selectionRenewalLoadError||!state.selectionRenewalLoaded)return;const selectionRenewal=state.selectionRenewal;if(selectionRenewal&&String(selectionRenewal.sessionId||``).trim()===state.selectionRenewalPredecessorId){const renewalStatus=String(selectionRenewal.status||``).trim();if(renewalStatus===`completed`){const renewedSuccessorId=renewedSuccessorSessionId({predecessorSessionId:state.selectionRenewalPredecessorId,sessions:nextSessions});if(state.selectedSessionMissing){if(renewedSuccessorId)sessionSelection.selectAvailableId(nextSessions,{fallbackId:renewedSuccessorId,getId:session=>session.sessionId})}if(renewedSuccessorId&&selectedSessionId.value===renewedSuccessorId)syncRenewalSuccessorUrl(state.selectionRenewalPredecessorId,renewedSuccessorId);if(state.selectedSessionMissing)return}else if(state.selectedSessionMissing&&[`failed`,`running`].includes(renewalStatus))return;if([`failed`,`running`].includes(renewalStatus)){sessionSelection.select(state.selectionRenewalPredecessorId);return}}}if(!state.selectedSessionId&&emptySessionListObservedForProject===state.selectionScope)return;sessionSelection.selectAvailableId(nextSessions,{fallbackId:nextSessions.at(-1)?.sessionId||``,getId:session=>session.sessionId})},{immediate:true});watch(selectionReconciliationState,state=>{const publicationSessionId=selectedSessionIdForCurrentAlias({createSessionRunning:state.createSessionRunning,selectedSessionId:state.selectedSessionId,sessionListLoaded:state.sessionListLoaded,sessionListLoadError:state.sessionListLoadError,sessionListLoading:state.sessionListLoading,sessions:state.nextSessions});if(publicationSessionId===null||!state.currentSessionApiPath)return;currentSessionPublisher.request({apiPath:state.currentSessionApiPath,sessionId:publicationSessionId})},{flush:`post`,immediate:true});watch(selectedSessionTitle,title=>{notifyTitleChange(title||``)},{immediate:true});return{archive,canCreateSession,clearSelectedSession,createSession,createSessionCommand,createSessionRunning,createSessionVisible,createSessionTitle,isSelectedSessionArchived,availableSessions,pageLoading,refreshSessionData,selectSessionId,selectedSession,selectedSessionId,selectedSessionTitle,sessionList,sessions,sessionsApiPath,shortSessionId:shortVibe64SessionId,statusColor:vibe64SessionStatusColor,statusLabel:vibe64SessionStatusLabel,updateCurrentSessionCommand}}export{mountedSessionDetailRefreshReason as a,sessionRecordHasActiveAgentWork as c,sessionWithAgentTurnRealtimeOverlay as d,mountedSessionDetailLoadState as i,agentTurnRealtimeOverlayFromPayload as l,useVibe64SessionData as n,mountedSessionRealtimeShouldRefresh as o,latestSessionDetailRecord as r,mountedSessionRecord as s,sessionListRealtimeShouldRefresh as t,latestAgentTurnRealtimeOverlay as u};
1
+ import{Ht as watch,On as unref,g as computed,hn as proxyRefs,pn as onScopeDispose,vn as ref}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{J as useQueryClient,T as ROUTE_VISIBILITY_PUBLIC,t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{n as useRealtimeEvent}from"./useRealtimeEvent-Bwapstla.js";import{t as usePaths}from"./usePaths-Db88-HOm.js";import{t as useCommand}from"./useCommand-Bqxb-naz.js";import{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{t as useVibe64ProjectSlug}from"./useVibe64ProjectScope-Bp1ImZlz.js";import{n as vibe64RealtimeOriginPayload}from"./vibe64BrowserTabOrigin-SF9E31vi.js";import{$ as vibe64SessionPath,D as VIBE64_SESSION_CHANGED_EVENT,E as VIBE64_SESSIONS_API_SUFFIX,T as VIBE64_CURRENT_SESSION_API_SUFFIX,it as vibe64SessionsQueryKey,rt as vibe64SessionQueryKey,y as readRefOrGetterValue}from"./index-dNxr4Lg9.js";import{a as vibe64SessionDebugError,i as vibe64SessionDebugDurationMs,n as enrichVibe64SessionForDisplay,o as vibe64SessionDebugLog,r as visibleVibe64Sessions,s as vibe64SessionDebugSummary}from"./vibe64SessionPanelModel-DDorOuiL.js";import{c as vibe64SessionStatusLabel,i as vibe64SessionDisplayTitle,o as vibe64SessionRevision,r as shortVibe64SessionId,s as vibe64SessionStatusColor,t as isArchivedVibe64Session}from"./vibe64SessionViewModel-DR4tOlGM.js";import{y as VIBE64_PROJECT_CHANGED_EVENT}from"./studioGateApi-DcCqiD9V.js";import{n as useVibe64SessionSelection,t as selectedSessionIdFromRoute}from"./useVibe64SessionSelection-BzL1y_Vq.js";function plainObjectValue(value=null){return value&&typeof value===`object`&&!Array.isArray(value)?value:{}}function sessionChangedReason$1(payload={}){return String(payload?.reason||``).trim()}function sessionRevision(value){const revision=Number(value);return Number.isSafeInteger(revision)&&revision>=0?revision:null}function agentTurnRealtimeOverlayFromPayload(payload={},selectedSessionId=``){const changedSessionId=String(payload?.sessionId||payload?.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(selectedSessionId||``).trim())return null;const agentSession=plainObjectValue(payload.agentSession);const turn=plainObjectValue(agentSession.turn);const run=plainObjectValue(payload.agentRun);const revision=sessionRevision(payload.revision);if(revision===null||!Object.keys(turn).length&&!Object.keys(run).length)return null;const active=turn.active===true||run.active===true;return{active,agentRun:{...run,active},agentSession:{...agentSession,turn:{...turn,active}},reason:sessionChangedReason$1(payload),revision,sessionId:changedSessionId}}function latestAgentTurnRealtimeOverlay(current=null,candidate=null){if(!candidate)return current;if(!current||candidate.revision>current.revision)return candidate;return current}function mergeAgentRunOverlay(agentRuns=[],overlayRun={}){const runs=Array.isArray(agentRuns)?agentRuns:[];const runId=String(overlayRun.id||``).trim();if(!runId)return runs;const nextRun={...overlayRun,id:runId};const index=runs.findIndex(run=>String(run?.id||``).trim()===runId);if(index<0)return[...runs,nextRun];return runs.map((run,runIndex)=>runIndex===index?{...run,...nextRun}:run)}function sessionWithAgentTurnRealtimeOverlay(session=null,overlay=null){const currentRevision=sessionRevision(session?.revision);if(!session||!overlay||session?.ok===false||session.sessionId!==overlay.sessionId||currentRevision!==null&&overlay.revision<=currentRevision)return session;const overlayAgentSession=plainObjectValue(overlay.agentSession);return{...session,agentRuns:mergeAgentRunOverlay(session.agentRuns,plainObjectValue(overlay.agentRun)),agentSession:{...plainObjectValue(session.agentSession),...overlayAgentSession,thread:{...plainObjectValue(session.agentSession?.thread),...plainObjectValue(overlayAgentSession.thread)},turn:{...plainObjectValue(session.agentSession?.turn),...plainObjectValue(overlayAgentSession.turn),active:overlay.active===true}},revision:overlay.revision}}var MOUNTED_SESSION_IGNORED_REALTIME_REASONS=new Set([`assistant-stream`,`assistant-response-bundle`,`codex-app-server-commentary`,`codex-app-server-prompt-injected`,`codex-app-server-ready`,`codex-app-server-final-assistant-message`,`codex-app-server-live-progress`,`codex-app-server-reasoning-summary`,`codex-app-server-running`,`codex-app-server-terminal-assistant-message`,`codex-app-server-terminal-thinking-message`,`codex-app-server-terminal-user-message`,`codex-app-server-turn-active`,`codex-app-server-turn-claimed`,`codex-app-server-turn-finalizing`,`codex-app-server-turn-idle`,`codex-app-server-turn-state`,`codex-app-server-message-delivered`,`codex-context-replaced`,`codex-prompt-injected`,`opencode-server-assistant-message`,`opencode-server-message-delivered`,`opencode-server-progress`,`opencode-server-reasoning`,`opencode-server-tool`,`opencode-server-turn-active`,`opencode-server-turn-idle`,`output-target-started`,`output-target-ready`,`output-target-closed`,`output-target-stopped`]);function sessionRecordHasDetailProjection(session=null){return Boolean(session&&typeof session===`object`&&Object.hasOwn(session,`agentSession`))}function sessionRecordHasActiveAgentWork(session=null){return(session?.agentSession?.turn?.active??session?.agentActivity?.active)===true}function sessionRecordMatchesId(session=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();return Boolean(normalizedSessionId&&session?.sessionId===normalizedSessionId&&session?.ok!==false)}function latestSessionDetailRecord(current=null,candidate=null,sessionId=``){if(!sessionRecordMatchesId(candidate,sessionId))return current;if(!sessionRecordMatchesId(current,sessionId))return candidate;const currentRevision=vibe64SessionRevision(current);const candidateRevision=vibe64SessionRevision(candidate);if(currentRevision!==null&&candidateRevision!==null&&candidateRevision<currentRevision)return current;return candidate}function mountedSessionRecord(detailSession=null,listSession=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();const listSessionMatches=sessionRecordMatchesId(listSession,normalizedSessionId);if(!sessionRecordMatchesId(detailSession,normalizedSessionId))return listSessionMatches?listSession:null;const detailRevision=vibe64SessionRevision(detailSession);const listRevision=vibe64SessionRevision(listSession);if(listSessionMatches&&listRevision!==null&&detailRevision!==null&&listRevision>detailRevision){if(sessionRecordHasDetailProjection(detailSession)&&!sessionRecordHasDetailProjection(listSession))return detailSession;return listSession}return detailSession}function mountedSessionDetailRefreshReason(detailSession=null,listSession=null,sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(!sessionRecordMatchesId(detailSession,normalizedSessionId)||!sessionRecordMatchesId(listSession,normalizedSessionId))return``;const detailRevision=vibe64SessionRevision(detailSession);const listRevision=vibe64SessionRevision(listSession);if(listRevision!==null&&detailRevision!==null&&listRevision>detailRevision&&sessionRecordHasDetailProjection(detailSession)&&!sessionRecordHasDetailProjection(listSession))return`newer_summary_without_detail`;return``}function mountedSessionDetailLoadState({detailSession=null,fetching=false,listSession=null,loadError=``,loading=false,sessionId=``}={}){const normalizedSessionId=String(sessionId||``).trim();const hasDetail=sessionRecordMatchesId(detailSession,normalizedSessionId);const hasSummary=sessionRecordMatchesId(listSession,normalizedSessionId);const error=String(loadError||``).trim();if(!normalizedSessionId)return{error:``,label:``,loading:false,ready:false,restoring:false,sessionId:``,state:`summaryOnly`};if(error&&!hasDetail)return{error,label:`Session could not load.`,loading:false,ready:false,restoring:false,sessionId:normalizedSessionId,state:`detailError`};if(hasDetail)return{error:``,label:``,loading:false,ready:true,refreshing:Boolean(fetching||loading),restoring:false,sessionId:normalizedSessionId,state:`detailReady`};if(loading||fetching)return{error:``,label:`Loading session...`,loading:true,ready:false,restoring:false,sessionId:normalizedSessionId,state:`detailLoading`};return{error:``,label:hasSummary?`Session could not load.`:`Loading session...`,loading:false,ready:false,restoring:false,sessionId:normalizedSessionId,state:`summaryOnly`}}function mountedSessionRealtimeShouldRefresh({payload={}}={},sessionId=``){const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(sessionId||``).trim())return false;const reason=String(payload?.reason||``).trim();return!reason||!MOUNTED_SESSION_IGNORED_REALTIME_REASONS.has(reason)}function useVibe64SessionDialogs({archiveAllowed=true,beginArchive=()=>null,finishArchive=()=>null,isSelectedSessionArchived,refreshSessionData=async()=>null,selectedSessionId,selectedSessionTitle,sessionsApiPath}={}){const archiveDialogOpen=ref(false);const archiveDialogSessionId=ref(``);const archiveDialogSessionTitle=ref(``);const archivingSessionId=ref(``);const resolvedSessionsApiPath=computed(()=>String(readRefOrGetterValue(sessionsApiPath)||``));const archiveCommand=useCommand({access:`never`,apiSuffix:VIBE64_SESSIONS_API_SUFFIX,buildRawPayload:()=>vibe64RealtimeOriginPayload(),buildCommandOptions:(_payload,{context})=>({method:`POST`,path:vibe64SessionPath(resolvedSessionsApiPath.value,context?.sessionId,`/archive`)}),fallbackRunError:`Vibe64 session could not be archived.`,messages:{error:`Vibe64 session could not be archived.`,success:`Vibe64 session archived.`},onRunSuccess:async response=>{if(response?.ok!==true)throw new Error(response?.errors?.[0]?.message||response?.error||`Vibe64 session could not be archived.`)},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.archive`,surfaceId:`app`,writeMethod:`POST`});function clearArchiveDialog(){archiveDialogOpen.value=false;archiveDialogSessionId.value=``;archiveDialogSessionTitle.value=``}function requestArchiveSelectedSession(){if(!readRefOrGetterValue(archiveAllowed)||!unref(selectedSessionId)||archivingSessionId.value||archiveCommand.isRunning||unref(isSelectedSessionArchived))return;archiveDialogSessionId.value=unref(selectedSessionId);archiveDialogSessionTitle.value=unref(selectedSessionTitle);archiveDialogOpen.value=true}function cancelArchiveSession(){if(!archiveCommand.isRunning)clearArchiveDialog()}async function confirmArchiveSession(){if(!archiveDialogSessionId.value||archivingSessionId.value||archiveCommand.isRunning)return false;const sessionId=archiveDialogSessionId.value;archivingSessionId.value=sessionId;clearArchiveDialog();const archiveScope=beginArchive(sessionId);let succeeded=false;try{const response=await archiveCommand.run({sessionId});succeeded=response?.ok===true;return response}catch{return false}finally{finishArchive(sessionId,succeeded,archiveScope);if(archivingSessionId.value===sessionId)archivingSessionId.value=``;refreshSessionData({includeList:true,reason:`archive-session`}).catch(()=>null)}}function clear(){clearArchiveDialog()}return{archive:{archiving:computed(()=>Boolean(archivingSessionId.value)),archivingSessionId,cancel:cancelArchiveSession,command:archiveCommand,confirm:confirmArchiveSession,open:archiveDialogOpen,request:requestArchiveSelectedSession,sessionId:archiveDialogSessionId,sessionTitle:archiveDialogSessionTitle},busy:computed(()=>Boolean(archivingSessionId.value)),clear}}function createVibe64CurrentSessionPublisher({coalesceByPath=false,onError=()=>null,publish}={}){if(typeof publish!==`function`)throw new TypeError(`Current Vibe64 session publisher requires publish().`);const pendingPublications=new Map;let publicationChain=Promise.resolve();let lastPublishedIdentity=null;let stopped=false;function request(publication={}){if(stopped)return publicationChain;const apiPath=String(publication?.apiPath||``);const sessionId=String(publication?.sessionId||``).trim();const publicationKey=(typeof coalesceByPath===`function`?coalesceByPath():coalesceByPath)?apiPath:``;pendingPublications.set(publicationKey,{apiPath,identity:JSON.stringify([apiPath,sessionId]),sessionId});publicationChain=publicationChain.catch(()=>null).then(async()=>{if(stopped||pendingPublications.size===0)return;const[key,publication]=pendingPublications.entries().next().value;pendingPublications.delete(key);if(publication.identity===lastPublishedIdentity)return;try{await publish({apiPath:publication.apiPath,sessionId:publication.sessionId});lastPublishedIdentity=publication.identity}catch(error){onError(error,publication)}});return publicationChain}function stop(){stopped=true;pendingPublications.clear()}return Object.freeze({request,stop})}function vibe64SessionListRefreshRequested(payload={}){return payload?.clientRefresh?.includeList===true}var SESSION_LIST_IGNORED_REALTIME_REASONS=new Set([`assistant-stream`,`assistant-response-bundle`,`codex-app-server-ready`,`codex-app-server-agent-result`,`codex-app-server-agent-result-invalid`,`codex-app-server-agent-result-missing`,`codex-app-server-agent-result-provider-failed`,`codex-app-server-blocked`,`codex-app-server-commentary`,`codex-app-server-failed`,`codex-app-server-final-assistant-message`,`codex-app-server-live-progress`,`codex-app-server-prompt-injected`,`codex-app-server-reasoning-summary`,`codex-app-server-running`,`codex-app-server-terminal-assistant-message`,`codex-app-server-terminal-thinking-message`,`codex-app-server-terminal-user-message`,`codex-app-server-turn-active`,`codex-app-server-turn-claimed`,`codex-app-server-turn-finalizing`,`codex-app-server-turn-idle`,`codex-app-server-turn-state`,`codex-app-server-message-delivered`,`codex-prompt-injected`,`codex-context-replaced`,`opencode-server-assistant-message`,`opencode-server-message-delivered`,`opencode-server-progress`,`opencode-server-reasoning`,`opencode-server-tool`,`opencode-server-turn-active`,`opencode-server-turn-idle`,`agent-terminal-started`,`agent-terminal-closed`,`output-target-started`,`output-target-ready`,`output-target-closed`,`output-target-stopped`]);function sessionArchiveOperation(session){try{return JSON.parse(session?.metadata?.session_archive_operation||`null`)}catch{return{status:`failed`,error:`Session archive state could not be read.`}}}function sessionIdExistsInList(sessionId=``,nextSessions=[]){const normalizedSessionId=String(sessionId||``).trim();return Boolean(normalizedSessionId)&&nextSessions.some(session=>session.sessionId===normalizedSessionId)}function renewedSuccessorSessionId({predecessorSessionId=``,sessions=[]}={}){const predecessorId=String(predecessorSessionId||``).trim();if(!predecessorId)return``;const matches=sessions.filter(session=>String(session?.metadata?.renewed_from||``).trim()===predecessorId);return matches.length===1?String(matches[0]?.sessionId||``).trim():``}function shouldPreserveSelectedSessionDuringRefresh({createSessionRunning=false,currentSessionId=``,nextSessions=[],selectedSessionLoading=false,sessionListLoading=false}={}){const normalizedSessionId=String(currentSessionId||``).trim();if(!normalizedSessionId||sessionIdExistsInList(normalizedSessionId,nextSessions))return false;return Boolean(sessionListLoading||createSessionRunning||selectedSessionLoading)}function selectedSessionIdForCurrentAlias({createSessionRunning=false,selectedSessionId=``,selectedSessionLoading=false,sessionListLoaded=true,sessionListLoadError=``,sessionListLoading=false,sessions=[]}={}){if(!sessionListLoaded||sessionListLoading||String(sessionListLoadError||``).trim())return null;const normalizedSessionId=String(selectedSessionId||``).trim();if(sessionIdExistsInList(normalizedSessionId,sessions))return normalizedSessionId;if(sessions.length>0||createSessionRunning||selectedSessionLoading)return null;return``}function sessionChangedReason(payload={}){return String(payload?.reason||``).trim()}function sessionListRealtimeShouldRefresh({payload={}}={},projectSlug=``){if(payload.projectSlug&&payload.projectSlug!==projectSlug)return false;if(vibe64SessionListRefreshRequested(payload))return true;const reason=sessionChangedReason(payload);if(reason===`assistant-routing-changed`&&payload.assistantRoutingRequest)return false;return!reason||!SESSION_LIST_IGNORED_REALTIME_REASONS.has(reason)}function refetchEndpointResource(resource){if(typeof resource?.query?.refetch===`function`)return resource.query.refetch({cancelRefetch:false});return resource?.reload?.()}function useVibe64SessionData({onTitleChange=null}={}){const notifyTitleChange=typeof onTitleChange===`function`?onTitleChange:()=>null;const queryClient=useQueryClient();const projectSlug=useVibe64ProjectSlug();const route=useRoute();const router=useRouter();const paths=usePaths();const selectionScope=computed(()=>String(projectSlug.value||``).trim());const sessionSelection=useVibe64SessionSelection({projectSlug});const selectedSessionId=sessionSelection.selectedId;const sessionsApiPath=computed(()=>paths.api(VIBE64_SESSIONS_API_SUFFIX,{surface:`app`}));const currentSessionApiPath=computed(()=>paths.api(VIBE64_CURRENT_SESSION_API_SUFFIX,{surface:`app`}));const sessionListQueryKey=computed(()=>vibe64SessionsQueryKey(`app`,ROUTE_VISIBILITY_PUBLIC,projectSlug.value));const sessionListResource=useEndpointResource({fallbackLoadError:`Vibe64 sessions could not be loaded.`,path:sessionsApiPath,queryKey:sessionListQueryKey,readQuery:{limit:20},queryOptions:{refetchOnMount:false,refetchOnWindowFocus:false},requestRecoveryLabel:`Vibe64 sessions`,realtime:{events:[VIBE64_SESSION_CHANGED_EVENT,VIBE64_PROJECT_CHANGED_EVENT,`connect`],matches:event=>!event?.payload?.learningAttemptId&&sessionListRealtimeShouldRefresh(event,projectSlug.value)}});const sessionList=proxyRefs({unavailableItems:computed(()=>sessionListResource.data.value?.unavailableSessions||[]),items:computed(()=>{const payload=sessionListResource.data.value||{};return Array.isArray(payload.sessions)?payload.sessions:[]}),loadError:computed(()=>sessionListResource.loadError.value),isInitialLoading:computed(()=>sessionListResource.isInitialLoading.value),isLoading:computed(()=>sessionListResource.isLoading.value),pages:computed(()=>{const payload=sessionListResource.data.value;return payload&&typeof payload===`object`&&!Array.isArray(payload)?[payload]:[]}),reload:sessionListResource.reload,resource:sessionListResource});let emptySessionListObservedForProject=``;const createSessionCommand=useCommand({access:`never`,apiSuffix:VIBE64_SESSIONS_API_SUFFIX,buildCommandOptions:(_model,{context})=>({method:`POST`,path:context?.apiPath}),buildRawPayload:(_model,{context})=>vibe64RealtimeOriginPayload({assistantSelection:context?.assistantSelection||{},...context?.workflowEngineId?{workflowEngineId:context.workflowEngineId}:{},...context?.repositoryBranch?{repositoryBranch:context.repositoryBranch}:{},...context?.pullRequestNumber?{pullRequestNumber:context.pullRequestNumber}:{}}),fallbackRunError:`Vibe64 session could not be created.`,messages:{error:`Vibe64 session could not be created.`,success:`Vibe64 session created.`},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.create`,surfaceId:`app`,writeMethod:`POST`});const createSessionPending=ref(false);const createSessionRunning=computed(()=>createSessionPending.value);const updateCurrentSessionCommand=useCommand({access:`never`,apiSuffix:VIBE64_CURRENT_SESSION_API_SUFFIX,buildCommandOptions:(_model,{context})=>({method:`PUT`,path:String(context?.apiPath||``)}),buildRawPayload:(_model,{context})=>({sessionId:String(context?.sessionId||``).trim()}),fallbackRunError:`The current session shortcut could not be updated.`,messages:{error:`The current session shortcut could not be updated.`},ownershipFilter:ROUTE_VISIBILITY_PUBLIC,placementSource:`vibe64.sessions.current.update`,suppressSuccessMessage:true,surfaceId:`app`,writeMethod:`PUT`});const currentSessionPublisher=createVibe64CurrentSessionPublisher({async publish({apiPath,sessionId}){const response=await updateCurrentSessionCommand.run({apiPath,sessionId});if(!response||response.ok===false)throw new Error(String(response?.error||`The current session shortcut could not be updated.`))},onError(error,publication){vibe64SessionDebugLog(`client.sessionData.currentSession.error`,{error:vibe64SessionDebugError(error),sessionId:publication.sessionId})}});let sessionDataDisposed=false;onScopeDispose(()=>{sessionDataDisposed=true;currentSessionPublisher.stop()});const archiveAttempts=ref({});const agentActivityBySessionId=ref({});const sessions=computed(()=>{const items=new Map((sessionList.items||[]).map(session=>[session.sessionId,session]));for(const[id,attempt]of Object.entries(archiveAttempts.value))if(attempt.succeeded)items.delete(id);else items.set(id,{...items.get(id)||attempt.session,archiving:true,archiveStartedAt:attempt.startedAt});return visibleVibe64Sessions([...items.values()]).map(session=>{const operation=sessionArchiveOperation(session);return{...session,agentActivity:latestAgentTurnRealtimeOverlay(session.agentActivity,agentActivityBySessionId.value[session.sessionId]),archiveOperation:operation,archiveStartedAt:operation?.startedAt||session.archiveStartedAt,archiveError:operation?.status===`failed`?operation.error:``,archiving:Boolean(session.archiving||operation?.status===`running`||operation?.status!==`failed`&&session.metadata?.session_closing_reason===`archived`)}})});const availableSessions=computed(()=>sessions.value.filter(session=>!session.archiving));const selectedListSession=computed(()=>{return sessions.value.find(session=>session.sessionId===selectedSessionId.value)||null});const selectedSessionMissing=computed(()=>{const selectedId=String(selectedSessionId.value||``).trim();if(!selectedId||sessionList.pages.length<1||String(sessionList.loadError||``).trim()||sessionIdExistsInList(selectedId,sessions.value))return false;return true});const selectionRenewalPredecessorId=computed(()=>{const selectedId=String(selectedSessionId.value||``).trim();if(!selectedId||sessionList.pages.length<1||String(sessionList.loadError||``).trim())return``;if(sessionList.unavailableItems.some(session=>session.sessionId===selectedId))return``;if(selectedSessionMissing.value)return selectedId;return String(selectedListSession.value?.metadata?.renewed_from||``).trim()});const selectionRenewalPath=computed(()=>selectionRenewalPredecessorId.value?vibe64SessionPath(sessionsApiPath.value,selectionRenewalPredecessorId.value,`/renewal`):``);const selectionRenewalResource=useEndpointResource({enabled:computed(()=>Boolean(selectionRenewalPredecessorId.value)),fallbackLoadError:`The selected session renewal could not be checked.`,path:selectionRenewalPath,queryKey:computed(()=>[...vibe64SessionQueryKey(`app`,ROUTE_VISIBILITY_PUBLIC,projectSlug.value),selectionRenewalPredecessorId.value,`renewal`]),queryOptions:{refetchOnMount:`always`,refetchOnWindowFocus:false},readMethod:`GET`,realtime:{event:VIBE64_SESSION_CHANGED_EVENT,matches:({payload={}}={})=>mountedSessionRealtimeShouldRefresh({payload},selectionRenewalPredecessorId.value)},requestRecoveryLabel:`Selected session renewal`});const creationOptions=computed(()=>sessionList.pages?.[0]?.creation||{});const selectedSession=computed(()=>enrichVibe64SessionForDisplay(selectedListSession.value));const isSelectedSessionArchived=computed(()=>isArchivedVibe64Session(selectedSession.value||{}));const pageLoading=computed(()=>Boolean(sessionList.isLoading));const canCreateSession=computed(()=>{return creationOptions.value.canCreate===true});const createSessionVisible=computed(()=>creationOptions.value.showCreateAction===true);const createSessionTitle=computed(()=>{if(creationOptions.value.disabledReason)return String(creationOptions.value.disabledReason);if(creationOptions.value.canCreate!==true)return`Session creation is unavailable.`;return`Create a new Vibe64 session`});const selectedSessionTitle=computed(()=>{return vibe64SessionDisplayTitle(selectedSession.value||{})||`Session ${shortVibe64SessionId(selectedSessionId.value)}`});async function refreshSessionList(){return refetchEndpointResource(sessionListResource)}let refreshSessionDataInFlight=null;async function refreshSessionData(options={}){const reason=typeof options===`string`?options:String(options?.reason||``);if(refreshSessionDataInFlight){vibe64SessionDebugLog(`client.sessionData.refresh.join`,{reason,selectedSessionId:String(selectedSessionId.value||``)});return refreshSessionDataInFlight}const startedAtMs=Date.now();vibe64SessionDebugLog(`client.sessionData.refresh.start`,{reason,selectedSessionId:String(selectedSessionId.value||``)});refreshSessionDataInFlight=refreshSessionList();try{const result=await refreshSessionDataInFlight;vibe64SessionDebugLog(`client.sessionData.refresh.done`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),reason,selectedSessionId:String(selectedSessionId.value||``),sessionCount:sessions.value.length});return result}catch(error){vibe64SessionDebugLog(`client.sessionData.refresh.error`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),error:vibe64SessionDebugError(error),reason,selectedSessionId:String(selectedSessionId.value||``)});throw error}finally{refreshSessionDataInFlight=null}}function refreshSessionDataInBackground(options={}){refreshSessionData(options).catch(()=>{})}function selectSessionId(sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(sessions.value.some(session=>session.sessionId===normalizedSessionId&&session.archiving))return;vibe64SessionDebugLog(`client.sessionData.selectSession`,{fromSessionId:String(selectedSessionId.value||``),toSessionId:normalizedSessionId});if(normalizedSessionId)emptySessionListObservedForProject=``;sessionSelection.select(normalizedSessionId)}function clearSelectedSession(){emptySessionListObservedForProject=selectionScope.value;sessionSelection.clear()}function selectPreviousSession(sessionId){const navigation=sessions.value;const index=navigation.findIndex(session=>session.sessionId===sessionId);selectSessionId(navigation.slice(0,Math.max(0,index)).filter(session=>!session.archiving).at(-1)?.sessionId||availableSessions.value.at(-1)?.sessionId||``)}const archive=proxyRefs(useVibe64SessionDialogs({beginArchive(sessionId){archiveAttempts.value[sessionId]={startedAt:new Date().toISOString(),session:sessions.value.find(session=>session.sessionId===sessionId)};if(selectedSessionId.value===sessionId)selectPreviousSession(sessionId);return projectSlug.value},finishArchive(sessionId,succeeded,archiveProject){if(projectSlug.value!==archiveProject)return;if(succeeded)archiveAttempts.value[sessionId]={succeeded:true};else{delete archiveAttempts.value[sessionId];if(!selectedSessionId.value)selectSessionId(sessionId)}},isSelectedSessionArchived,refreshSessionData,selectedSessionId,selectedSessionTitle,sessionsApiPath}).archive);const archiveFeedback=useUiFeedback({source:`vibe64.sessions.archive.remote`});const shownArchiveFailures=new Set;watch(projectSlug,()=>{archiveAttempts.value={};agentActivityBySessionId.value={};shownArchiveFailures.clear()});useRealtimeEvent({event:VIBE64_SESSION_CHANGED_EVENT,matches:({payload={}}={})=>payload.projectSlug===projectSlug.value,onEvent:({payload={}}={})=>{const id=String(payload.sessionId||``);if(!id)return;const activity=agentTurnRealtimeOverlayFromPayload(payload,id);if(activity)agentActivityBySessionId.value[id]=latestAgentTurnRealtimeOverlay(agentActivityBySessionId.value[id],{active:activity.active,revision:activity.revision});if(payload.reason===`session-archiving`){const session=sessions.value.find(item=>item.sessionId===id);if(session)archiveAttempts.value[id]={session,startedAt:archiveAttempts.value[id]?.startedAt||new Date().toISOString()};if(selectedSessionId.value===id)selectPreviousSession(id)}else if(payload.reason===`session-archived`)archiveAttempts.value[id]={succeeded:true};else if(payload.reason===`session-archive-failed`){delete archiveAttempts.value[id];if(!selectedSessionId.value)selectSessionId(id)}}});watch(()=>sessionList.items,items=>{for(const id of Object.keys(agentActivityBySessionId.value))if(!items.some(session=>session.sessionId===id))delete agentActivityBySessionId.value[id];for(const[id,attempt]of Object.entries(archiveAttempts.value)){if(attempt.succeeded||archive.archivingSessionId===id)continue;const session=items.find(item=>item.sessionId===id);const operation=sessionArchiveOperation(session);if(!session||operation?.status===`failed`||operation?.status!==`running`&&session.metadata?.session_closing_reason!==`archived`)delete archiveAttempts.value[id]}});watch(sessions,items=>{for(const session of items){const key=`${session.sessionId}:${session.metadata?.session_archive_operation}`;if(!session.archiveError||shownArchiveFailures.has(key))continue;shownArchiveFailures.add(key);if(archive.archivingSessionId!==session.sessionId)archiveFeedback.error(new Error(session.archiveError))}},{immediate:true});let createSessionInFlight=null;async function createSession(assistantSelection={},{pullRequestNumber,workflowEngineId,repositoryBranch}={}){if(createSessionInFlight)return createSessionInFlight;const startedAtMs=Date.now();const creationProjectSlug=String(projectSlug.value||``).trim();const creationApiPath=sessionsApiPath.value;const creationQueryKey=[...sessionListQueryKey.value];vibe64SessionDebugLog(`client.sessionData.createSession.start`);createSessionPending.value=true;createSessionInFlight=(async()=>{try{const response=await createSessionCommand.run({assistantSelection,pullRequestNumber,workflowEngineId,repositoryBranch,apiPath:creationApiPath});if(!sessionDataDisposed&&creationProjectSlug===String(projectSlug.value||``).trim()){if(response?.creation&&response?.limits)queryClient.setQueryData(creationQueryKey,currentPayload=>{if(!currentPayload||typeof currentPayload!==`object`||Array.isArray(currentPayload))return currentPayload;const currentSessions=Array.isArray(currentPayload.sessions)?currentPayload.sessions:[];const createdSession=response.sessionId?Object.fromEntries(Object.entries(response).filter(([key])=>![`creation`,`limits`,`ok`].includes(key))):null;return{...currentPayload,creation:response.creation,limits:response.limits,...createdSession&&!currentSessions.some(item=>item?.sessionId===createdSession.sessionId)?{sessions:[...currentSessions,createdSession]}:{}}});if(response?.sessionId)selectSessionId(response.sessionId);refreshSessionDataInBackground({includeList:true,reason:`create-session`})}vibe64SessionDebugLog(`client.sessionData.createSession.done`,{...vibe64SessionDebugSummary(response||{}),code:String(response?.code||response?.errors?.[0]?.code||``),durationMs:vibe64SessionDebugDurationMs(startedAtMs),ok:response?.ok!==false});return response}catch(error){vibe64SessionDebugLog(`client.sessionData.createSession.error`,{durationMs:vibe64SessionDebugDurationMs(startedAtMs),error:vibe64SessionDebugError(error)});throw error}finally{createSessionPending.value=false;createSessionInFlight=null}})();return createSessionInFlight}let pendingRenewalNavigation=null;function syncRenewalSuccessorUrl(predecessorId,successorId){if(selectedSessionIdFromRoute(route)!==predecessorId)return;const capturedProject=String(projectSlug.value||``).trim();const capturedApiPath=sessionsApiPath.value;const predecessorUrl=route.fullPath;if(pendingRenewalNavigation?.predecessorUrl===predecessorUrl&&pendingRenewalNavigation?.successorId===successorId)return;const sameRenewal=()=>{const renewal=selectionRenewalResource.data.value?.renewal;return!sessionDataDisposed&&String(projectSlug.value||``).trim()===capturedProject&&sessionsApiPath.value===capturedApiPath&&selectedSessionId.value===successorId&&!selectionRenewalResource.loadError?.value&&!selectionRenewalResource.isInitialLoading?.value&&!selectionRenewalResource.isLoading?.value&&renewal?.status===`completed`&&String(renewal.sessionId||``).trim()===predecessorId&&String(renewal.successor?.sessionId||``).trim()===successorId&&renewedSuccessorSessionId({predecessorSessionId:predecessorId,sessions:availableSessions.value})===successorId};if(!sameRenewal())return;const target={path:route.path,hash:route.hash,query:{...route.query,session:successorId}};const targetUrl=router.resolve(target).fullPath;const navigation={predecessorUrl,successorId};const removeGuard=router.beforeResolve(to=>{if(to.fullPath===targetUrl&&(!sameRenewal()||route.fullPath!==predecessorUrl))return false});pendingRenewalNavigation=navigation;(async()=>{try{await router.replace(target)}catch(error){if(sameRenewal())vibe64SessionDebugLog(`client.sessionData.renewalNavigation.error`,{error:vibe64SessionDebugError(error),sessionId:successorId})}finally{removeGuard();if(pendingRenewalNavigation===navigation)pendingRenewalNavigation=null}})()}const selectionReconciliationState=computed(()=>{const nextSessions=availableSessions.value;return{createSessionRunning:createSessionRunning.value,currentSessionApiPath:currentSessionApiPath.value,selectionScope:selectionScope.value,selectionRenewal:selectionRenewalResource.data.value?.renewal||null,selectionRenewalLoadError:String(selectionRenewalResource.loadError?.value||``),selectionRenewalLoaded:Boolean(selectionRenewalResource.data.value&&typeof selectionRenewalResource.data.value===`object`&&!Array.isArray(selectionRenewalResource.data.value)),selectionRenewalLoading:Boolean(selectionRenewalResource.isInitialLoading?.value||selectionRenewalResource.isLoading?.value),selectionRenewalPredecessorId:selectionRenewalPredecessorId.value,projectSlug:String(projectSlug.value||``).trim(),selectedSessionMissing:selectedSessionMissing.value,nextSessions,selectedSessionId:String(selectedSessionId.value||``),sessionIds:nextSessions.map(session=>session.sessionId).join(`|`),sessionListInitialLoading:sessionList.isInitialLoading,sessionListLoaded:sessionList.pages.length>0,sessionListLoadError:String(sessionList.loadError||``),sessionListLoading:sessionList.isLoading}});watch(selectionReconciliationState,state=>{const nextSessions=state.nextSessions;if(sessions.value.some(session=>session.sessionId===state.selectedSessionId&&session.archiving)){selectPreviousSession(state.selectedSessionId);return}vibe64SessionDebugLog(`client.sessionData.sessions.changed`,{selectedSessionId:String(selectedSessionId.value||``),sessionCount:nextSessions.length});if(state.sessionListInitialLoading||state.sessionListLoadError||shouldPreserveSelectedSessionDuringRefresh({createSessionRunning:state.createSessionRunning,currentSessionId:state.selectedSessionId,nextSessions,sessionListLoading:state.sessionListLoading}))return;if(!state.selectedSessionId&&nextSessions.length===0)emptySessionListObservedForProject=state.selectionScope;if(state.selectionRenewalPredecessorId){if(state.selectionRenewalLoading||state.selectionRenewalLoadError||!state.selectionRenewalLoaded)return;const selectionRenewal=state.selectionRenewal;if(selectionRenewal&&String(selectionRenewal.sessionId||``).trim()===state.selectionRenewalPredecessorId){const renewalStatus=String(selectionRenewal.status||``).trim();if(renewalStatus===`completed`){const renewedSuccessorId=renewedSuccessorSessionId({predecessorSessionId:state.selectionRenewalPredecessorId,sessions:nextSessions});if(state.selectedSessionMissing){if(renewedSuccessorId)sessionSelection.selectAvailableId(nextSessions,{fallbackId:renewedSuccessorId,getId:session=>session.sessionId})}if(renewedSuccessorId&&selectedSessionId.value===renewedSuccessorId)syncRenewalSuccessorUrl(state.selectionRenewalPredecessorId,renewedSuccessorId);if(state.selectedSessionMissing)return}else if(state.selectedSessionMissing&&[`failed`,`running`].includes(renewalStatus))return;if([`failed`,`running`].includes(renewalStatus)){sessionSelection.select(state.selectionRenewalPredecessorId);return}}}if(!state.selectedSessionId&&emptySessionListObservedForProject===state.selectionScope)return;sessionSelection.selectAvailableId(nextSessions,{fallbackId:nextSessions.at(-1)?.sessionId||``,getId:session=>session.sessionId})},{immediate:true});watch(selectionReconciliationState,state=>{const publicationSessionId=selectedSessionIdForCurrentAlias({createSessionRunning:state.createSessionRunning,selectedSessionId:state.selectedSessionId,sessionListLoaded:state.sessionListLoaded,sessionListLoadError:state.sessionListLoadError,sessionListLoading:state.sessionListLoading,sessions:state.nextSessions});if(publicationSessionId===null||!state.currentSessionApiPath)return;currentSessionPublisher.request({apiPath:state.currentSessionApiPath,sessionId:publicationSessionId})},{flush:`post`,immediate:true});watch(selectedSessionTitle,title=>{notifyTitleChange(title||``)},{immediate:true});return{archive,canCreateSession,clearSelectedSession,createSession,createSessionCommand,createSessionRunning,createSessionVisible,createSessionTitle,isSelectedSessionArchived,availableSessions,pageLoading,refreshSessionData,selectSessionId,selectedSession,selectedSessionId,selectedSessionTitle,sessionList,sessions,sessionsApiPath,shortSessionId:shortVibe64SessionId,statusColor:vibe64SessionStatusColor,statusLabel:vibe64SessionStatusLabel,updateCurrentSessionCommand}}export{mountedSessionDetailRefreshReason as a,sessionRecordHasActiveAgentWork as c,sessionWithAgentTurnRealtimeOverlay as d,mountedSessionDetailLoadState as i,agentTurnRealtimeOverlayFromPayload as l,useVibe64SessionData as n,mountedSessionRealtimeShouldRefresh as o,latestSessionDetailRecord as r,mountedSessionRecord as s,sessionListRealtimeShouldRefresh as t,latestAgentTurnRealtimeOverlay as u};
@@ -1 +1 @@
1
- import{Ht as watch,On as unref,g as computed,vn as ref}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{t as useVibe64ProjectSlug}from"./useVibe64ProjectScope-Bp1ImZlz.js";import{M as selectedSessionStorageKey}from"./index-GBRpNZLy.js";function browserSessionStorage(){if(typeof window===`undefined`||!window.sessionStorage)return null;return window.sessionStorage}function readStoredValue(storageKey=``){try{return String(browserSessionStorage()?.getItem(storageKey)||``)}catch{return``}}function writeStoredValue(storageKey=``,value=``){try{const storage=browserSessionStorage();if(!storage)return;const normalizedValue=String(value||``).trim();if(normalizedValue){storage.setItem(storageKey,normalizedValue);return}storage.removeItem(storageKey)}catch{}}function readStorageKey(storageKey=``){return String(typeof storageKey===`function`?storageKey():unref(storageKey)||``).trim()}function readPreferredId(preferredId=``){return String(typeof preferredId===`function`?preferredId():unref(preferredId)||``).trim()}function useStoredSelection({preferredId=``,storageKey=``,enabled=true}={}){const selectionEnabled=computed(()=>Boolean(typeof enabled===`function`?enabled():unref(enabled)));const activeStorageKey=computed(()=>readStorageKey(storageKey));const activePreferredId=computed(()=>readPreferredId(preferredId));const selectedId=ref(selectionEnabled.value?activePreferredId.value||readStoredValue(activeStorageKey.value):``);function select(id=``){if(!selectionEnabled.value)return;selectedId.value=String(id||``).trim();writeStoredValue(activeStorageKey.value,selectedId.value)}function clear(){select(``)}function selectAvailableId(items=[],{fallbackId=``,getId=item=>item?.id}={}){if(!selectionEnabled.value)return``;if(items.length===0){clear();return``}const itemIds=items.map(item=>String(getId(item)||``).trim()).filter(Boolean);if(itemIds.includes(selectedId.value)){select(selectedId.value);return selectedId.value}const preferredSelectionId=activePreferredId.value;if(itemIds.includes(preferredSelectionId)){select(preferredSelectionId);return selectedId.value}const rememberedId=readStoredValue(activeStorageKey.value);select(itemIds.includes(rememberedId)?rememberedId:String(fallbackId||``).trim());return selectedId.value}function capture(){const key=activeStorageKey.value;const admitted=selectionEnabled.value;return Object.freeze({select(id=``){if(!admitted)return;const value=String(id||``).trim();writeStoredValue(key,value);if(selectionEnabled.value&&activeStorageKey.value===key)selectedId.value=value}})}watch(selectionEnabled,nextEnabled=>{selectedId.value=nextEnabled?activePreferredId.value||readStoredValue(activeStorageKey.value):``},{flush:`sync`});watch(activeStorageKey,nextStorageKey=>{if(selectionEnabled.value)selectedId.value=activePreferredId.value||readStoredValue(nextStorageKey)});watch(activePreferredId,nextPreferredId=>{if(selectionEnabled.value&&nextPreferredId)selectedId.value=nextPreferredId});return{capture,clear,select,selectAvailableId,selectedId}}function selectedSessionIdFromRoute(route={}){const rawValue=route?.query?.session;const value=Array.isArray(rawValue)?rawValue[0]:rawValue;return String(value||``).trim()}function useVibe64SessionSelection({projectSlug=useVibe64ProjectSlug(),route=useRoute()}={}){return useStoredSelection({preferredId:computed(()=>selectedSessionIdFromRoute(route)),storageKey:computed(()=>selectedSessionStorageKey(unref(projectSlug)))})}export{useVibe64SessionSelection as n,selectedSessionIdFromRoute as t};
1
+ import{Ht as watch,On as unref,g as computed,vn as ref}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{t as useVibe64ProjectSlug}from"./useVibe64ProjectScope-Bp1ImZlz.js";import{M as selectedSessionStorageKey}from"./index-dNxr4Lg9.js";function browserSessionStorage(){if(typeof window===`undefined`||!window.sessionStorage)return null;return window.sessionStorage}function readStoredValue(storageKey=``){try{return String(browserSessionStorage()?.getItem(storageKey)||``)}catch{return``}}function writeStoredValue(storageKey=``,value=``){try{const storage=browserSessionStorage();if(!storage)return;const normalizedValue=String(value||``).trim();if(normalizedValue){storage.setItem(storageKey,normalizedValue);return}storage.removeItem(storageKey)}catch{}}function readStorageKey(storageKey=``){return String(typeof storageKey===`function`?storageKey():unref(storageKey)||``).trim()}function readPreferredId(preferredId=``){return String(typeof preferredId===`function`?preferredId():unref(preferredId)||``).trim()}function useStoredSelection({preferredId=``,storageKey=``,enabled=true}={}){const selectionEnabled=computed(()=>Boolean(typeof enabled===`function`?enabled():unref(enabled)));const activeStorageKey=computed(()=>readStorageKey(storageKey));const activePreferredId=computed(()=>readPreferredId(preferredId));const selectedId=ref(selectionEnabled.value?activePreferredId.value||readStoredValue(activeStorageKey.value):``);function select(id=``){if(!selectionEnabled.value)return;selectedId.value=String(id||``).trim();writeStoredValue(activeStorageKey.value,selectedId.value)}function clear(){select(``)}function selectAvailableId(items=[],{fallbackId=``,getId=item=>item?.id}={}){if(!selectionEnabled.value)return``;if(items.length===0){clear();return``}const itemIds=items.map(item=>String(getId(item)||``).trim()).filter(Boolean);if(itemIds.includes(selectedId.value)){select(selectedId.value);return selectedId.value}const preferredSelectionId=activePreferredId.value;if(itemIds.includes(preferredSelectionId)){select(preferredSelectionId);return selectedId.value}const rememberedId=readStoredValue(activeStorageKey.value);select(itemIds.includes(rememberedId)?rememberedId:String(fallbackId||``).trim());return selectedId.value}function capture(){const key=activeStorageKey.value;const admitted=selectionEnabled.value;return Object.freeze({select(id=``){if(!admitted)return;const value=String(id||``).trim();writeStoredValue(key,value);if(selectionEnabled.value&&activeStorageKey.value===key)selectedId.value=value}})}watch(selectionEnabled,nextEnabled=>{selectedId.value=nextEnabled?activePreferredId.value||readStoredValue(activeStorageKey.value):``},{flush:`sync`});watch(activeStorageKey,nextStorageKey=>{if(selectionEnabled.value)selectedId.value=activePreferredId.value||readStoredValue(nextStorageKey)});watch(activePreferredId,nextPreferredId=>{if(selectionEnabled.value&&nextPreferredId)selectedId.value=nextPreferredId});return{capture,clear,select,selectAvailableId,selectedId}}function selectedSessionIdFromRoute(route={}){const rawValue=route?.query?.session;const value=Array.isArray(rawValue)?rawValue[0]:rawValue;return String(value||``).trim()}function useVibe64SessionSelection({projectSlug=useVibe64ProjectSlug(),route=useRoute()}={}){return useStoredSelection({preferredId:computed(()=>selectedSessionIdFromRoute(route)),storageKey:computed(()=>selectedSessionStorageKey(unref(projectSlug)))})}export{useVibe64SessionSelection as n,selectedSessionIdFromRoute as t};
@@ -1 +1 @@
1
- import{d as VProgressLinear,h as VIcon}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,Zn as normalizeClass,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,tt as nextTick,v as createBlock,vn as ref,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{t as VSelect}from"./VSelect-DL3HaA5m.js";import{t as VTextField}from"./VTextField-BR2eZeFT.js";import{r as scopedDevelopmentApiUrl}from"./studioUrls-DmMMIScP.js";import{U as mdiClose,Xt as mdiKeyOutline,q as mdiCodeBraces,rr as mdiSourcePull,st as mdiCreationOutline}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{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{_ as ModelRoutingForm_default,v as useModelRouting}from"./client-BWV84wi2.js";import{n as VRadio,t as VRadioGroup}from"./VRadioGroup-CUu2-KIP.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-CttxM1tw.js";import{t as VSwitch}from"./VSwitch-BRHeDJkH.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{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{x as requestVibe64AccountConnectionsDialog,y as readRefOrGetterValue}from"./index-GBRpNZLy.js";import{a as vibe64SessionPullRequest,i as vibe64SessionDisplayTitle}from"./vibe64SessionViewModel-DR4tOlGM.js";import{n as githubProjectRepositoryName}from"./vibe64GithubProject-CdFrbVHp.js";var _hoisted_1$2={class:`d-flex align-center justify-space-between ga-2 pa-5 pb-2`};var _hoisted_2$2={class:`d-flex align-center ga-3`};var _hoisted_3$2={class:`text-label-large`};var _hoisted_4$1={class:`text-body-medium mt-1`};var _hoisted_5$1={key:0,role:`status`};var _sfc_main$2={__name:`Vibe64CreatePullRequestDialog`,props:{modelValue:Boolean,dashboardContext:{type:Object,default:()=>({})}},emits:[`update:modelValue`,`created`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const title=ref(``);const body=ref(``);const draft=ref(true);const pending=ref(false);const destinationReview=ref(null);const feedback=useUiFeedback({source:`vibe64.pullRequests.create`});const session=computed(()=>props.dashboardContext.session||{});const source=computed(()=>vibe64SessionPullRequest(session.value));const repository=computed(()=>githubProjectRepositoryName(props.dashboardContext.projectContext));const branch=computed(()=>{if(source.value?.headBranch)return source.value.headBranch;const destination=props.dashboardContext.workState?.destination;if(destination?.mode===`github`&&destination.branch!==props.dashboardContext.projectContext?.repository?.defaultBranch)return destination.branch;return`vibe64/pr-${props.dashboardContext.sessionId}`});const base=computed(()=>source.value?.baseBranch||props.dashboardContext.projectContext?.repository?.defaultBranch||``);const path=computed(()=>`${readRefOrGetterValue(props.dashboardContext.sessionsApiPath)}/${props.dashboardContext.sessionId}/pull-request`);const resource=useEndpointResource({path,queryKey:computed(()=>[`vibe64.createPullRequest`,path.value]),enabled:false});watch(()=>props.modelValue,open=>{if(open)destinationReview.value=props.dashboardContext.workState?.destination?{...props.dashboardContext.workState.destination}:null},{immediate:true});watch(()=>props.dashboardContext.sessionId,()=>{title.value=source.value?.title||vibe64SessionDisplayTitle(session.value);body.value=source.value?.body||``;draft.value=true},{immediate:true});async function submit(){if(pending.value||!title.value.trim())return;pending.value=true;try{const result=await resource.save({title:title.value.trim(),body:body.value,draft:draft.value,destinationReview:destinationReview.value},{method:`POST`});feedback.success(`Pull request created. Future commits update its source branch.`);emit(`created`,result.pullRequest);emit(`update:modelValue`,false);props.dashboardContext.refreshSessionWork?.()}catch(error){feedback.error(error,`The pull request could not be confirmed. Retry to check GitHub and continue publishing.`)}finally{pending.value=false}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`38rem`,scrollable:``,persistent:pending.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{rounded:`xl`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$2,[createBaseVNode(`div`,_hoisted_2$2,[createVNode(VIcon,{icon:unref(mdiSourcePull),color:`primary`},null,8,[`icon`]),_cache[6]||(_cache[6]=createBaseVNode(`h2`,{class:`text-title-large`},`Create pull request`,-1))]),createVNode(VBtn,{icon:unref(mdiClose),size:`48`,variant:`text`,"aria-label":`Close pull request dialog`,disabled:pending.value,onClick:_cache[0]||(_cache[0]=$event=>emit(`update:modelValue`,false))},null,8,[`icon`,`disabled`])]),createVNode(VCardText,{class:`d-flex flex-column ga-3`},{default:withCtx(()=>[createVNode(VSheet,{color:`surface-light`,rounded:`lg`,class:`pa-3 pr-destination`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$2,toDisplayString(repository.value),1),createBaseVNode(`div`,_hoisted_4$1,toDisplayString(branch.value)+` → `+toDisplayString(base.value),1),_cache[7]||(_cache[7]=createBaseVNode(`p`,{class:`text-body-small text-medium-emphasis mt-2 mb-0`},`The base branch stays unchanged.`,-1))]),_:1}),_cache[8]||(_cache[8]=createBaseVNode(`p`,{class:`text-body-small ma-0`},`Save open file edits first.`,-1)),!destinationReview.value?(openBlock(),createElementBlock(`p`,_hoisted_5$1,`Refresh repository status before creating a pull request.`)):createCommentVNode(``,true),createVNode(VTextField,{modelValue:title.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>title.value=$event),label:`Title`,variant:`outlined`,maxlength:`256`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),createVNode(VTextarea,{modelValue:body.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>body.value=$event),label:`Description`,placeholder:`What changed, and how did you check it?`,variant:`outlined`,rows:`3`,"auto-grow":``,maxlength:`65536`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),createVNode(VSwitch,{modelValue:draft.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>draft.value=$event),color:`primary`,label:`Create as draft`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),_cache[9]||(_cache[9]=createBaseVNode(`details`,{class:`pr-details text-body-small`},[createBaseVNode(`summary`,{class:`py-3`},`What gets published`),createBaseVNode(`p`,null,`All saved file changes are committed and pushed to the PR branch. Database data and chat history are separate. GitHub automation may run; this does not deploy the app.`)],-1))]),_:1}),createVNode(VCardActions,{class:`pa-5 pt-2`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{variant:`text`,height:`48`,disabled:pending.value,onClick:_cache[4]||(_cache[4]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[10]||(_cache[10]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{color:`primary`,variant:`flat`,rounded:`pill`,height:`48`,disabled:pending.value||!title.value.trim()||!destinationReview.value||__props.dashboardContext.sourceOperationsSuspended,"aria-busy":pending.value,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(pending.value?`Publishing…`:draft.value?`Create draft PR`:`Create pull request`),1)]),_:1},8,[`disabled`,`aria-busy`])]),_:1})]),_:1})]),_:1},8,[`model-value`,`persistent`])}}};var Vibe64CreatePullRequestDialog_default=_plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-55df627e`]]);var _hoisted_1$1={"aria-label":`Choose an AI workflow`};var _hoisted_2$1={key:0,"aria-label":`Loading AI workflows`,class:`vibe64-assistant-dialog__choices`};var _hoisted_3$1={class:`vibe64-assistant-dialog__error`};var _hoisted_4={key:2,class:`vibe64-assistant-dialog__empty`};var _hoisted_5=[`for`];var _hoisted_6={class:`vibe64-assistant-dialog__choice-icon`};var _hoisted_7={class:`vibe64-assistant-dialog__choice-copy`};var _hoisted_8={class:`vibe64-assistant-dialog__choice-heading`};var _hoisted_9={key:0};var _hoisted_10={key:1,class:`text-error`};var _hoisted_11={key:4,class:`text-body-small mt-3 mb-0`};var _hoisted_12={key:6,class:`text-body-small mt-3 mb-0`};var _sfc_main$1={__name:`Vibe64WorkflowSelector`,props:{active:Boolean,disabled:Boolean,initialEngineId:{type:String,default:``}},emits:[`update:workflow`,`update:ready`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const selectedChoiceId=ref(``);const routingOpen=ref(false);const routingSaving=ref(false);const{resource,loadError,scopeKey}=useModelRouting({enabled:computed(()=>props.active),workflowsOnly:true});const loading=computed(()=>Boolean(resource.isInitialLoading.value));const canConfigure=computed(()=>resource.data.value?.canConfigure===true);const choices=computed(()=>(resource.data.value?.workflows||[]).filter(choice=>choice.connected||choice.available));const selectedChoice=computed(()=>choices.value.find(choice=>choice.engineId===selectedChoiceId.value)||null);function defaultChoiceId(available=choices.value){return available.find(choice=>choice.engineId===props.initialEngineId&&choice.available)?.engineId||available.find(choice=>choice.available)?.engineId||``}function openConnectionSettings(){requestVibe64AccountConnectionsDialog({section:`ai`})}watch(choices,available=>{if(!available.some(choice=>choice.engineId===selectedChoiceId.value&&choice.available)||!props.active)selectedChoiceId.value=defaultChoiceId(available)},{immediate:true});watch(scopeKey,()=>{selectedChoiceId.value=``;routingOpen.value=false},{flush:`sync`});watch(()=>props.active,open=>{if(!open)routingOpen.value=false});watch([selectedChoice,()=>props.active,()=>props.disabled],([choice,active,busy])=>{emit(`update:workflow`,active&&choice?.available?choice.engineId:``);emit(`update:ready`,Boolean(active&&choice?.available&&!busy))},{immediate:true});return(_ctx,_cache)=>{return openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`section`,_hoisted_1$1,[loading.value?(openBlock(),createElementBlock(`div`,_hoisted_2$1,[(openBlock(),createElementBlock(Fragment,null,renderList(3,index=>{return createBaseVNode(`div`,{key:index,class:`vibe64-assistant-dialog__choice-skeleton`},[createVNode(VSkeletonLoader,{type:`avatar`}),createVNode(VSkeletonLoader,{type:`list-item-two-line`})])}),64))])):unref(loadError)&&choices.value.length===0?(openBlock(),createBlock(VAlert,{key:1,color:`error`,role:`alert`,variant:`tonal`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$1,[createBaseVNode(`span`,null,toDisplayString(unref(loadError)),1),createVNode(VBtn,{size:`small`,variant:`tonal`,onClick:_cache[0]||(_cache[0]=$event=>unref(resource).reload())},{default:withCtx(()=>[..._cache[7]||(_cache[7]=[createTextVNode(` Try again `,-1)])]),_:1})])]),_:1})):choices.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_4,[createVNode(VIcon,{icon:unref(mdiKeyOutline),color:`primary`,size:`32`},null,8,[`icon`]),_cache[9]||(_cache[9]=createBaseVNode(`strong`,null,`No AI is connected`,-1)),_cache[10]||(_cache[10]=createBaseVNode(`span`,null,`Connect an AI account, then come back to start a session.`,-1)),createVNode(VBtn,{color:`primary`,variant:`tonal`,onClick:openConnectionSettings},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(` Manage AI accounts `,-1)])]),_:1})])):(openBlock(),createBlock(VRadioGroup,{key:3,modelValue:selectedChoiceId.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>selectedChoiceId.value=$event),"aria-label":`AI workflow`,class:`vibe64-assistant-dialog__choices`,"hide-details":``},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(choices.value,choice=>{return openBlock(),createElementBlock(`label`,{key:choice.engineId,class:normalizeClass([`vibe64-assistant-dialog__choice`,{"vibe64-assistant-dialog__choice--selected":selectedChoiceId.value===choice.engineId,"vibe64-assistant-dialog__choice--unavailable":!choice.available}]),for:`vibe64-assistant-${choice.engineId}`},[createBaseVNode(`span`,_hoisted_6,[createVNode(VIcon,{icon:[`codex`,`claude`].includes(choice.engineId)?unref(mdiCreationOutline):unref(mdiCodeBraces),size:`22`},null,8,[`icon`])]),createBaseVNode(`span`,_hoisted_7,[createBaseVNode(`span`,_hoisted_8,[createBaseVNode(`strong`,null,toDisplayString(choice.label),1)]),createBaseVNode(`small`,null,`Senior · `+toDisplayString(choice.seniorLabel),1),createBaseVNode(`small`,null,`Junior · `+toDisplayString(choice.juniorLabel),1),choice.backupUsed?(openBlock(),createElementBlock(`small`,_hoisted_9,`Shared backup for your access`)):createCommentVNode(``,true),choice.error?(openBlock(),createElementBlock(`small`,_hoisted_10,toDisplayString(choice.error),1)):createCommentVNode(``,true)]),createVNode(VRadio,{id:`vibe64-assistant-${choice.engineId}`,"aria-label":choice.label,disabled:!choice.available||__props.disabled,color:`primary`,value:choice.engineId},null,8,[`id`,`aria-label`,`disabled`,`value`])],10,_hoisted_5)}),128))]),_:1},8,[`modelValue`])),choices.value.length?(openBlock(),createElementBlock(`p`,_hoisted_11,`Auto review starts off. Enable it after choosing Auto in chat.`)):createCommentVNode(``,true),canConfigure.value&&choices.value.length?(openBlock(),createBlock(VBtn,{key:5,class:`mt-2`,variant:`text`,onClick:_cache[2]||(_cache[2]=$event=>routingOpen.value=true)},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(` Configure model routing `,-1)])]),_:1})):choices.value.length&&!selectedChoice.value?.available?(openBlock(),createElementBlock(`p`,_hoisted_12,` Ask the workspace owner to configure an available workflow. `)):createCommentVNode(``,true)]),canConfigure.value?(openBlock(),createBlock(VDialog,{key:0,modelValue:routingOpen.value,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>routingOpen.value=$event),"max-width":`760`,persistent:routingSaving.value},{default:withCtx(()=>[createVNode(VCard,{rounded:`lg`},{default:withCtx(()=>[routingOpen.value?(openBlock(),createBlock(unref(ModelRoutingForm_default),{key:0,"engine-id":selectedChoiceId.value,onBusy:_cache[3]||(_cache[3]=$event=>routingSaving.value=$event),onClose:_cache[4]||(_cache[4]=$event=>routingOpen.value=false),onSaved:_cache[5]||(_cache[5]=$event=>{routingSaving.value=false;routingOpen.value=false})},null,8,[`engine-id`])):createCommentVNode(``,true)]),_:1})]),_:1},8,[`modelValue`,`persistent`])):createCommentVNode(``,true)],64)}}};var Vibe64WorkflowSelector_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-8ba5f76c`]]);var _hoisted_1={key:0,class:`d-flex flex-column ga-3 mt-3`};var _hoisted_2={key:0,class:`text-body-small`,style:{"overflow-wrap":`anywhere`}};var _hoisted_3={key:0,class:`vibe64-assistant-dialog__progress`,role:`status`,"aria-live":`polite`};var _sfc_main={__name:`Vibe64AssistantSessionDialog`,props:{modelValue:Boolean,toolbar:{type:Object,default:()=>({})}},emits:[`created`,`update:model-value`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const workflowEngineId=ref(``);const workflowReady=ref(false);const submitButton=ref(null);const submitting=computed(()=>props.toolbar.createSessionRunning===true);const branchMode=ref(`project`);const chooseBranch=computed(()=>branchMode.value!==`project`);const createBranch=computed(()=>branchMode.value===`new`);const branchName=ref(``);const newBranchName=ref(``);const branchProject=computed(()=>props.toolbar.projectContext||{});const branchSelectionAvailable=computed(()=>!props.toolbar.repositoryBranchSelectionDisabled&&[`github`,`managed_git`].includes(branchProject.value.repositoryMode||branchProject.value.repository?.mode));const branchChoices=computed(()=>[{title:`Project branch (${branchProject.value.repository?.defaultBranch||`main`})`,value:`project`},{title:`Create a new branch`,value:`new`},{title:`Use an existing branch`,value:`existing`}]);const branchRepository=computed(()=>branchProject.value.githubRepository?.fullName||branchProject.value.repository?.github?.fullName||branchProject.value.slug);const branchPath=computed(()=>scopedDevelopmentApiUrl(`/api/vibe64/repository/branches`,branchProject.value.slug));const branches=useEndpointResource({path:branchPath,queryKey:computed(()=>[`vibe64.branches`,branchPath.value]),enabled:computed(()=>props.modelValue&&branchSelectionAvailable.value&&chooseBranch.value),queryOptions:{retry:false},fallbackLoadError:`Repository branches could not load.`});const selectedBranch=computed(()=>branches.data.value?.branches?.find(item=>item.name===branchName.value));const branchAlreadyExists=computed(()=>branches.data.value?.branches?.some(item=>item.name===newBranchName.value.trim()));const branchSelectionReady=computed(()=>{if(!chooseBranch.value)return true;if(!selectedBranch.value||branches.isLoading.value||branches.loadError.value)return false;return!createBranch.value||Boolean(newBranchName.value.trim())&&!branchAlreadyExists.value});watch(()=>branches.data.value,value=>{if(!value?.branches?.some(item=>item.name===branchName.value))branchName.value=value?.defaultBranch||``},{immediate:true});function close(){if(!submitting.value)emit(`update:model-value`,false)}async function submit(){if(!workflowReady.value||!workflowEngineId.value||submitting.value||!branchSelectionReady.value)return;let response;try{const options={workflowEngineId:workflowEngineId.value};if(chooseBranch.value)options.repositoryBranch={name:createBranch.value?newBranchName.value.trim():branchName.value,...createBranch.value?{fromBranch:branchName.value}:{},expectedCommit:selectedBranch.value.commit};response=await props.toolbar.createSession?.({},options)}catch{return}if(response?.ok!==false&&response?.sessionId){emit(`created`,response);emit(`update:model-value`,false)}}watch(()=>props.modelValue,open=>{if(!open)return;branchMode.value=`project`;branchName.value=branches.data.value?.defaultBranch||``;newBranchName.value=``},{immediate:true});watch(submitting,async(running,wasRunning)=>{if(running||!wasRunning||!props.modelValue)return;await nextTick();const target=submitButton.value?.$el||submitButton.value;if(target?.isConnected===true&&typeof target.focus===`function`)target.focus({preventScroll:true})});return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,persistent:submitting.value,"max-width":`38rem`,scrollable:``,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>!$event&&close())},{default:withCtx(()=>[createVNode(VCard,{class:`vibe64-assistant-dialog`,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`vibe64-assistant-dialog__title`},{default:withCtx(()=>[_cache[7]||(_cache[7]=createBaseVNode(`span`,{class:`vibe64-assistant-dialog__title-copy`},[createBaseVNode(`strong`,{class:`text-title-large`},`Start an AI session`),createBaseVNode(`small`,{class:`text-body-small`},`Start with Senior. Choose Junior or Auto from chat.`)],-1)),createVNode(VBtn,{"aria-label":`Close AI session dialog`,disabled:submitting.value,icon:unref(mdiClose),title:`Close`,variant:`text`,onClick:close},null,8,[`disabled`,`icon`])]),_:1}),createVNode(VCardText,{class:`vibe64-assistant-dialog__body`},{default:withCtx(()=>[createVNode(Vibe64WorkflowSelector_default,{active:__props.modelValue,disabled:submitting.value,"onUpdate:workflow":_cache[0]||(_cache[0]=$event=>workflowEngineId.value=$event),"onUpdate:ready":_cache[1]||(_cache[1]=$event=>workflowReady.value=$event)},null,8,[`active`,`disabled`]),branchSelectionAvailable.value?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(VSelect,{modelValue:branchMode.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>branchMode.value=$event),items:branchChoices.value,label:`Work on`,disabled:submitting.value,"hide-details":``,class:`mt-4`},null,8,[`modelValue`,`items`,`disabled`]),chooseBranch.value?(openBlock(),createElementBlock(`div`,_hoisted_1,[createBranch.value?(openBlock(),createBlock(VTextField,{key:0,modelValue:newBranchName.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>newBranchName.value=$event),label:`New branch name`,placeholder:`e.g. improve-booking`,maxlength:`255`,disabled:submitting.value,"error-messages":newBranchName.value.trim()&&branchAlreadyExists.value?`That branch already exists. Choose an existing branch instead.`:[],"hide-details":`auto`},null,8,[`modelValue`,`disabled`,`error-messages`])):createCommentVNode(``,true),unref(branches).isLoading.value?(openBlock(),createBlock(VSkeletonLoader,{key:1,type:`list-item-two-line, paragraph`})):unref(branches).loadError.value?(openBlock(),createBlock(VAlert,{key:2,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(branches).loadError.value)+` `,1),createVNode(VBtn,{variant:`text`,onClick:_cache[4]||(_cache[4]=$event=>unref(branches).reload())},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(`Try again`,-1)])]),_:1})]),_:1})):(openBlock(),createElementBlock(Fragment,{key:3},[createVNode(VSelect,{modelValue:branchName.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>branchName.value=$event),items:unref(branches).data.value?.branches||[],"item-title":`name`,"item-value":`name`,label:createBranch.value?`Create from`:`Branch`,disabled:submitting.value,"hide-details":``},null,8,[`modelValue`,`items`,`label`,`disabled`]),selectedBranch.value?(openBlock(),createElementBlock(`p`,_hoisted_2,toDisplayString(createBranch.value?`Creates the branch and opens a new session.`:`Opens a new session on this branch.`)+` Your changes will be saved to `+toDisplayString(branchRepository.value)+`:`+toDisplayString(createBranch.value?newBranchName.value.trim()||`your new branch`:branchName.value)+`. `,1)):createCommentVNode(``,true),_cache[9]||(_cache[9]=createBaseVNode(`p`,{class:`text-body-small`},`App publishing still uses the project branch.`,-1))],64))])):createCommentVNode(``,true)],64)):createCommentVNode(``,true)]),_:1}),submitting.value?(openBlock(),createElementBlock(`div`,_hoisted_3,[createVNode(VProgressLinear,{indeterminate:``,color:`primary`,rounded:``}),_cache[10]||(_cache[10]=createBaseVNode(`p`,{class:`text-body-small mb-0`},` Copying the project source for the new session. This can take a little while for a large project. Any connected projects and workspace setup then continue in the session, which shows their progress. `,-1))])):createCommentVNode(``,true),createVNode(VCardActions,{class:`vibe64-assistant-dialog__actions`},{default:withCtx(()=>[createVNode(VBtn,{disabled:submitting.value,variant:`text`,onClick:close},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{ref_key:`submitButton`,ref:submitButton,"aria-busy":submitting.value?`true`:void 0,color:`primary`,disabled:!workflowReady.value||submitting.value||!branchSelectionReady.value,variant:`flat`,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(submitting.value?`Creating session…`:chooseBranch.value&&createBranch.value?`Create branch & session`:`Create session`),1)]),_:1},8,[`aria-busy`,`disabled`])]),_:1})]),_:1})]),_:1},8,[`model-value`,`persistent`])}}};var Vibe64AssistantSessionDialog_default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-6e0b3fa2`]]);var CREATED_SESSION_FOCUS_TIMEOUT_MS=2e3;async function focusCreatedVibe64SessionTab(sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(!normalizedSessionId||typeof document===`undefined`)return false;const deadline=Date.now()+CREATED_SESSION_FOCUS_TIMEOUT_MS;while(Date.now()<deadline){const dialogVisible=[...document.querySelectorAll(`.vibe64-assistant-dialog`)].some(element=>element.getClientRects().length>0);const target=[...document.querySelectorAll(`[data-vibe64-session-id]`)].find(element=>element.getAttribute(`data-vibe64-session-id`)===normalizedSessionId&&element.getClientRects().length>0);if(!dialogVisible&&target&&typeof target.focus===`function`){target.focus({preventScroll:true});return document.activeElement===target}await new Promise(resolve=>{(globalThis.requestAnimationFrame||(callback=>setTimeout(callback,16)))(resolve)})}return false}export{Vibe64CreatePullRequestDialog_default as i,Vibe64AssistantSessionDialog_default as n,Vibe64WorkflowSelector_default as r,focusCreatedVibe64SessionTab as t};
1
+ import{d as VProgressLinear,h as VIcon}from"./ripple-BVltMmyV.js";import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,Zn as normalizeClass,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,tt as nextTick,v as createBlock,vn as ref,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{t as useEndpointResource}from"./useEndpointResource-DWoQ2keu.js";import{t as VSelect}from"./VSelect-DL3HaA5m.js";import{t as VTextField}from"./VTextField-BR2eZeFT.js";import{r as scopedDevelopmentApiUrl}from"./studioUrls-DmMMIScP.js";import{U as mdiClose,Xt as mdiKeyOutline,q as mdiCodeBraces,rr as mdiSourcePull,st as mdiCreationOutline}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{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{_ as ModelRoutingForm_default,v as useModelRouting}from"./client-BWV84wi2.js";import{n as VRadio,t as VRadioGroup}from"./VRadioGroup-CUu2-KIP.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-CttxM1tw.js";import{t as VSwitch}from"./VSwitch-BRHeDJkH.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{t as useUiFeedback}from"./useUiFeedback-BPBF_0bp.js";import{x as requestVibe64AccountConnectionsDialog,y as readRefOrGetterValue}from"./index-dNxr4Lg9.js";import{a as vibe64SessionPullRequest,i as vibe64SessionDisplayTitle}from"./vibe64SessionViewModel-DR4tOlGM.js";import{n as githubProjectRepositoryName}from"./vibe64GithubProject-CdFrbVHp.js";var _hoisted_1$2={class:`d-flex align-center justify-space-between ga-2 pa-5 pb-2`};var _hoisted_2$2={class:`d-flex align-center ga-3`};var _hoisted_3$2={class:`text-label-large`};var _hoisted_4$1={class:`text-body-medium mt-1`};var _hoisted_5$1={key:0,role:`status`};var _sfc_main$2={__name:`Vibe64CreatePullRequestDialog`,props:{modelValue:Boolean,dashboardContext:{type:Object,default:()=>({})}},emits:[`update:modelValue`,`created`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const title=ref(``);const body=ref(``);const draft=ref(true);const pending=ref(false);const destinationReview=ref(null);const feedback=useUiFeedback({source:`vibe64.pullRequests.create`});const session=computed(()=>props.dashboardContext.session||{});const source=computed(()=>vibe64SessionPullRequest(session.value));const repository=computed(()=>githubProjectRepositoryName(props.dashboardContext.projectContext));const branch=computed(()=>{if(source.value?.headBranch)return source.value.headBranch;const destination=props.dashboardContext.workState?.destination;if(destination?.mode===`github`&&destination.branch!==props.dashboardContext.projectContext?.repository?.defaultBranch)return destination.branch;return`vibe64/pr-${props.dashboardContext.sessionId}`});const base=computed(()=>source.value?.baseBranch||props.dashboardContext.projectContext?.repository?.defaultBranch||``);const path=computed(()=>`${readRefOrGetterValue(props.dashboardContext.sessionsApiPath)}/${props.dashboardContext.sessionId}/pull-request`);const resource=useEndpointResource({path,queryKey:computed(()=>[`vibe64.createPullRequest`,path.value]),enabled:false});watch(()=>props.modelValue,open=>{if(open)destinationReview.value=props.dashboardContext.workState?.destination?{...props.dashboardContext.workState.destination}:null},{immediate:true});watch(()=>props.dashboardContext.sessionId,()=>{title.value=source.value?.title||vibe64SessionDisplayTitle(session.value);body.value=source.value?.body||``;draft.value=true},{immediate:true});async function submit(){if(pending.value||!title.value.trim())return;pending.value=true;try{const result=await resource.save({title:title.value.trim(),body:body.value,draft:draft.value,destinationReview:destinationReview.value},{method:`POST`});feedback.success(`Pull request created. Future commits update its source branch.`);emit(`created`,result.pullRequest);emit(`update:modelValue`,false);props.dashboardContext.refreshSessionWork?.()}catch(error){feedback.error(error,`The pull request could not be confirmed. Retry to check GitHub and continue publishing.`)}finally{pending.value=false}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`38rem`,scrollable:``,persistent:pending.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{rounded:`xl`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$2,[createBaseVNode(`div`,_hoisted_2$2,[createVNode(VIcon,{icon:unref(mdiSourcePull),color:`primary`},null,8,[`icon`]),_cache[6]||(_cache[6]=createBaseVNode(`h2`,{class:`text-title-large`},`Create pull request`,-1))]),createVNode(VBtn,{icon:unref(mdiClose),size:`48`,variant:`text`,"aria-label":`Close pull request dialog`,disabled:pending.value,onClick:_cache[0]||(_cache[0]=$event=>emit(`update:modelValue`,false))},null,8,[`icon`,`disabled`])]),createVNode(VCardText,{class:`d-flex flex-column ga-3`},{default:withCtx(()=>[createVNode(VSheet,{color:`surface-light`,rounded:`lg`,class:`pa-3 pr-destination`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$2,toDisplayString(repository.value),1),createBaseVNode(`div`,_hoisted_4$1,toDisplayString(branch.value)+` → `+toDisplayString(base.value),1),_cache[7]||(_cache[7]=createBaseVNode(`p`,{class:`text-body-small text-medium-emphasis mt-2 mb-0`},`The base branch stays unchanged.`,-1))]),_:1}),_cache[8]||(_cache[8]=createBaseVNode(`p`,{class:`text-body-small ma-0`},`Save open file edits first.`,-1)),!destinationReview.value?(openBlock(),createElementBlock(`p`,_hoisted_5$1,`Refresh repository status before creating a pull request.`)):createCommentVNode(``,true),createVNode(VTextField,{modelValue:title.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>title.value=$event),label:`Title`,variant:`outlined`,maxlength:`256`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),createVNode(VTextarea,{modelValue:body.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>body.value=$event),label:`Description`,placeholder:`What changed, and how did you check it?`,variant:`outlined`,rows:`3`,"auto-grow":``,maxlength:`65536`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),createVNode(VSwitch,{modelValue:draft.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>draft.value=$event),color:`primary`,label:`Create as draft`,disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`disabled`]),_cache[9]||(_cache[9]=createBaseVNode(`details`,{class:`pr-details text-body-small`},[createBaseVNode(`summary`,{class:`py-3`},`What gets published`),createBaseVNode(`p`,null,`All saved file changes are committed and pushed to the PR branch. Database data and chat history are separate. GitHub automation may run; this does not deploy the app.`)],-1))]),_:1}),createVNode(VCardActions,{class:`pa-5 pt-2`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{variant:`text`,height:`48`,disabled:pending.value,onClick:_cache[4]||(_cache[4]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[10]||(_cache[10]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{color:`primary`,variant:`flat`,rounded:`pill`,height:`48`,disabled:pending.value||!title.value.trim()||!destinationReview.value||__props.dashboardContext.sourceOperationsSuspended,"aria-busy":pending.value,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(pending.value?`Publishing…`:draft.value?`Create draft PR`:`Create pull request`),1)]),_:1},8,[`disabled`,`aria-busy`])]),_:1})]),_:1})]),_:1},8,[`model-value`,`persistent`])}}};var Vibe64CreatePullRequestDialog_default=_plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-55df627e`]]);var _hoisted_1$1={"aria-label":`Choose an AI workflow`};var _hoisted_2$1={key:0,"aria-label":`Loading AI workflows`,class:`vibe64-assistant-dialog__choices`};var _hoisted_3$1={class:`vibe64-assistant-dialog__error`};var _hoisted_4={key:2,class:`vibe64-assistant-dialog__empty`};var _hoisted_5=[`for`];var _hoisted_6={class:`vibe64-assistant-dialog__choice-icon`};var _hoisted_7={class:`vibe64-assistant-dialog__choice-copy`};var _hoisted_8={class:`vibe64-assistant-dialog__choice-heading`};var _hoisted_9={key:0};var _hoisted_10={key:1,class:`text-error`};var _hoisted_11={key:4,class:`text-body-small mt-3 mb-0`};var _hoisted_12={key:6,class:`text-body-small mt-3 mb-0`};var _sfc_main$1={__name:`Vibe64WorkflowSelector`,props:{active:Boolean,disabled:Boolean,initialEngineId:{type:String,default:``}},emits:[`update:workflow`,`update:ready`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const selectedChoiceId=ref(``);const routingOpen=ref(false);const routingSaving=ref(false);const{resource,loadError,scopeKey}=useModelRouting({enabled:computed(()=>props.active),workflowsOnly:true});const loading=computed(()=>Boolean(resource.isInitialLoading.value));const canConfigure=computed(()=>resource.data.value?.canConfigure===true);const choices=computed(()=>(resource.data.value?.workflows||[]).filter(choice=>choice.connected||choice.available));const selectedChoice=computed(()=>choices.value.find(choice=>choice.engineId===selectedChoiceId.value)||null);function defaultChoiceId(available=choices.value){return available.find(choice=>choice.engineId===props.initialEngineId&&choice.available)?.engineId||available.find(choice=>choice.available)?.engineId||``}function openConnectionSettings(){requestVibe64AccountConnectionsDialog({section:`ai`})}watch(choices,available=>{if(!available.some(choice=>choice.engineId===selectedChoiceId.value&&choice.available)||!props.active)selectedChoiceId.value=defaultChoiceId(available)},{immediate:true});watch(scopeKey,()=>{selectedChoiceId.value=``;routingOpen.value=false},{flush:`sync`});watch(()=>props.active,open=>{if(!open)routingOpen.value=false});watch([selectedChoice,()=>props.active,()=>props.disabled],([choice,active,busy])=>{emit(`update:workflow`,active&&choice?.available?choice.engineId:``);emit(`update:ready`,Boolean(active&&choice?.available&&!busy))},{immediate:true});return(_ctx,_cache)=>{return openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`section`,_hoisted_1$1,[loading.value?(openBlock(),createElementBlock(`div`,_hoisted_2$1,[(openBlock(),createElementBlock(Fragment,null,renderList(3,index=>{return createBaseVNode(`div`,{key:index,class:`vibe64-assistant-dialog__choice-skeleton`},[createVNode(VSkeletonLoader,{type:`avatar`}),createVNode(VSkeletonLoader,{type:`list-item-two-line`})])}),64))])):unref(loadError)&&choices.value.length===0?(openBlock(),createBlock(VAlert,{key:1,color:`error`,role:`alert`,variant:`tonal`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_3$1,[createBaseVNode(`span`,null,toDisplayString(unref(loadError)),1),createVNode(VBtn,{size:`small`,variant:`tonal`,onClick:_cache[0]||(_cache[0]=$event=>unref(resource).reload())},{default:withCtx(()=>[..._cache[7]||(_cache[7]=[createTextVNode(` Try again `,-1)])]),_:1})])]),_:1})):choices.value.length===0?(openBlock(),createElementBlock(`div`,_hoisted_4,[createVNode(VIcon,{icon:unref(mdiKeyOutline),color:`primary`,size:`32`},null,8,[`icon`]),_cache[9]||(_cache[9]=createBaseVNode(`strong`,null,`No AI is connected`,-1)),_cache[10]||(_cache[10]=createBaseVNode(`span`,null,`Connect an AI account, then come back to start a session.`,-1)),createVNode(VBtn,{color:`primary`,variant:`tonal`,onClick:openConnectionSettings},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(` Manage AI accounts `,-1)])]),_:1})])):(openBlock(),createBlock(VRadioGroup,{key:3,modelValue:selectedChoiceId.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>selectedChoiceId.value=$event),"aria-label":`AI workflow`,class:`vibe64-assistant-dialog__choices`,"hide-details":``},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(choices.value,choice=>{return openBlock(),createElementBlock(`label`,{key:choice.engineId,class:normalizeClass([`vibe64-assistant-dialog__choice`,{"vibe64-assistant-dialog__choice--selected":selectedChoiceId.value===choice.engineId,"vibe64-assistant-dialog__choice--unavailable":!choice.available}]),for:`vibe64-assistant-${choice.engineId}`},[createBaseVNode(`span`,_hoisted_6,[createVNode(VIcon,{icon:[`codex`,`claude`].includes(choice.engineId)?unref(mdiCreationOutline):unref(mdiCodeBraces),size:`22`},null,8,[`icon`])]),createBaseVNode(`span`,_hoisted_7,[createBaseVNode(`span`,_hoisted_8,[createBaseVNode(`strong`,null,toDisplayString(choice.label),1)]),createBaseVNode(`small`,null,`Senior · `+toDisplayString(choice.seniorLabel),1),createBaseVNode(`small`,null,`Junior · `+toDisplayString(choice.juniorLabel),1),choice.backupUsed?(openBlock(),createElementBlock(`small`,_hoisted_9,`Shared backup for your access`)):createCommentVNode(``,true),choice.error?(openBlock(),createElementBlock(`small`,_hoisted_10,toDisplayString(choice.error),1)):createCommentVNode(``,true)]),createVNode(VRadio,{id:`vibe64-assistant-${choice.engineId}`,"aria-label":choice.label,disabled:!choice.available||__props.disabled,color:`primary`,value:choice.engineId},null,8,[`id`,`aria-label`,`disabled`,`value`])],10,_hoisted_5)}),128))]),_:1},8,[`modelValue`])),choices.value.length?(openBlock(),createElementBlock(`p`,_hoisted_11,`Auto review starts off. Enable it after choosing Auto in chat.`)):createCommentVNode(``,true),canConfigure.value&&choices.value.length?(openBlock(),createBlock(VBtn,{key:5,class:`mt-2`,variant:`text`,onClick:_cache[2]||(_cache[2]=$event=>routingOpen.value=true)},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(` Configure model routing `,-1)])]),_:1})):choices.value.length&&!selectedChoice.value?.available?(openBlock(),createElementBlock(`p`,_hoisted_12,` Ask the workspace owner to configure an available workflow. `)):createCommentVNode(``,true)]),canConfigure.value?(openBlock(),createBlock(VDialog,{key:0,modelValue:routingOpen.value,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>routingOpen.value=$event),"max-width":`760`,persistent:routingSaving.value},{default:withCtx(()=>[createVNode(VCard,{rounded:`lg`},{default:withCtx(()=>[routingOpen.value?(openBlock(),createBlock(unref(ModelRoutingForm_default),{key:0,"engine-id":selectedChoiceId.value,onBusy:_cache[3]||(_cache[3]=$event=>routingSaving.value=$event),onClose:_cache[4]||(_cache[4]=$event=>routingOpen.value=false),onSaved:_cache[5]||(_cache[5]=$event=>{routingSaving.value=false;routingOpen.value=false})},null,8,[`engine-id`])):createCommentVNode(``,true)]),_:1})]),_:1},8,[`modelValue`,`persistent`])):createCommentVNode(``,true)],64)}}};var Vibe64WorkflowSelector_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-8ba5f76c`]]);var _hoisted_1={key:0,class:`d-flex flex-column ga-3 mt-3`};var _hoisted_2={key:0,class:`text-body-small`,style:{"overflow-wrap":`anywhere`}};var _hoisted_3={key:0,class:`vibe64-assistant-dialog__progress`,role:`status`,"aria-live":`polite`};var _sfc_main={__name:`Vibe64AssistantSessionDialog`,props:{modelValue:Boolean,toolbar:{type:Object,default:()=>({})}},emits:[`created`,`update:model-value`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const workflowEngineId=ref(``);const workflowReady=ref(false);const submitButton=ref(null);const submitting=computed(()=>props.toolbar.createSessionRunning===true);const branchMode=ref(`project`);const chooseBranch=computed(()=>branchMode.value!==`project`);const createBranch=computed(()=>branchMode.value===`new`);const branchName=ref(``);const newBranchName=ref(``);const branchProject=computed(()=>props.toolbar.projectContext||{});const branchSelectionAvailable=computed(()=>!props.toolbar.repositoryBranchSelectionDisabled&&[`github`,`managed_git`].includes(branchProject.value.repositoryMode||branchProject.value.repository?.mode));const branchChoices=computed(()=>[{title:`Project branch (${branchProject.value.repository?.defaultBranch||`main`})`,value:`project`},{title:`Create a new branch`,value:`new`},{title:`Use an existing branch`,value:`existing`}]);const branchRepository=computed(()=>branchProject.value.githubRepository?.fullName||branchProject.value.repository?.github?.fullName||branchProject.value.slug);const branchPath=computed(()=>scopedDevelopmentApiUrl(`/api/vibe64/repository/branches`,branchProject.value.slug));const branches=useEndpointResource({path:branchPath,queryKey:computed(()=>[`vibe64.branches`,branchPath.value]),enabled:computed(()=>props.modelValue&&branchSelectionAvailable.value&&chooseBranch.value),queryOptions:{retry:false},fallbackLoadError:`Repository branches could not load.`});const selectedBranch=computed(()=>branches.data.value?.branches?.find(item=>item.name===branchName.value));const branchAlreadyExists=computed(()=>branches.data.value?.branches?.some(item=>item.name===newBranchName.value.trim()));const branchSelectionReady=computed(()=>{if(!chooseBranch.value)return true;if(!selectedBranch.value||branches.isLoading.value||branches.loadError.value)return false;return!createBranch.value||Boolean(newBranchName.value.trim())&&!branchAlreadyExists.value});watch(()=>branches.data.value,value=>{if(!value?.branches?.some(item=>item.name===branchName.value))branchName.value=value?.defaultBranch||``},{immediate:true});function close(){if(!submitting.value)emit(`update:model-value`,false)}async function submit(){if(!workflowReady.value||!workflowEngineId.value||submitting.value||!branchSelectionReady.value)return;let response;try{const options={workflowEngineId:workflowEngineId.value};if(chooseBranch.value)options.repositoryBranch={name:createBranch.value?newBranchName.value.trim():branchName.value,...createBranch.value?{fromBranch:branchName.value}:{},expectedCommit:selectedBranch.value.commit};response=await props.toolbar.createSession?.({},options)}catch{return}if(response?.ok!==false&&response?.sessionId){emit(`created`,response);emit(`update:model-value`,false)}}watch(()=>props.modelValue,open=>{if(!open)return;branchMode.value=`project`;branchName.value=branches.data.value?.defaultBranch||``;newBranchName.value=``},{immediate:true});watch(submitting,async(running,wasRunning)=>{if(running||!wasRunning||!props.modelValue)return;await nextTick();const target=submitButton.value?.$el||submitButton.value;if(target?.isConnected===true&&typeof target.focus===`function`)target.focus({preventScroll:true})});return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,persistent:submitting.value,"max-width":`38rem`,scrollable:``,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>!$event&&close())},{default:withCtx(()=>[createVNode(VCard,{class:`vibe64-assistant-dialog`,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`vibe64-assistant-dialog__title`},{default:withCtx(()=>[_cache[7]||(_cache[7]=createBaseVNode(`span`,{class:`vibe64-assistant-dialog__title-copy`},[createBaseVNode(`strong`,{class:`text-title-large`},`Start an AI session`),createBaseVNode(`small`,{class:`text-body-small`},`Start with Senior. Choose Junior or Auto from chat.`)],-1)),createVNode(VBtn,{"aria-label":`Close AI session dialog`,disabled:submitting.value,icon:unref(mdiClose),title:`Close`,variant:`text`,onClick:close},null,8,[`disabled`,`icon`])]),_:1}),createVNode(VCardText,{class:`vibe64-assistant-dialog__body`},{default:withCtx(()=>[createVNode(Vibe64WorkflowSelector_default,{active:__props.modelValue,disabled:submitting.value,"onUpdate:workflow":_cache[0]||(_cache[0]=$event=>workflowEngineId.value=$event),"onUpdate:ready":_cache[1]||(_cache[1]=$event=>workflowReady.value=$event)},null,8,[`active`,`disabled`]),branchSelectionAvailable.value?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(VSelect,{modelValue:branchMode.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>branchMode.value=$event),items:branchChoices.value,label:`Work on`,disabled:submitting.value,"hide-details":``,class:`mt-4`},null,8,[`modelValue`,`items`,`disabled`]),chooseBranch.value?(openBlock(),createElementBlock(`div`,_hoisted_1,[createBranch.value?(openBlock(),createBlock(VTextField,{key:0,modelValue:newBranchName.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>newBranchName.value=$event),label:`New branch name`,placeholder:`e.g. improve-booking`,maxlength:`255`,disabled:submitting.value,"error-messages":newBranchName.value.trim()&&branchAlreadyExists.value?`That branch already exists. Choose an existing branch instead.`:[],"hide-details":`auto`},null,8,[`modelValue`,`disabled`,`error-messages`])):createCommentVNode(``,true),unref(branches).isLoading.value?(openBlock(),createBlock(VSkeletonLoader,{key:1,type:`list-item-two-line, paragraph`})):unref(branches).loadError.value?(openBlock(),createBlock(VAlert,{key:2,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(branches).loadError.value)+` `,1),createVNode(VBtn,{variant:`text`,onClick:_cache[4]||(_cache[4]=$event=>unref(branches).reload())},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(`Try again`,-1)])]),_:1})]),_:1})):(openBlock(),createElementBlock(Fragment,{key:3},[createVNode(VSelect,{modelValue:branchName.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>branchName.value=$event),items:unref(branches).data.value?.branches||[],"item-title":`name`,"item-value":`name`,label:createBranch.value?`Create from`:`Branch`,disabled:submitting.value,"hide-details":``},null,8,[`modelValue`,`items`,`label`,`disabled`]),selectedBranch.value?(openBlock(),createElementBlock(`p`,_hoisted_2,toDisplayString(createBranch.value?`Creates the branch and opens a new session.`:`Opens a new session on this branch.`)+` Your changes will be saved to `+toDisplayString(branchRepository.value)+`:`+toDisplayString(createBranch.value?newBranchName.value.trim()||`your new branch`:branchName.value)+`. `,1)):createCommentVNode(``,true),_cache[9]||(_cache[9]=createBaseVNode(`p`,{class:`text-body-small`},`App publishing still uses the project branch.`,-1))],64))])):createCommentVNode(``,true)],64)):createCommentVNode(``,true)]),_:1}),submitting.value?(openBlock(),createElementBlock(`div`,_hoisted_3,[createVNode(VProgressLinear,{indeterminate:``,color:`primary`,rounded:``}),_cache[10]||(_cache[10]=createBaseVNode(`p`,{class:`text-body-small mb-0`},` Copying the project source for the new session. This can take a little while for a large project. Any connected projects and workspace setup then continue in the session, which shows their progress. `,-1))])):createCommentVNode(``,true),createVNode(VCardActions,{class:`vibe64-assistant-dialog__actions`},{default:withCtx(()=>[createVNode(VBtn,{disabled:submitting.value,variant:`text`,onClick:close},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{ref_key:`submitButton`,ref:submitButton,"aria-busy":submitting.value?`true`:void 0,color:`primary`,disabled:!workflowReady.value||submitting.value||!branchSelectionReady.value,variant:`flat`,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(submitting.value?`Creating session…`:chooseBranch.value&&createBranch.value?`Create branch & session`:`Create session`),1)]),_:1},8,[`aria-busy`,`disabled`])]),_:1})]),_:1})]),_:1},8,[`model-value`,`persistent`])}}};var Vibe64AssistantSessionDialog_default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-6e0b3fa2`]]);var CREATED_SESSION_FOCUS_TIMEOUT_MS=2e3;async function focusCreatedVibe64SessionTab(sessionId=``){const normalizedSessionId=String(sessionId||``).trim();if(!normalizedSessionId||typeof document===`undefined`)return false;const deadline=Date.now()+CREATED_SESSION_FOCUS_TIMEOUT_MS;while(Date.now()<deadline){const dialogVisible=[...document.querySelectorAll(`.vibe64-assistant-dialog`)].some(element=>element.getClientRects().length>0);const target=[...document.querySelectorAll(`[data-vibe64-session-id]`)].find(element=>element.getAttribute(`data-vibe64-session-id`)===normalizedSessionId&&element.getClientRects().length>0);if(!dialogVisible&&target&&typeof target.focus===`function`){target.focus({preventScroll:true});return document.activeElement===target}await new Promise(resolve=>{(globalThis.requestAnimationFrame||(callback=>setTimeout(callback,16)))(resolve)})}return false}export{Vibe64CreatePullRequestDialog_default as i,Vibe64AssistantSessionDialog_default as n,Vibe64WorkflowSelector_default as r,focusCreatedVibe64SessionTab as t};
package/dist/index.html CHANGED
@@ -21,7 +21,7 @@
21
21
  }, true);
22
22
  </script>
23
23
  <style>#startup-shell{color:#25232a;background:#faf9fc;grid-template-rows:56px 1fr;font:15px system-ui,sans-serif;display:grid;position:fixed;inset:0}#startup-shell header{border-bottom:1px solid #dedce3;align-items:center;padding:0 24px;font-weight:600;display:flex}#startup-shell main{grid-template-columns:240px 1fr;min-height:0;display:grid}#startup-shell aside{border-right:1px solid #dedce3;padding:24px}#startup-shell .startup-placeholder{background:#e5e2eb;border-radius:4px;height:16px;margin-bottom:20px}#startup-shell section{padding:32px}#startup-shell a{min-height:48px;color:inherit;align-items:center;display:inline-flex}@media (width<=600px){#startup-shell main{grid-template-columns:1fr}#startup-shell aside{display:none}}@media (prefers-color-scheme:dark){#startup-shell{color:#eeeaf3;background:#19181d}#startup-shell header,#startup-shell aside{border-color:#3c3942}#startup-shell .startup-placeholder{background:#35323d}}</style>
24
- <script type="module" crossorigin src="/assets/index-GBRpNZLy.js"></script>
24
+ <script type="module" crossorigin src="/assets/index-dNxr4Lg9.js"></script>
25
25
  <link rel="modulepreload" crossorigin href="/assets/runtime-core.esm-bundler-DGXg_mpN.js">
26
26
  <link rel="modulepreload" crossorigin href="/assets/ripple-BVltMmyV.js">
27
27
  <link rel="modulepreload" crossorigin href="/assets/normalize-CO2KHj_d.js">
@@ -68,8 +68,7 @@ Colleague, your teacher. The **Lesson** pane is the one place a lesson is read:
68
68
  the step list, the current step with its text, diagram, question or check,
69
69
  **Show me** and **Teach me** (see [Reading a lesson](#reading-a-lesson)), and
70
70
  the lesson's **Lesson finished** screen. Starting, continuing or resuming a
71
- lesson from Courses, the step bar's **Open**, and Colleague's **Step N/M**
72
- button all open it here, at the step you were reading.
71
+ lesson from Courses and Colleague's **Step N/M** button both open it here, at the step you were reading.
73
72
 
74
73
  - **On the lesson's practice project** the project switches read **Preview**,
75
74
  **Dashboard** and **Lesson**. Select **Lesson** to read the lesson; Preview
@@ -1,7 +1,7 @@
1
1
  # The lesson step bar
2
2
 
3
3
  The yellow lesson step bar above the project page plays the current lesson
4
- step: its position, beats, **Step**, **Open** and **Courses**. The rest of
4
+ step: its position, beats, **Step** and **Courses**. The rest of
5
5
  Learn mode is in [The Learning environment](learning-environment.md).
6
6
 
7
7
  In Learn mode, while your lesson is loaded, a yellow bar above the project page
@@ -13,15 +13,12 @@ place, with everything the Lesson tab offers for it: its text, diagram and
13
13
  **Teach me** and **Previous step**/**Next step**. It covers the top of the page
14
14
  (at most about two thirds of the screen, scrolling inside); **Step** again or
15
15
  Escape closes it, and **Show me** closes it so the place it shows is in view.
16
- This tab remembers whether it is open. **Open** shows the step in the page's
17
- **Lesson** tab (see [The Lesson tab](learning-environment.md#the-lesson-tab)); **Open** is hidden while the Lesson tab is showing. **Courses**, at its right end (a book icon
18
- on a phone), opens the Courses overlay to choose another lesson; it stays
19
- there when the bar is collapsed. The chevron at its left collapses it to one
20
- line (**Hide the lesson step**) and expands it again (**Show the lesson step**);
21
- this tab remembers the choice. On a phone the lesson name is hidden, and
22
- **Open** shows the project side of the page (instead of the chat) on the Lesson
23
- tab, also when the page is already on the Lesson tab, for example after
24
- pressing **L** twice or **Show chat**.
16
+ This tab remembers whether it is open. To read the step in the page's
17
+ **Lesson** tab, select that tab (see [The Lesson tab](learning-environment.md#the-lesson-tab));
18
+ the bar has no separate Open button. **Courses**, at its right end (a book icon
19
+ on a phone), opens the Courses overlay to choose another lesson. The bar is
20
+ always shown in full; it cannot be collapsed or hidden. On a phone the lesson
21
+ name is hidden.
25
22
 
26
23
  ### Steps with beats
27
24
 
@@ -34,7 +31,7 @@ current one), then the beat's line:
34
31
  coding chat) and moves on by itself after a few seconds; a thin line under
35
32
  the bar shows the time left. **Pause** (and **Play**) stops and resumes it;
36
33
  it also waits while your pointer or keyboard focus is on the bar, while
37
- Courses is open, while the bar is collapsed or the tab is hidden. With
34
+ Courses is open or while the tab is hidden. With
38
35
  reduced motion turned on in your system it never moves by itself: press
39
36
  **Next**.
40
37
  - A *do* line waits for you to do what it says, in this lesson's practice
@@ -44,7 +41,11 @@ current one), then the beat's line:
44
41
  preview**, or press **L** (it counts once you are back in Learn). When the
45
42
  page sees you do it, the line says **✓ Done.** (or **✓ You're already here.**
46
43
  when you already are) and the next beat plays after a moment. **Next** skips
47
- it. Only what you do after the line appears counts.
44
+ it. What you did earlier in this step counts too, in order: a message sent
45
+ while an earlier line played completes the send line, and an agent that
46
+ finished before its line appeared completes the wait line (what happened
47
+ before the step's previous *do* line was done does not count). Going **Back** onto a line you have
48
+ done leaves it waiting.
48
49
  - **Do it for me** on a *do* line does it through the page's own controls:
49
50
  it opens the place (or the file), reveals and focuses the coding chat, opens
50
51
  Courses or Colleague (without asking it anything), reloads the Preview, or
@@ -91,9 +92,7 @@ why, nothing is recorded, and you can press **Check again**. Colleague never
91
92
  runs a review or passes a step for you.
92
93
 
93
94
  This tab remembers the beat and the pause; another tab or device starts the
94
- step at its first beat. Collapsing the bar leaves only the step position and
95
- its dots. On a phone the bar has two lines: the position and arrows above,
95
+ step at its first beat. On a phone the bar has two lines: the position and arrows above,
96
96
  the beat's line and its one button below; **Step** and **Courses** show only
97
- their icons, **Open** is left out (**Step** shows the whole step, and the
98
- **Lesson** tab is one tap away), and the open step fills the width. A step without beats shows its title
97
+ their icons, and the open step fills the width. A step without beats shows its title
99
98
  and status as before, and **Show me** when it can point at a place.
@@ -11,8 +11,13 @@ use the developer's installed tools through its ordinary PATH and does not
11
11
  require a hosted Nix installation. Kotlin includes the Java toolchain on managed
12
12
  hosts; Rust includes the native linker tools. Projects needing native
13
13
  extensions or Go C integration also declare their required build toolchain.
14
- JSKIT, Vue and Laravel use the tools specified by their project commands rather
15
- than a separate framework runtime.
14
+ JSKIT, Vue, Laravel, Django, Rails, Spring Boot, Express and Next.js use the
15
+ tools specified by their project commands rather than a separate framework
16
+ runtime: Django uses `python`, Rails uses `ruby` with `cpp` for native gems (and
17
+ `nodejs` when the app has a `package.json`), Spring Boot uses `java` through the
18
+ project's Maven wrapper, and Express and Next.js use `nodejs`. New-project
19
+ onboarding does not offer PostgreSQL variants yet (for example
20
+ `django-postgresql`); it offers the MySQL or SQLite variant instead.
16
21
 
17
22
  If **Preparing workspace** fails, expand its output, correct the reported cause
18
23
  and choose **Retry**. If Preview cannot start, use **Show run output**. On mobile,
@@ -160,7 +160,8 @@ One beat per line: `<show|do|check> <target>[ <path>]: <text>`.
160
160
  most 500 characters). Only `file-opened` takes an argument, a relative
161
161
  practice project path without `..`. A do beat completes when the page shows
162
162
  its place, or when its activity happens in the lesson's practice project
163
- after the beat began (`send-message`: a message accepted in the chat;
163
+ during its step, after the step's previous do beat was done; activity from
164
+ earlier in the step counts when the beat begins (`send-message`: a message accepted in the chat;
164
165
  `agent-finished`: the agent's turn ends; `file-opened`: that file opens in
165
166
  Files; `app-pressed`: the practice App's button; `colleague`, `save`,
166
167
  `reload-preview`: Colleague opens, a Save succeeds, the Preview reloads;
@@ -463,52 +463,53 @@ inspectDerivedArtifacts:is,inspectEngineering:os,inspectEnvironment:Ce,inspectPr
463
463
  inspectSkills:ps,inspectStackSection:ls,inspectStackSections:ds,inspectSubsystems:ms,listTemplates:fs,parserEnvironment:hs,
464
464
  setCollaboration:gs,setEngineeringProfile:Es,syncAgentIntegrations:ys,syncSkills:bs,withTrustedGitRepository:ws,SOURCE_EXPLANATION_PROMPT_VERSION:Dr,
465
465
  sourceExplanationGuidance:Vr,sourceExplanationReviewGuidance:xr,validateArchitectureFacts:Pr,validateArchitectureObservations:$r,
466
- mergeArchitectureObservations:Mr}=Ne,jr="genesis/blueprint.md",vs=!1,Ts=Object.freeze(["vue",...vs?[]:["jskit-postgresql",
467
- "postgresql"]]),Ss=Object.freeze(["genesis-stack"]),Is=new Set(["adopt","blueprint","describe","deslop","program","revie\
468
- w","start","work"]);function H(e=""){return String(e||"").trim()}function _t(e,{required:t=!1}={}){let n=H(e);if(!n&&!t)
469
- return"";if(!Is.has(n))throw new TypeError(n?`Unknown Genesis prompt task: ${n}.`:"Genesis prompt actions require an exp\
470
- licit task.");return n}function Os(e={}){return _t(e.genesisTask)||"work"}function _s(e={},t={}){return[e.conversationRequest,
471
- e.feedback,e.request,e.plan,e.description,t.label].map(H).find(Boolean)||"Continue the requested project work."}function Lr(e={}){
472
- return hs(e)}function Rs(){let e=(Ot.resolve.paths("genesis-compiler")||[]).find(t=>It(M.join(t,"genesis-compiler"))&&It(
473
- M.join(t,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be located.");return M.
474
- join(e,".bin")}function Rt(){let e=Ot.resolve("@local/vibe64-genesis/server");return M.resolve(M.dirname(e),"../../bin")}
475
- function ks(){return M.resolve(Rt(),"vibe64-genesis-host-context")}function Ur(e=[]){let t=Rt(),n=Rs();return[...(Array.
476
- isArray(e)?e:[]).filter(r=>![t,n].includes(H(r))),t]}function As(e={},{prompt:t=!1}={}){return{...e,...t?{hiddenStackPieces:Ts}:
477
- {},stackPackages:Ss}}function Br(e={}){return S(es,e)}function Gr(e={}){return S(ss,e)}function Wr(e={}){return S(ps,e)}
478
- function Hr(e={}){return S(bs,e)}function qr(e={}){return S(ys,e)}function zr(e={}){return S(us,e)}function Kr(e={}){return S(
479
- ms,e)}async function Fr(e={}){return Ge(await q(Be,e))}async function Yr(e={}){return He(await q(We,e))}function Jr(e={}){
480
- return S(ns,e)}function Ns(){let e=is();if(e?.contract!==_.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
481
- "no contract identity"}; expected ${_.derivedArtifacts}.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||
482
- t.some(n=>!H(n?.path)))throw new Error("Genesis returned an invalid derived-artifact contract.");return{...e,artifacts:t.
483
- map(n=>({...n}))}}var kt=Ns(),Xr=Object.freeze(kt.artifacts.map(e=>e.path)),At=new Map(kt.artifacts.map(e=>[e.id,e])),Cs=At.
484
- get("machine-city")?.path,Ds=At.get("program-city")?.path;if(!Cs||!Ds)throw new Error("Genesis did not declare both City\
485
- projection artifacts.");async function S(e,t={},n={}){let s=H(t.projectRoot);if(!s||!M.isAbsolute(s))throw new TypeError(
486
- "Genesis operations require an explicit absolute projectRoot.");return ws(s,()=>e(As(t,n)))}async function Qr({workdir:e,
487
- promptContext:t}){let n=J(t);return t.scope==="ephemeral"?n:(await S(Ne.projectSessionContext,{projectRoot:e,hostDriver:J,
488
- hostDriverInput:t})).output}async function x(e,t,n={}){let s=await S(e,n);if(s?.contract!==t)throw new Error(`Genesis re\
489
- turned ${s?.contract||"no contract identity"}; expected ${t}.`);return s}function q(e,t={}){return x(n=>ls({...n,name:e}),
490
- _.stackSection,t)}async function De(e,t={}){let n=await S(s=>ds({...s,names:e}),t);if(!Array.isArray(n)||n.length!==e.length||
491
- n.some((s,r)=>s?.contract!==_.stackSection||s.name!==e[r]))throw new Error("Genesis returned an invalid Stack section in\
492
- spection batch.");return n}async function Zr(e={}){if((await Vs(e)).status!=="current")throw Object.assign(new Error("Th\
493
- e project needs a current Genesis format before its Stack can be inspected."),{code:"vibe64_stack_format_required"});await Yn(
494
- M.join(e.projectRoot,"genesis/stack.md"),"utf8");let n=await q(Q,e);return{components:n.components,stackHash:n.stackHash}}
495
- async function ei(e={}){let[t,n]=await Promise.all([q(Qe,e),x(Ce,_.environment,e)]);return et({environment:n,section:t})}
496
- function ti(e={}){return x(Ce,_.environment,e)}function ni(e={}){return x(as,_.projectInspection,e)}function si(e={}){return x(
497
- fs,_.templates,e)}function ri(e={}){return x(ts,_.templateApplication,e)}function ii(e={}){return x(os,_.engineering,e)}
498
- function oi(e={}){return x(rs,_.collaboration,e)}async function Vs(e={}){let t=await S(cs,e);if(!H(t?.status))throw new Error(
499
- "Genesis did not return a project-format status.");return{...t}}function ai(e={}){return x(Es,_.engineering,e)}function ci(e={}){
500
- return x(gs,_.collaboration,e)}async function ui(e={}){let[[t,n,s],r]=await Promise.all([De([ae,ue,Q],e),x(Ce,_.environment,
501
- e)]);return{...lt({environment:r,section:t}),resourceEstimates:pe({section:n,outputsSection:t,workspaceSetupSection:s})}}
502
- async function pi(e={}){let t=await q(vt,e);return St({section:t})}async function li(e={}){return Ue(await q(Le,e))}async function di(e={}){
503
- return ft(await q(dt,e))}async function mi(e={}){let[t,n,s]=await De([Q,ue,ae],e);return{...await Pe({projectRoot:e.projectRoot,
504
- section:t}),resourceEstimates:pe({section:n,outputsSection:s,workspaceSetupSection:t})}}async function fi(e={}){let[t,n,
505
- s]=await De([ue,ae,Q],e);return pe({section:t,outputsSection:n,workspaceSetupSection:s})}async function hi({action:e={},
506
- environment:t=process.env,input:n={},projectRoot:s}={}){let r=Os(e),i=_s(n,e),o=r,c;try{c=await S(Ae,{environment:t,projectRoot:s,
507
- request:i,sessionContextInstalled:!0,task:o},{prompt:!0})}catch(a){if(a?.code==="BLUEPRINT_INVALID"&&r!=="blueprint")o="\
508
- blueprint",c=await S(Ae,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,task:o},{prompt:!0});else if(a?.
509
- code==="BLUEPRINT_REQUIRED"&&r!=="start")o="start",c=await S(Ae,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,
510
- task:o},{prompt:!0});else throw a}let u=_t(c.task)||o;return{context:{genesis:!0,requestedTask:r,task:u,verificationCommands:c.
511
- verificationCommands,warnings:c.warnings},originalPrompt:i,prompt:c.prompt,promptId:H(e.promptId||e.id)||u}}export{jr as GENESIS_BLUEPRINT_PATH,Xr as GENESIS_DERIVED_ARTIFACT_PATHS,Cs as GENESIS_MACHINE_CITY_PATH,Ds as GENESIS_PROGRAM_CITY_PATH,
466
+ mergeArchitectureObservations:Mr}=Ne,jr="genesis/blueprint.md",vs=!1,Ts=Object.freeze(["vue",...vs?[]:["django-postgresq\
467
+ l","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]]),Ss=Object.freeze(["genesis-stack"]),Is=new Set(
468
+ ["adopt","blueprint","describe","deslop","program","review","start","work"]);function H(e=""){return String(e||"").trim()}
469
+ function _t(e,{required:t=!1}={}){let n=H(e);if(!n&&!t)return"";if(!Is.has(n))throw new TypeError(n?`Unknown Genesis pro\
470
+ mpt task: ${n}.`:"Genesis prompt actions require an explicit task.");return n}function Os(e={}){return _t(e.genesisTask)||
471
+ "work"}function _s(e={},t={}){return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,t.label].map(H).find(
472
+ Boolean)||"Continue the requested project work."}function Lr(e={}){return hs(e)}function Rs(){let e=(Ot.resolve.paths("g\
473
+ enesis-compiler")||[]).find(t=>It(M.join(t,"genesis-compiler"))&&It(M.join(t,".bin","genesis")));if(!e)throw new Error("\
474
+ The installed Genesis compiler executable could not be located.");return M.join(e,".bin")}function Rt(){let e=Ot.resolve(
475
+ "@local/vibe64-genesis/server");return M.resolve(M.dirname(e),"../../bin")}function ks(){return M.resolve(Rt(),"vibe64-g\
476
+ enesis-host-context")}function Ur(e=[]){let t=Rt(),n=Rs();return[...(Array.isArray(e)?e:[]).filter(r=>![t,n].includes(H(
477
+ r))),t]}function As(e={},{prompt:t=!1}={}){return{...e,...t?{hiddenStackPieces:Ts}:{},stackPackages:Ss}}function Br(e={}){
478
+ return S(es,e)}function Gr(e={}){return S(ss,e)}function Wr(e={}){return S(ps,e)}function Hr(e={}){return S(bs,e)}function qr(e={}){
479
+ return S(ys,e)}function zr(e={}){return S(us,e)}function Kr(e={}){return S(ms,e)}async function Fr(e={}){return Ge(await q(
480
+ Be,e))}async function Yr(e={}){return He(await q(We,e))}function Jr(e={}){return S(ns,e)}function Ns(){let e=is();if(e?.
481
+ contract!==_.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||"no contract identity"}; expected ${_.derivedArtifacts}\
482
+ .`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||t.some(n=>!H(n?.path)))throw new Error("Genesis return\
483
+ ed an invalid derived-artifact contract.");return{...e,artifacts:t.map(n=>({...n}))}}var kt=Ns(),Xr=Object.freeze(kt.artifacts.
484
+ map(e=>e.path)),At=new Map(kt.artifacts.map(e=>[e.id,e])),Cs=At.get("machine-city")?.path,Ds=At.get("program-city")?.path;
485
+ if(!Cs||!Ds)throw new Error("Genesis did not declare both City projection artifacts.");async function S(e,t={},n={}){let s=H(
486
+ t.projectRoot);if(!s||!M.isAbsolute(s))throw new TypeError("Genesis operations require an explicit absolute projectRoot.");
487
+ return ws(s,()=>e(As(t,n)))}async function Qr({workdir:e,promptContext:t}){let n=J(t);return t.scope==="ephemeral"?n:(await S(
488
+ Ne.projectSessionContext,{projectRoot:e,hostDriver:J,hostDriverInput:t})).output}async function x(e,t,n={}){let s=await S(
489
+ e,n);if(s?.contract!==t)throw new Error(`Genesis returned ${s?.contract||"no contract identity"}; expected ${t}.`);return s}
490
+ function q(e,t={}){return x(n=>ls({...n,name:e}),_.stackSection,t)}async function De(e,t={}){let n=await S(s=>ds({...s,names:e}),
491
+ t);if(!Array.isArray(n)||n.length!==e.length||n.some((s,r)=>s?.contract!==_.stackSection||s.name!==e[r]))throw new Error(
492
+ "Genesis returned an invalid Stack section inspection batch.");return n}async function Zr(e={}){if((await Vs(e)).status!==
493
+ "current")throw Object.assign(new Error("The project needs a current Genesis format before its Stack can be inspected."),
494
+ {code:"vibe64_stack_format_required"});await Yn(M.join(e.projectRoot,"genesis/stack.md"),"utf8");let n=await q(Q,e);return{
495
+ components:n.components,stackHash:n.stackHash}}async function ei(e={}){let[t,n]=await Promise.all([q(Qe,e),x(Ce,_.environment,
496
+ e)]);return et({environment:n,section:t})}function ti(e={}){return x(Ce,_.environment,e)}function ni(e={}){return x(as,_.
497
+ projectInspection,e)}function si(e={}){return x(fs,_.templates,e)}function ri(e={}){return x(ts,_.templateApplication,e)}
498
+ function ii(e={}){return x(os,_.engineering,e)}function oi(e={}){return x(rs,_.collaboration,e)}async function Vs(e={}){
499
+ let t=await S(cs,e);if(!H(t?.status))throw new Error("Genesis did not return a project-format status.");return{...t}}function ai(e={}){
500
+ return x(Es,_.engineering,e)}function ci(e={}){return x(gs,_.collaboration,e)}async function ui(e={}){let[[t,n,s],r]=await Promise.
501
+ all([De([ae,ue,Q],e),x(Ce,_.environment,e)]);return{...lt({environment:r,section:t}),resourceEstimates:pe({section:n,outputsSection:t,
502
+ workspaceSetupSection:s})}}async function pi(e={}){let t=await q(vt,e);return St({section:t})}async function li(e={}){return Ue(
503
+ await q(Le,e))}async function di(e={}){return ft(await q(dt,e))}async function mi(e={}){let[t,n,s]=await De([Q,ue,ae],e);
504
+ return{...await Pe({projectRoot:e.projectRoot,section:t}),resourceEstimates:pe({section:n,outputsSection:s,workspaceSetupSection:t})}}
505
+ async function fi(e={}){let[t,n,s]=await De([ue,ae,Q],e);return pe({section:t,outputsSection:n,workspaceSetupSection:s})}
506
+ async function hi({action:e={},environment:t=process.env,input:n={},projectRoot:s}={}){let r=Os(e),i=_s(n,e),o=r,c;try{c=
507
+ await S(Ae,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,task:o},{prompt:!0})}catch(a){if(a?.code===
508
+ "BLUEPRINT_INVALID"&&r!=="blueprint")o="blueprint",c=await S(Ae,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,
509
+ task:o},{prompt:!0});else if(a?.code==="BLUEPRINT_REQUIRED"&&r!=="start")o="start",c=await S(Ae,{environment:t,projectRoot:s,
510
+ request:i,sessionContextInstalled:!0,task:o},{prompt:!0});else throw a}let u=_t(c.task)||o;return{context:{genesis:!0,requestedTask:r,
511
+ task:u,verificationCommands:c.verificationCommands,warnings:c.warnings},originalPrompt:i,prompt:c.prompt,promptId:H(e.promptId||
512
+ e.id)||u}}export{jr as GENESIS_BLUEPRINT_PATH,Xr as GENESIS_DERIVED_ARTIFACT_PATHS,Cs as GENESIS_MACHINE_CITY_PATH,Ds as GENESIS_PROGRAM_CITY_PATH,
512
513
  qe as GENESIS_STACK_CONTRACTS_INCOMPLETE,ze as GENESIS_STACK_SECTION_AMBIGUOUS,Qn as HOST_CONTEXT_RESOLVER_DATA_ENV,Zn as HOST_CONTEXT_RESOLVER_ENV,
513
514
  Dr as SOURCE_EXPLANATION_PROMPT_VERSION,Xe as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,Qe as VIBE64_APPLICATION_DEPLOYMENT_SECTION,
514
515
  wt as VIBE64_INTEGRATION_SETUP_CONTRACT,vt as VIBE64_INTEGRATION_SETUP_SECTION,rt as VIBE64_OUTPUTS_CONTRACT,ae as VIBE64_OUTPUTS_SECTION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe64",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "private": false,
5
5
  "description": "Run Vibe64 against the current project.",
6
6
  "type": "module",
@@ -126,8 +126,8 @@
126
126
  "figures": "6.1.0",
127
127
  "find-my-way": "9.9.0",
128
128
  "flatted": "3.4.4",
129
- "genesis-compiler": "1.10.0",
130
- "genesis-stack": "1.3.0",
129
+ "genesis-compiler": "1.10.2",
130
+ "genesis-stack": "1.3.1",
131
131
  "get-port": "7.2.0",
132
132
  "get-stream": "9.0.1",
133
133
  "glob": "13.0.6",