vibe64 0.1.61 → 0.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/upgrade-state.js +1701 -1700
- package/dist/assets/{GithubBrowserTabs-DAgQxPXI.js → GithubBrowserTabs-DEq5_tSs.js} +1 -1
- package/dist/assets/{LocalDatabaseServer-m1G8ZS5i.js → LocalDatabaseServer-CrQ9aolO.js} +1 -1
- package/dist/assets/{SelectField-DwWoHC2p.js → SelectField-RGWl_ms9.js} +1 -1
- package/dist/assets/VAutocomplete-BnpXAJGa.js +1 -0
- package/dist/assets/{VCheckbox-B40zJSbZ.js → VCheckbox-BK0ss4F4.js} +1 -1
- package/dist/assets/{VCheckboxBtn-6ebHAnh9.js → VCheckboxBtn-DDlYJnth.js} +1 -1
- package/dist/assets/{VDialog-B2W9wqR8.js → VDialog-BCIrX462.js} +1 -1
- package/dist/assets/VMenu-Bql3E6DV.js +1 -0
- package/dist/assets/VMenu-DCU7zd0B.css +1 -0
- package/dist/assets/VOverlay-EPzW7eVB.js +1 -0
- package/dist/assets/{VRadioGroup-D1duMMwJ.js → VRadioGroup-CL3HTmyT.js} +1 -1
- package/dist/assets/VSelect-Ch00dyiM.js +1 -0
- package/dist/assets/VSkeletonLoader-Bl9P5wdh.js +1 -0
- package/dist/assets/VSkeletonLoader-DXZarZ9m.css +1 -0
- package/dist/assets/{VSwitch-DUkp5sfW.js → VSwitch-DftK1EyR.js} +1 -1
- package/dist/assets/{VTextField-BMvaWVTN.js → VTextField-B9R7EIjg.js} +1 -1
- package/dist/assets/{VTextarea-CLaWcpd_.js → VTextarea-CMgyRNk-.js} +1 -1
- package/dist/assets/{Vibe64AsyncModuleState-C9rLM2H0.js → Vibe64AsyncModuleState-9bN0_H45.js} +1 -1
- package/dist/assets/{Vibe64AuthSettingsButton-D3sB4BfM.js → Vibe64AuthSettingsButton-Bbgu_IRu.js} +1 -1
- package/dist/assets/{Vibe64ConversationLog-B-L5QsVr.js → Vibe64ConversationLog-MGFaNVSu.js} +1 -1
- package/dist/assets/{Vibe64DashboardShell-CMzX3wRM.js → Vibe64DashboardShell-i01oU7QS.js} +1 -1
- package/dist/assets/{Vibe64DatabaseWorkspace-Dewhs6_T.js → Vibe64DatabaseWorkspace-BqOIE7at.js} +1 -1
- package/dist/assets/Vibe64FileArea-B8_Tqtgv.js +1 -0
- package/dist/assets/Vibe64OutputControls-eaoCQsYn.js +8 -0
- package/dist/assets/{Vibe64RepositoryWorkspace-CBsySPXN.js → Vibe64RepositoryWorkspace-CoSH_5qZ.js} +1 -1
- package/dist/assets/Vibe64SessionFiles-Dt1EY-Qo.js +1 -0
- package/dist/assets/{Vibe64SessionSourceEditor-BouH4fXC.js → Vibe64SessionSourceEditor-D5-abooo.js} +1 -1
- package/dist/assets/{Vibe64UiStoryboardView--E04EEF8.js → Vibe64UiStoryboardView-CyuufVBB.js} +1 -1
- package/dist/assets/{Vibe64UnavailableSessions-94bFpxMK.js → Vibe64UnavailableSessions-CaLRMl-0.js} +1 -1
- package/dist/assets/{_pageId_-Ch4OpUkd.js → _pageId_-M5CNslNQ.js} +1 -1
- package/dist/assets/_sessionId_-jSlkZQLV.js +1 -0
- package/dist/assets/{_slug_-C8VNMRVH.js → _slug_-ClQKNEA9.js} +5 -5
- package/dist/assets/access-BqnqYSZR.js +1 -0
- package/dist/assets/{app-Bs6-Hv23.js → app-D7V6OMMB.js} +1 -1
- package/dist/assets/{changes-C6eMQ9YE.js → changes-odK1bV6J.js} +1 -1
- package/dist/assets/{client-qpL_kR4u.js → client-BLY6SeL-.js} +1 -1
- package/dist/assets/{client-CVgL_ShV.js → client-BRcncaFt.js} +1 -1
- package/dist/assets/{client-HWj_BNVZ.js → client-DwF9Q0VQ.js} +2 -2
- package/dist/assets/{client-qAKnahkF.js → client-P5LOKvwh.js} +2 -2
- package/dist/assets/client-rknXpZ1o.js +1 -0
- package/dist/assets/{conversation-ZN3-8jbz.css → conversation-BMyk8R_u.css} +1 -1
- package/dist/assets/{conversation-DbF0OrZB.js → conversation-BoB7Drme.js} +4 -4
- package/dist/assets/conversation-D7T_us2O.js +1 -0
- package/dist/assets/{dashboard-CzLsa0w0.js → dashboard-D6JkBdZg.js} +1 -1
- package/dist/assets/{english-definitions-BA8v5wP1.js → english-definitions-CwCZ8VJ-.js} +1 -1
- package/dist/assets/env-CIy7uwLb.js +1 -0
- package/dist/assets/{fileTypes-DRyfajWx.js → fileTypes-2k5HCkMT.js} +1 -1
- package/dist/assets/health-B9ZoQC78.js +1 -0
- package/dist/assets/history-IBqZqdSL.js +1 -0
- package/dist/assets/{index-fXKdz8oR.js → index-DAareKn3.js} +4 -4
- package/dist/assets/{integrations-cgbpgNNd.js → integrations-BBMdyyMq.js} +1 -1
- package/dist/assets/issues-DwUO1HjX.js +1 -0
- package/dist/assets/{learning-DZXWgVEW.js → learning-DAIqaO0B.js} +1 -1
- package/dist/assets/{pages-BUUwIXBf.js → pages-DoUMcieZ.js} +1 -1
- package/dist/assets/{project-files-BS2gdDSz.js → project-files-DilujZdI.js} +1 -1
- package/dist/assets/publish-KZQ_gdoN.js +3 -0
- package/dist/assets/pull-requests-BB3CAadu.js +1 -0
- package/dist/assets/{repository-Dkow-18G.js → repository-B90tiuN6.js} +1 -1
- package/dist/assets/settings-DdbhtNHb.js +1 -0
- package/dist/assets/thinkingText-mMYz6e03.js +8 -0
- package/dist/assets/{useArchivedVibe64Sessions-C0MVJuyX.js → useArchivedVibe64Sessions-B_pM75gN.js} +1 -1
- package/dist/assets/useVibe64ConversationLog-Ch0ZbnCG.js +2 -0
- package/dist/assets/{useVibe64Learning-RE4HXHqo.js → useVibe64Learning-DiLAIKbI.js} +1 -1
- package/dist/assets/{useVibe64SessionData-kGr7R7lG.js → useVibe64SessionData-COsXmbMm.js} +1 -1
- package/dist/assets/{useVibe64SessionSelection-BZ7WnRv0.js → useVibe64SessionSelection-CKBC-ZJw.js} +1 -1
- package/dist/assets/vibe64RepositoryRealtime-BIXVm4u9.js +1 -0
- package/dist/assets/{vibe64RepositoryRealtime-ByZfq2fE.css → vibe64RepositoryRealtime-rnWlv9jw.css} +1 -1
- package/dist/assets/vibe64SessionFocus-C0LfHXbF.js +1 -0
- package/dist/index.html +23 -27
- package/docs/colleague-usage/ai-tasks.md +3 -1
- package/docs/colleague-usage/auto-workflow.md +6 -3
- package/docs/colleague-usage/chat-settings.md +20 -0
- package/docs/colleague-usage/coding-agent-goals.md +16 -2
- package/node_modules/@jskit-ai/assistant-core/CHANGELOG.md +2 -0
- package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-runtime/CHANGELOG.md +1 -0
- package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
- package/node_modules/@jskit-ai/realtime/package.json +1 -1
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +75 -75
- package/package.json +5 -5
- package/server.bundle.mjs +20011 -19995
- package/dist/assets/VAlert-Bp38AD8H.css +0 -1
- package/dist/assets/VAlert-DyCQWe9P.js +0 -1
- package/dist/assets/VAutocomplete-CiXrKMyn.js +0 -1
- package/dist/assets/VDivider-DGkInAUr.js +0 -1
- package/dist/assets/VDivider-DvkP_iX7.css +0 -1
- package/dist/assets/VMenu-9TUL6_ph.css +0 -1
- package/dist/assets/VMenu-DQ9SZ1Fq.js +0 -1
- package/dist/assets/VOverlay-DUKRqNx3.js +0 -1
- package/dist/assets/VSelect-9lMtP5cu.js +0 -1
- package/dist/assets/VSkeletonLoader-C5ZRrPV4.js +0 -1
- package/dist/assets/VSkeletonLoader-LCPSxykp.css +0 -1
- package/dist/assets/Vibe64FileArea-DluZTu-c.js +0 -1
- package/dist/assets/Vibe64OutputControls-BfbdD25Y.js +0 -8
- package/dist/assets/Vibe64SessionFiles--wtVe_KC.js +0 -1
- package/dist/assets/_sessionId_-DGT4d2La.js +0 -1
- package/dist/assets/access-BAOx4iCS.js +0 -1
- package/dist/assets/client-CIF5Y1Aj.js +0 -1
- package/dist/assets/conversation-p_mmD9ie.js +0 -8
- package/dist/assets/env-BqJ_GWbz.js +0 -1
- package/dist/assets/health-CIqrHpVK.js +0 -1
- package/dist/assets/history-BCjhpyP8.js +0 -1
- package/dist/assets/issues-AhouA6nE.js +0 -1
- package/dist/assets/publish-Bq_LPmX2.js +0 -3
- package/dist/assets/pull-requests-BvChbjCD.js +0 -1
- package/dist/assets/settings-r5RWQVzw.js +0 -1
- package/dist/assets/ssrBoot-C6UwmCGc.js +0 -1
- package/dist/assets/useVibe64ConversationLog-CUWEZhnf.js +0 -2
- package/dist/assets/vibe64RepositoryRealtime-R5QhcJ4H.js +0 -1
- package/dist/assets/vibe64SessionFocus-CHKCMxcJ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as unref,ht as proxyRefs,it as watch,mt as onScopeDispose,u as computed,vt as ref}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{N as useQueryClient,t as useEndpointResource}from"./useEndpointResource-CmMwteuX.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-rsYWyW6m.js";import{s as normalizeObject}from"./normalize-BD25VwNK.js";import{o as projectSlugFromRoute}from"./vibe64ProjectScope.local-B9ZpdYlf.js";import{o as ROUTE_VISIBILITY_PUBLIC}from"./visibility-Cq31Xy7I.js";import{r as useRealtimeEvent}from"./useRealtimeEvent-B4oRg9Dt.js";import{t as useCommand}from"./useCommand-CNDe8gM-.js";import{t as usePaths}from"./usePaths-CvUbx5-V.js";import{t as useUiFeedback}from"./useUiFeedback-CWb6o71Z.js";import{t as readRefOrGetterValue}from"./vueRefOrGetterValue-y-4f_In7.js";import{r as vibe64RealtimeOriginPayload}from"./vibe64BrowserTabOrigin-vIN_87mi.js";import{H as vibe64SessionsQueryKey,I as vibe64SessionEventMatchesScope,L as vibe64SessionPath,V as vibe64SessionQueryKey,a as VIBE64_CURRENT_SESSION_API_SUFFIX,c as VIBE64_SESSION_SUMMARY_CHANGED_EVENT,o as VIBE64_SESSIONS_API_SUFFIX}from"./vibe64SessionRequestConfig-DVRCRAex.js";import{S as VIBE64_PROJECT_CHANGED_EVENT}from"./studioGateApi-UqmdV50W.js";import{N as useVibe64ProjectSlug}from"./index-fXKdz8oR.js";import{i as vibe64SessionDisplayTitle,o as vibe64SessionRevision,r as shortVibe64SessionId,t as isArchivedVibe64Session}from"./vibe64SessionViewModel-CQCds_jb.js";import{i as vibe64SessionDebugSummary,n as vibe64SessionDebugError,r as vibe64SessionDebugLog,t as vibe64SessionDebugDurationMs}from"./vibe64SessionDebugLog-BfO7tG1A.js";import{i as visibleVibe64Sessions,n as enrichVibe64SessionForDisplay}from"./vibe64SessionPanelModel-B-WkXnPu.js";import{n as useVibe64SessionSelection,t as selectedSessionIdFromRoute}from"./useVibe64SessionSelection-BZ7WnRv0.js";function refetchEndpointResource(resource){return resource.query.refetch({cancelRefetch:false})}function sessionChangedReason(payload){return String(payload.reason||``).trim()}function sessionRevision(value){const revision=Number(value);return Number.isSafeInteger(revision)&&revision>=0?revision:null}function agentTurnRealtimeOverlayFromPayload(input,selectedSessionId=``){const payload=normalizeObject(input);const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(selectedSessionId||``).trim())return null;const agentSession=normalizeObject(payload.agentSession);const turn=normalizeObject(agentSession.turn);const run=normalizeObject(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(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=normalizeObject(overlay.agentSession);return{...session,agentRuns:mergeAgentRunOverlay(session.agentRuns,normalizeObject(overlay.agentRun)),agentSession:{...normalizeObject(session.agentSession),...overlayAgentSession,thread:{...normalizeObject(session.agentSession?.thread),...normalizeObject(overlayAgentSession.thread)},turn:{...normalizeObject(session.agentSession?.turn),...normalizeObject(overlayAgentSession.turn),active:overlay.active===true}},revision:overlay.revision}}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=``,read=`includeDetail`){const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(sessionId||``).trim())return false;return payload.clientRefresh?.[read]!==false}function useVibe64SessionDialogs({beginArchive,finishArchive,isSelectedSessionArchived,refreshSessionData,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(!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({reason:`archive-session`}).catch(()=>null)}}return{archiving:computed(()=>Boolean(archivingSessionId.value)),archivingSessionId,cancel:cancelArchiveSession,command:archiveCommand,confirm:confirmArchiveSession,open:archiveDialogOpen,request:requestArchiveSelectedSession,sessionId:archiveDialogSessionId,sessionTitle:archiveDialogSessionTitle}}function useVibe64SessionCreation({projectSlug,refreshSessionDataInBackground,selectSessionId,sessionListQueryKey,sessionsApiPath}){const queryClient=useQueryClient();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?.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 createSessionRunning=ref(false);let createSessionInFlight=null;let disposed=false;onScopeDispose(()=>{disposed=true});async function createSession(assistantSelection={},{pullRequestNumber,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`);createSessionRunning.value=true;createSessionInFlight=(async()=>{try{const response=await createSessionCommand.run({assistantSelection,pullRequestNumber,repositoryBranch,apiPath:creationApiPath});if(!disposed&&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({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{createSessionRunning.value=false;createSessionInFlight=null}})();return createSessionInFlight}return{createSession,createSessionCommand,createSessionRunning}}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 useVibe64SelectedSessionRenewal({availableSessions,projectSlug,route,router,selectedListSession,selectedSessionId,selectedSessionMissing,sessionList,sessionsApiPath}){let disposed=false;onScopeDispose(()=>{disposed=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_SUMMARY_CHANGED_EVENT,matches:({payload={}}={})=>mountedSessionRealtimeShouldRefresh({payload},selectionRenewalPredecessorId.value)},requestRecoveryLabel:`Selected session renewal`});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!disposed&&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}})()}return{selectionRenewalPredecessorId,selectionRenewalResource,syncRenewalSuccessorUrl}}function ignorePublicationError(){}function createVibe64CurrentSessionPublisher({onError=ignorePublicationError,publish}){let pendingPublication=null;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();pendingPublication={apiPath,identity:JSON.stringify([apiPath,sessionId]),sessionId};publicationChain=publicationChain.catch(()=>null).then(async()=>{const publication=pendingPublication;pendingPublication=null;if(stopped||!publication)return;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;pendingPublication=null}return Object.freeze({request,stop})}function selectedSessionIdForCurrentAlias({createSessionRunning=false,selectedSessionId=``,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)return null;return``}function useVibe64CurrentSessionPublication({selectionReconciliationState}){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})}});onScopeDispose(()=>{currentSessionPublisher.stop()});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})}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 sessionArchiveState(session){const operation=sessionArchiveOperation(session);const failed=operation?.status===`failed`;return{archiveError:failed?operation.error:``,archiving:!failed&&(operation?.status===`running`||session?.metadata?.session_closing_reason===`archived`),operation}}function routeQueryWithoutUnlistedSession({route={},projectSlug=``,sessions=[]}={}){const routeSessionId=selectedSessionIdFromRoute(route);if(!routeSessionId||projectSlugFromRoute(route)!==projectSlug||sessionIdExistsInList(routeSessionId,sessions))return null;const{session:_session,conversation:_conversation,chat:_chat,...query}=route.query||{};return query}function shouldPreserveSelectedSessionDuringRefresh({createSessionRunning=false,currentSessionId=``,nextSessions=[],sessionListLoading=false}={}){const normalizedSessionId=String(currentSessionId||``).trim();if(!normalizedSessionId||sessionIdExistsInList(normalizedSessionId,nextSessions))return false;return Boolean(sessionListLoading||createSessionRunning)}function sessionListRealtimeShouldRefresh({payload={}}={},projectSlug=``){return vibe64SessionEventMatchesScope(payload,{projectSlug})&&payload.clientRefresh?.includeList!==false}function useVibe64SessionData(){const projectSlug=useVibe64ProjectSlug();const route=useRoute();const router=useRouter();const paths=usePaths();const selectionScope=computed(()=>String(projectSlug.value||``).trim());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:`always`,refetchOnWindowFocus:false},requestRecoveryLabel:`Vibe64 sessions`,realtime:{events:[VIBE64_SESSION_SUMMARY_CHANGED_EVENT,VIBE64_PROJECT_CHANGED_EVENT,`connect`],matches:event=>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||!sessionListResource.query.isFetchedAfterMount.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});const sessionSelection=useVibe64SessionSelection({projectSlug,rememberedId:()=>sessionList.isInitialLoading?``:sessionList.pages[0]?.lastOpenedSessionId});const selectedSessionId=sessionSelection.selectedId;let emptySessionListObservedForProject=``;const{createSession,createSessionCommand,createSessionRunning}=useVibe64SessionCreation({projectSlug,refreshSessionDataInBackground,selectSessionId,sessionListQueryKey,sessionsApiPath});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 archiveState=sessionArchiveState(session);return{...session,agentActivity:latestAgentTurnRealtimeOverlay(session.agentActivity,agentActivityBySessionId.value[session.sessionId]),archiveOperation:archiveState.operation,archiveStartedAt:archiveState.operation?.startedAt||session.archiveStartedAt,archiveError:archiveState.archiveError,archiving:Boolean(session.archiving||archiveState.archiving)}})});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,selectionRenewalResource,syncRenewalSuccessorUrl}=useVibe64SelectedSessionRenewal({availableSessions,projectSlug,route,router,selectedListSession,selectedSessionId,selectedSessionMissing,sessionList,sessionsApiPath});const creationOptions=computed(()=>sessionList.pages?.[0]?.creation||{});const selectedSession=computed(()=>enrichVibe64SessionForDisplay(selectedListSession.value));const isSelectedSessionArchived=computed(()=>isArchivedVibe64Session(selectedSession.value||{}));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}));const archiveFeedback=useUiFeedback({source:`vibe64.sessions.archive.remote`});const shownArchiveFailures=new Set;watch(projectSlug,()=>{archiveAttempts.value={};agentActivityBySessionId.value={};shownArchiveFailures.clear()});useRealtimeEvent({event:VIBE64_SESSION_SUMMARY_CHANGED_EVENT,matches:({payload={}}={})=>vibe64SessionEventMatchesScope(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);if(!session||!sessionArchiveState(session).archiving)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});function dropUnlistedRouteSession(){const query=routeQueryWithoutUnlistedSession({route,projectSlug:projectSlug.value,sessions:sessions.value});if(query)router.replace({path:route.path,hash:route.hash,query}).catch(()=>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||``),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.selectionRenewalPredecessorId)dropUnlistedRouteSession();if(!state.selectedSessionId&&emptySessionListObservedForProject===state.selectionScope)return;sessionSelection.selectAvailableId(nextSessions,{fallbackId:nextSessions.at(-1)?.sessionId||``,getId:session=>session.sessionId})},{immediate:true});useVibe64CurrentSessionPublication({selectionReconciliationState});return{archive,canCreateSession,clearSelectedSession,createSession,createSessionCommand,createSessionRunning,createSessionVisible,createSessionTitle,isSelectedSessionArchived,refreshSessionData,selectSessionId,selectedSession,selectedSessionId,selectedSessionTitle,sessionList,sessions,sessionsApiPath,shortSessionId:shortVibe64SessionId}}export{mountedSessionDetailRefreshReason as a,sessionRecordHasActiveAgentWork as c,sessionWithAgentTurnRealtimeOverlay as d,refetchEndpointResource as f,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{Et as unref,ht as proxyRefs,it as watch,mt as onScopeDispose,u as computed,vt as ref}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{N as useQueryClient,t as useEndpointResource}from"./useEndpointResource-CmMwteuX.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-rsYWyW6m.js";import{s as normalizeObject}from"./normalize-BD25VwNK.js";import{o as projectSlugFromRoute}from"./vibe64ProjectScope.local-B9ZpdYlf.js";import{o as ROUTE_VISIBILITY_PUBLIC}from"./visibility-Cq31Xy7I.js";import{r as useRealtimeEvent}from"./useRealtimeEvent-B4oRg9Dt.js";import{t as useCommand}from"./useCommand-CNDe8gM-.js";import{t as usePaths}from"./usePaths-CvUbx5-V.js";import{t as useUiFeedback}from"./useUiFeedback-CWb6o71Z.js";import{t as readRefOrGetterValue}from"./vueRefOrGetterValue-y-4f_In7.js";import{r as vibe64RealtimeOriginPayload}from"./vibe64BrowserTabOrigin-vIN_87mi.js";import{H as vibe64SessionsQueryKey,I as vibe64SessionEventMatchesScope,L as vibe64SessionPath,V as vibe64SessionQueryKey,a as VIBE64_CURRENT_SESSION_API_SUFFIX,c as VIBE64_SESSION_SUMMARY_CHANGED_EVENT,o as VIBE64_SESSIONS_API_SUFFIX}from"./vibe64SessionRequestConfig-DVRCRAex.js";import{S as VIBE64_PROJECT_CHANGED_EVENT}from"./studioGateApi-UqmdV50W.js";import{N as useVibe64ProjectSlug}from"./index-DAareKn3.js";import{i as vibe64SessionDisplayTitle,o as vibe64SessionRevision,r as shortVibe64SessionId,t as isArchivedVibe64Session}from"./vibe64SessionViewModel-CQCds_jb.js";import{i as vibe64SessionDebugSummary,n as vibe64SessionDebugError,r as vibe64SessionDebugLog,t as vibe64SessionDebugDurationMs}from"./vibe64SessionDebugLog-BfO7tG1A.js";import{i as visibleVibe64Sessions,n as enrichVibe64SessionForDisplay}from"./vibe64SessionPanelModel-B-WkXnPu.js";import{n as useVibe64SessionSelection,t as selectedSessionIdFromRoute}from"./useVibe64SessionSelection-CKBC-ZJw.js";function refetchEndpointResource(resource){return resource.query.refetch({cancelRefetch:false})}function sessionChangedReason(payload){return String(payload.reason||``).trim()}function sessionRevision(value){const revision=Number(value);return Number.isSafeInteger(revision)&&revision>=0?revision:null}function agentTurnRealtimeOverlayFromPayload(input,selectedSessionId=``){const payload=normalizeObject(input);const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(selectedSessionId||``).trim())return null;const agentSession=normalizeObject(payload.agentSession);const turn=normalizeObject(agentSession.turn);const run=normalizeObject(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(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=normalizeObject(overlay.agentSession);return{...session,agentRuns:mergeAgentRunOverlay(session.agentRuns,normalizeObject(overlay.agentRun)),agentSession:{...normalizeObject(session.agentSession),...overlayAgentSession,thread:{...normalizeObject(session.agentSession?.thread),...normalizeObject(overlayAgentSession.thread)},turn:{...normalizeObject(session.agentSession?.turn),...normalizeObject(overlayAgentSession.turn),active:overlay.active===true}},revision:overlay.revision}}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=``,read=`includeDetail`){const changedSessionId=String(payload.sessionId||payload.entityId||``).trim();if(!changedSessionId||changedSessionId!==String(sessionId||``).trim())return false;return payload.clientRefresh?.[read]!==false}function useVibe64SessionDialogs({beginArchive,finishArchive,isSelectedSessionArchived,refreshSessionData,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(!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({reason:`archive-session`}).catch(()=>null)}}return{archiving:computed(()=>Boolean(archivingSessionId.value)),archivingSessionId,cancel:cancelArchiveSession,command:archiveCommand,confirm:confirmArchiveSession,open:archiveDialogOpen,request:requestArchiveSelectedSession,sessionId:archiveDialogSessionId,sessionTitle:archiveDialogSessionTitle}}function useVibe64SessionCreation({projectSlug,refreshSessionDataInBackground,selectSessionId,sessionListQueryKey,sessionsApiPath}){const queryClient=useQueryClient();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?.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 createSessionRunning=ref(false);let createSessionInFlight=null;let disposed=false;onScopeDispose(()=>{disposed=true});async function createSession(assistantSelection={},{pullRequestNumber,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`);createSessionRunning.value=true;createSessionInFlight=(async()=>{try{const response=await createSessionCommand.run({assistantSelection,pullRequestNumber,repositoryBranch,apiPath:creationApiPath});if(!disposed&&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({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{createSessionRunning.value=false;createSessionInFlight=null}})();return createSessionInFlight}return{createSession,createSessionCommand,createSessionRunning}}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 useVibe64SelectedSessionRenewal({availableSessions,projectSlug,route,router,selectedListSession,selectedSessionId,selectedSessionMissing,sessionList,sessionsApiPath}){let disposed=false;onScopeDispose(()=>{disposed=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_SUMMARY_CHANGED_EVENT,matches:({payload={}}={})=>mountedSessionRealtimeShouldRefresh({payload},selectionRenewalPredecessorId.value)},requestRecoveryLabel:`Selected session renewal`});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!disposed&&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}})()}return{selectionRenewalPredecessorId,selectionRenewalResource,syncRenewalSuccessorUrl}}function ignorePublicationError(){}function createVibe64CurrentSessionPublisher({onError=ignorePublicationError,publish}){let pendingPublication=null;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();pendingPublication={apiPath,identity:JSON.stringify([apiPath,sessionId]),sessionId};publicationChain=publicationChain.catch(()=>null).then(async()=>{const publication=pendingPublication;pendingPublication=null;if(stopped||!publication)return;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;pendingPublication=null}return Object.freeze({request,stop})}function selectedSessionIdForCurrentAlias({createSessionRunning=false,selectedSessionId=``,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)return null;return``}function useVibe64CurrentSessionPublication({selectionReconciliationState}){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})}});onScopeDispose(()=>{currentSessionPublisher.stop()});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})}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 sessionArchiveState(session){const operation=sessionArchiveOperation(session);const failed=operation?.status===`failed`;return{archiveError:failed?operation.error:``,archiving:!failed&&(operation?.status===`running`||session?.metadata?.session_closing_reason===`archived`),operation}}function routeQueryWithoutUnlistedSession({route={},projectSlug=``,sessions=[]}={}){const routeSessionId=selectedSessionIdFromRoute(route);if(!routeSessionId||projectSlugFromRoute(route)!==projectSlug||sessionIdExistsInList(routeSessionId,sessions))return null;const{session:_session,conversation:_conversation,chat:_chat,...query}=route.query||{};return query}function shouldPreserveSelectedSessionDuringRefresh({createSessionRunning=false,currentSessionId=``,nextSessions=[],sessionListLoading=false}={}){const normalizedSessionId=String(currentSessionId||``).trim();if(!normalizedSessionId||sessionIdExistsInList(normalizedSessionId,nextSessions))return false;return Boolean(sessionListLoading||createSessionRunning)}function sessionListRealtimeShouldRefresh({payload={}}={},projectSlug=``){return vibe64SessionEventMatchesScope(payload,{projectSlug})&&payload.clientRefresh?.includeList!==false}function useVibe64SessionData(){const projectSlug=useVibe64ProjectSlug();const route=useRoute();const router=useRouter();const paths=usePaths();const selectionScope=computed(()=>String(projectSlug.value||``).trim());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:`always`,refetchOnWindowFocus:false},requestRecoveryLabel:`Vibe64 sessions`,realtime:{events:[VIBE64_SESSION_SUMMARY_CHANGED_EVENT,VIBE64_PROJECT_CHANGED_EVENT,`connect`],matches:event=>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||!sessionListResource.query.isFetchedAfterMount.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});const sessionSelection=useVibe64SessionSelection({projectSlug,rememberedId:()=>sessionList.isInitialLoading?``:sessionList.pages[0]?.lastOpenedSessionId});const selectedSessionId=sessionSelection.selectedId;let emptySessionListObservedForProject=``;const{createSession,createSessionCommand,createSessionRunning}=useVibe64SessionCreation({projectSlug,refreshSessionDataInBackground,selectSessionId,sessionListQueryKey,sessionsApiPath});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 archiveState=sessionArchiveState(session);return{...session,agentActivity:latestAgentTurnRealtimeOverlay(session.agentActivity,agentActivityBySessionId.value[session.sessionId]),archiveOperation:archiveState.operation,archiveStartedAt:archiveState.operation?.startedAt||session.archiveStartedAt,archiveError:archiveState.archiveError,archiving:Boolean(session.archiving||archiveState.archiving)}})});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,selectionRenewalResource,syncRenewalSuccessorUrl}=useVibe64SelectedSessionRenewal({availableSessions,projectSlug,route,router,selectedListSession,selectedSessionId,selectedSessionMissing,sessionList,sessionsApiPath});const creationOptions=computed(()=>sessionList.pages?.[0]?.creation||{});const selectedSession=computed(()=>enrichVibe64SessionForDisplay(selectedListSession.value));const isSelectedSessionArchived=computed(()=>isArchivedVibe64Session(selectedSession.value||{}));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}));const archiveFeedback=useUiFeedback({source:`vibe64.sessions.archive.remote`});const shownArchiveFailures=new Set;watch(projectSlug,()=>{archiveAttempts.value={};agentActivityBySessionId.value={};shownArchiveFailures.clear()});useRealtimeEvent({event:VIBE64_SESSION_SUMMARY_CHANGED_EVENT,matches:({payload={}}={})=>vibe64SessionEventMatchesScope(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);if(!session||!sessionArchiveState(session).archiving)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});function dropUnlistedRouteSession(){const query=routeQueryWithoutUnlistedSession({route,projectSlug:projectSlug.value,sessions:sessions.value});if(query)router.replace({path:route.path,hash:route.hash,query}).catch(()=>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||``),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.selectionRenewalPredecessorId)dropUnlistedRouteSession();if(!state.selectedSessionId&&emptySessionListObservedForProject===state.selectionScope)return;sessionSelection.selectAvailableId(nextSessions,{fallbackId:nextSessions.at(-1)?.sessionId||``,getId:session=>session.sessionId})},{immediate:true});useVibe64CurrentSessionPublication({selectionReconciliationState});return{archive,canCreateSession,clearSelectedSession,createSession,createSessionCommand,createSessionRunning,createSessionVisible,createSessionTitle,isSelectedSessionArchived,refreshSessionData,selectSessionId,selectedSession,selectedSessionId,selectedSessionTitle,sessionList,sessions,sessionsApiPath,shortSessionId:shortVibe64SessionId}}export{mountedSessionDetailRefreshReason as a,sessionRecordHasActiveAgentWork as c,sessionWithAgentTurnRealtimeOverlay as d,refetchEndpointResource as f,mountedSessionDetailLoadState as i,agentTurnRealtimeOverlayFromPayload as l,useVibe64SessionData as n,mountedSessionRealtimeShouldRefresh as o,latestSessionDetailRecord as r,mountedSessionRecord as s,sessionListRealtimeShouldRefresh as t,latestAgentTurnRealtimeOverlay as u};
|
package/dist/assets/{useVibe64SessionSelection-BZ7WnRv0.js → useVibe64SessionSelection-CKBC-ZJw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Et as unref,Tt as toValue,it as watch,u as computed,vt as ref}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{g as useRoute}from"./useApi-BPuI6ZR9-rsYWyW6m.js";import{t as browserSessionStorage}from"./browser-D8z6v6Ge.js";import{p as selectedSessionStorageKey}from"./vibe64SessionRequestConfig-DVRCRAex.js";import{N as useVibe64ProjectSlug}from"./index-
|
|
1
|
+
import{Et as unref,Tt as toValue,it as watch,u as computed,vt as ref}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{g as useRoute}from"./useApi-BPuI6ZR9-rsYWyW6m.js";import{t as browserSessionStorage}from"./browser-D8z6v6Ge.js";import{p as selectedSessionStorageKey}from"./vibe64SessionRequestConfig-DVRCRAex.js";import{N as useVibe64ProjectSlug}from"./index-DAareKn3.js";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(toValue(storageKey)||``).trim()}function readPreferredId(preferredId=``){return String(toValue(preferredId)||``).trim()}function useStoredSelection({preferredId=``,rememberedId,storageKey=``,enabled=true}){const selectionEnabled=computed(()=>Boolean(toValue(enabled)));const activeStorageKey=computed(()=>readStorageKey(storageKey));const activePreferredId=computed(()=>readPreferredId(preferredId));const restoredId=(key=activeStorageKey.value)=>rememberedId===void 0?readStoredValue(key):readPreferredId(rememberedId);const selectedId=ref(selectionEnabled.value?activePreferredId.value||restoredId():``);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 restoredSelectionId=restoredId();select(itemIds.includes(restoredSelectionId)?restoredSelectionId: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||restoredId():``},{flush:`sync`});watch(activeStorageKey,nextStorageKey=>{if(selectionEnabled.value)selectedId.value=activePreferredId.value||restoredId(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(),rememberedId,route=useRoute()}){return useStoredSelection({preferredId:computed(()=>selectedSessionIdFromRoute(route)),rememberedId,storageKey:computed(()=>selectedSessionStorageKey(unref(projectSlug)))})}export{useVibe64SessionSelection as n,selectedSessionIdFromRoute as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as useId,Et as unref,G as renderList,H as openBlock,K as renderSlot,Kt as normalizeClass,N as nextTick,O as inject,Tt as toValue,Xt as toDisplayString,_ as createSlots,b as createVNode,d as createBaseVNode,f as createBlock,gt as reactive,i as Fragment,it as watch,m as createElementBlock,mt as onScopeDispose,ot as withCtx,p as createCommentVNode,st as withDirectives,u as computed,vt as ref,xt as shallowRef,y as createTextVNode}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{S as VIcon,cr as vShow,lr as withKeys,mt as useDisplay,ur as withModifiers}from"./VChip-D2IukBZw.js";import{s as normalizeObject}from"./normalize-BD25VwNK.js";import{r as VProgressCircular,t as VBtn}from"./VBtn-2vbH580C.js";import{t as VDialog}from"./VDialog-BCIrX462.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{y as LongTextInlineParts_default}from"./conversation-BoB7Drme.js";import{r as useRealtimeEvent}from"./useRealtimeEvent-B4oRg9Dt.js";var VIBE64_AI_TASKS_KEY=Symbol(`vibe64.ai-tasks`);var NO_AI_TASKS=Object.freeze({available:false});var AI_TASK_PHASES=Object.freeze({STARTING:`starting`,WORKING:`working`,CHECKING:`checking`,NEEDS_YOU:`needs_you`,CANCELLING:`cancelling`,DONE:`done`,NOT_DONE:`not_done`});var AI_TASK_REASONS=Object.freeze({AI_STUCK:`ai_stuck`,AI_UNAVAILABLE:`ai_unavailable`,ARCHIVED:`archived`,CANCELLED:`cancelled`,CHECK_STUCK:`check_stuck`,DRAFT_WAITING:`draft_waiting`,INTERRUPTED:`interrupted`,NO_RESULT:`no_result`,QUESTION:`question`,STOPPED:`stopped`,TURN_FAILED:`turn_failed`,UNCONFIRMED:`unconfirmed`,YOUR_TURN:`your_turn`});var AI_TASK_CHECKERS=Object.freeze({AGENT:`agent`,PERSON:`person`,VIBE64:`vibe64`});var AI_TASK_ACTIVE_PHASES=Object.freeze([AI_TASK_PHASES.STARTING,AI_TASK_PHASES.WORKING,AI_TASK_PHASES.CHECKING,AI_TASK_PHASES.CANCELLING]);var AI_TASK_ENDED_PHASES=Object.freeze([AI_TASK_PHASES.DONE,AI_TASK_PHASES.NOT_DONE]);function aiTaskEnded(task){return AI_TASK_ENDED_PHASES.includes(task.phase)}var AI_TASK_MESSAGES=Object.freeze({actions:Object.freeze({aiSetup:`Open AI setup`,answer:`Answer`,back:`Back`,cancel:`Cancel`,cancelling:`Cancelling…`,checkNow:`Check now`,close:`Close`,closing:`Closing…`,continue:`Continue`,details:`Details`,endNotDone:`End as not done`,finish:`Finish`,hide:`Hide`,keepGoing:`Keep going`,openChat:`Open chat`,review:`Review resolved conflicts`,waitForAi:`Wait for the AI`}),button:Object.freeze({busy:`Being fixed…`,fix:`Fix it with AI`,opening:`Opening…`,result:`See result`}),chat:Object.freeze({answer:`Type your answer…`,message:`Message the AI…`}),outcome:Object.freeze({done:`Done`,notDone:`Not done`,problem:`The problem`,seeConversation:`See the conversation`,showResult:`Show the result`,whatHappened:`What happened`,whatTheAiDid:`What the AI did`,whatsNext:`What's next`}),progress:Object.freeze({activity:`Activity`,unavailable:`Nothing is lost. The fix continues from here.`}),status:Object.freeze({aiStuck:`The AI could not finish this`,aiUnavailable:`The AI account can't run this right now`,cancelling:`Cancelling…`,draftWaiting:`The check failed. Your unsent message is waiting.`,interrupted:`Vibe64 restarted while the AI was working`,noResult:`The AI stopped without saying it finished`,question:`The AI needs your answer`,starting:`Starting…`,stopped:`Stopped. Tell the AI what to do next.`,turnFailed:`The AI ran into an error`,unconfirmed:`Vibe64 couldn't confirm the result`,working:`The AI is working on this`,yourTurn:`Your turn`}),tray:Object.freeze({cancelling:`Cancelling…`,done:`Done`,needsYou:`Needs you`,notDone:`Not done`,yourTurn:`Your turn`}),views:Object.freeze({chat:`Chat`,label:`Task views`,progress:`Progress`,waiting:`The AI is waiting for your answer`}),closeFailed:`That didn't finish. Try again.`,requestFailed:`That didn't reach Vibe64. Try again.`,attempt:(attempt,limit)=>`Attempt ${attempt} of ${limit}`,retrying:(attempt,limit)=>`The AI is trying again (attempt ${attempt} of ${limit})`,cancelQuestion:noun=>`Cancel this ${noun}? The AI stops. Anything it has changed stays in the session.`,cancelConfirm:noun=>`Cancel ${noun}`,cancelledByYou:noun=>`You cancelled this ${noun}.`,cancelledBy:(name,noun)=>`${name} cancelled this ${noun}.`,mainChatSince:time=>time?`The main chat's AI has been working since ${time}.`:`The main chat's AI is working.`,whatsNext:()=>`The problem is still there. Anything the AI changed stays in the session. To try again, close this and choose Fix it with AI.`,toast:(title,outcome)=>`${title}: ${outcome}.`});var AI_TASK_ACTIONS=Object.freeze({AI_SETUP:`ai-setup`,ANSWER:`answer`,CHECK:`check`,CONTINUE:`continue`,END:`end`,FINISH:`finish`,OPEN_CHAT:`open-chat`,REVIEW:`review`,RUN_NOW:`run-now`,WAIT_FOR_AI:`wait-for-ai`});var action=(id,label,primary=false)=>Object.freeze({id,label,primary});var OPEN_CHAT=action(AI_TASK_ACTIONS.OPEN_CHAT,AI_TASK_MESSAGES.actions.openChat);var CHECK_NOW=action(AI_TASK_ACTIONS.CHECK,AI_TASK_MESSAGES.actions.checkNow,true);var CONTINUE=action(AI_TASK_ACTIONS.CONTINUE,AI_TASK_MESSAGES.actions.continue,true);var NEEDS_YOU=Object.freeze({[AI_TASK_REASONS.QUESTION]:{status:AI_TASK_MESSAGES.status.question,chat:true,dot:true,actions:[action(AI_TASK_ACTIONS.ANSWER,AI_TASK_MESSAGES.actions.answer,true)]},[AI_TASK_REASONS.YOUR_TURN]:{glyph:`turn`,status:AI_TASK_MESSAGES.status.yourTurn,tray:AI_TASK_MESSAGES.tray.yourTurn,chat:true,dot:true,actions:[action(AI_TASK_ACTIONS.FINISH,AI_TASK_MESSAGES.actions.finish,true)]},[AI_TASK_REASONS.AI_STUCK]:{status:AI_TASK_MESSAGES.status.aiStuck,chat:true,actions:[action(AI_TASK_ACTIONS.END,AI_TASK_MESSAGES.actions.endNotDone),action(AI_TASK_ACTIONS.OPEN_CHAT,AI_TASK_MESSAGES.actions.openChat,true)]},[AI_TASK_REASONS.CHECK_STUCK]:{check:true,diagnostic:true,actions:[OPEN_CHAT,CHECK_NOW]},[AI_TASK_REASONS.NO_RESULT]:{status:AI_TASK_MESSAGES.status.noResult,actions:[OPEN_CHAT,CHECK_NOW]},[AI_TASK_REASONS.STOPPED]:{status:AI_TASK_MESSAGES.status.stopped,actions:[OPEN_CHAT,CONTINUE]},[AI_TASK_REASONS.AI_UNAVAILABLE]:{status:AI_TASK_MESSAGES.status.aiUnavailable,note:AI_TASK_MESSAGES.progress.unavailable,actions:[action(AI_TASK_ACTIONS.AI_SETUP,AI_TASK_MESSAGES.actions.aiSetup),CONTINUE]},[AI_TASK_REASONS.TURN_FAILED]:{status:AI_TASK_MESSAGES.status.turnFailed,actions:[OPEN_CHAT,CONTINUE]},[AI_TASK_REASONS.INTERRUPTED]:{status:AI_TASK_MESSAGES.status.interrupted,actions:[CONTINUE]},[AI_TASK_REASONS.UNCONFIRMED]:{status:AI_TASK_MESSAGES.status.unconfirmed,check:true,actions:[CHECK_NOW]},[AI_TASK_REASONS.DRAFT_WAITING]:{status:AI_TASK_MESSAGES.status.draftWaiting,chat:true,check:true,diagnostic:true,actions:[action(AI_TASK_ACTIONS.OPEN_CHAT,AI_TASK_MESSAGES.actions.openChat,true)]}});function stepsOf(task,needs){const[work,check]=task.steps;const counted=task.check.retryLimit>0?AI_TASK_MESSAGES.attempt(task.attempt,task.check.retryLimit):``;const ended=aiTaskEnded(task);const atCheck=task.phase===AI_TASK_PHASES.CHECKING||task.checkRunning||needs?.check===true;const passed=task.phase===AI_TASK_PHASES.DONE;const workState=passed||atCheck?`done`:ended?`failed`:`active`;const checkState=passed?`done`:needs?.check||ended&&atCheck?`failed`:atCheck?`active`:`pending`;const steps=[{label:work,state:workState,attempt:workState===`active`?counted:``}];if(check)steps.push({label:check,state:checkState,attempt:atCheck&&!ended?counted:``});return steps}function endedMessage(task,viewerId){if(task.message)return task.message;const by=task.endedBy;return by?.name&&by.id!==viewerId?AI_TASK_MESSAGES.cancelledBy(by.name,task.noun):AI_TASK_MESSAGES.cancelledByYou(task.noun)}function outcomeOf(task,viewerId){if(task.phase===AI_TASK_PHASES.DONE)return{heading:AI_TASK_MESSAGES.outcome.done,happened:task.message,report:task.report,next:``};return{heading:AI_TASK_MESSAGES.outcome.notDone,happened:endedMessage(task,viewerId),report:``,next:AI_TASK_MESSAGES.whatsNext()}}function runningStatus(task){if(task.phase===AI_TASK_PHASES.STARTING)return AI_TASK_MESSAGES.status.starting;if(task.phase===AI_TASK_PHASES.CANCELLING)return AI_TASK_MESSAGES.status.cancelling;if(task.phase===AI_TASK_PHASES.CHECKING)return task.waiting?task.message:task.check.label;return task.attempt>1?AI_TASK_MESSAGES.retrying(task.attempt,task.check.retryLimit):AI_TASK_MESSAGES.status.working}function noteOf(task,needs){if(task.phase===AI_TASK_PHASES.CANCELLING)return task.checkRunning?task.check.unstoppable:``;if(!needs)return``;return[needs.status&&task.message!==needs.status?task.message:``,needs.diagnostic&&!task.message.includes(task.diagnostic)?task.diagnostic:``,needs.note].filter(Boolean).join(` `)}function projectAiTask(task,{viewerId}){const ended=aiTaskEnded(task);const needs=task.phase===AI_TASK_PHASES.NEEDS_YOU?NEEDS_YOU[task.reason]:null;const whileAiWorks=task.phase===AI_TASK_PHASES.CHECKING&&task.waiting&&task.mainChatSince?task.check.whileAiWorks:null;const review=needs?.check&&task.reason===AI_TASK_REASONS.CHECK_STUCK&&task.conflictReview?[action(AI_TASK_ACTIONS.REVIEW,AI_TASK_MESSAGES.actions.review)]:[];const done=task.phase===AI_TASK_PHASES.DONE;const running=!ended&&!needs;return{glyph:done?`done`:ended?`not-done`:needs?needs.glyph||`attention`:`working`,status:done?AI_TASK_MESSAGES.outcome.done:ended?AI_TASK_MESSAGES.outcome.notDone:needs?needs.status||task.message:runningStatus(task),tray:done?AI_TASK_MESSAGES.tray.done:ended?AI_TASK_MESSAGES.tray.notDone:task.phase===AI_TASK_PHASES.CANCELLING?AI_TASK_MESSAGES.tray.cancelling:needs?needs.tray||AI_TASK_MESSAGES.tray.needsYou:task.tray,ended,chatDot:needs?.dot===true,opensOn:needs?.chat?`chat`:`progress`,composerOpen:Boolean(needs)||task.phase===AI_TASK_PHASES.WORKING,composerHint:task.reason===AI_TASK_REASONS.QUESTION?AI_TASK_MESSAGES.chat.answer:AI_TASK_MESSAGES.chat.message,note:whileAiWorks?`${AI_TASK_MESSAGES.mainChatSince(aiTaskTime(task.mainChatSince))} ${whileAiWorks.note}`:running&&task.phase!==AI_TASK_PHASES.CANCELLING?``:noteOf(task,needs),steps:stepsOf(task,needs),actions:needs?[...review,...needs.actions]:whileAiWorks?[action(AI_TASK_ACTIONS.WAIT_FOR_AI,AI_TASK_MESSAGES.actions.waitForAi),action(AI_TASK_ACTIONS.RUN_NOW,whileAiWorks.action,true)]:[],cancelQuestion:AI_TASK_MESSAGES.cancelQuestion(task.noun),outcome:ended?outcomeOf(task,viewerId):null}}function aiTaskFooterActions(actions,view){if(view!==`chat`)return actions;return actions.filter(({id})=>id!==AI_TASK_ACTIONS.ANSWER&&id!==AI_TASK_ACTIONS.OPEN_CHAT)}function aiTaskTime(at){const date=new Date(at);return Number.isNaN(date.getTime())?``:date.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}var SESSION_CHANGED_EVENT=`vibe64.session.changed`;var AI_TASK_CHANGED=`ai-task-changed`;function useAiTasks({sessionId,sessionsApiPath,projectSlug,enabled,request,onClosed}){const task=shallowRef(null);const loaded=ref(false);const error=ref(``);const cancelRequested=ref(false);const closing=ref(false);const starting=ref(false);const viewerId=ref(``);let readGeneration=0;const tasksPath=()=>`${toValue(sessionsApiPath)}/${encodeURIComponent(toValue(sessionId))}/ai-tasks`;const taskPath=(suffix=``)=>`${tasksPath()}/${encodeURIComponent(task.value.id)}${suffix}`;function remember(next){if(task.value?.id===next.id&&next.revision<task.value.revision)return;task.value=next}async function load(){const generation=++readGeneration;if(!toValue(enabled)||!toValue(sessionId))return;try{const{tasks,viewerId:viewer}=await request(tasksPath(),{method:`GET`});if(generation!==readGeneration)return;viewerId.value=viewer;const[saved=null]=tasks;if(saved)remember(saved);else task.value=null;loaded.value=true}catch{}}async function start(kind,input){error.value=``;starting.value=true;try{const answer=await request(tasksPath(),{method:`POST`,body:{kind,input}});remember(answer.task);return answer.task}catch(failure){error.value=failure.message||AI_TASK_MESSAGES.requestFailed;return null}finally{starting.value=false}}async function act(suffix,body={}){error.value=``;try{remember((await request(taskPath(suffix),{method:`POST`,body})).task)}catch(failure){error.value=failure.message||AI_TASK_MESSAGES.requestFailed;load()}}async function cancel(){cancelRequested.value=true;await act(`/cancel`);cancelRequested.value=false}const check=(input={})=>act(`/check`,input);const continueTask=()=>act(`/continue`);const finish=()=>act(`/finish`);async function close(){error.value=``;closing.value=true;try{await request(taskPath(),{method:`DELETE`});task.value=null}catch{error.value=AI_TASK_MESSAGES.closeFailed}finally{closing.value=false}}const matchesSession=payload=>payload.projectSlug===toValue(projectSlug)&&payload.sessionId===toValue(sessionId)&&payload.reason===AI_TASK_CHANGED;useRealtimeEvent({enabled:computed(()=>toValue(enabled)),event:SESSION_CHANGED_EVENT,matches:({payload={}}={})=>matchesSession(payload),onEvent({payload}){if(payload.aiTask){remember(payload.aiTask);return}if(payload.aiTaskClosed?.id!==task.value?.id)return;const closedHere=closing.value;task.value=null;if(!closedHere)onClosed(payload.aiTaskClosed)}});useRealtimeEvent({enabled:computed(()=>toValue(enabled)),event:`connect`,onEvent:()=>void load()});watch(()=>[toValue(sessionId),toValue(enabled)],([,on],previous)=>{if(previous?.[0]!==toValue(sessionId)){task.value=null;loaded.value=false}if(on)load()},{immediate:true});return{cancel,cancelRequested,check,close,closing,continueTask,error,finish,load,loaded,start,starting,task,viewerId}}var WINDOW_QUERY=`aiTask`;function useAiTaskWindow({task,loaded,active,opensOn,route,router}){const view=ref(`progress`);const transcriptOpen=ref(false);let opener=null;const wanted=computed(()=>String(route.query[WINDOW_QUERY]||``));const open=computed(()=>toValue(active)&&Boolean(wanted.value)&&toValue(task)?.id===wanted.value);function withoutWindow(){const{[WINDOW_QUERY]:_taskId,...query}=route.query;return{path:route.path,query,hash:route.hash}}async function show(element=null){const current=toValue(task);if(!current)return;opener=element;if(open.value)return;await router.push({path:route.path,query:{...route.query,[WINDOW_QUERY]:current.id},hash:route.hash})}function hide(){if(wanted.value)router.replace(withoutWindow())}function setView(next){view.value=next}watch(open,isOpen=>{if(!isOpen)return;view.value=toValue(opensOn);transcriptOpen.value=false},{immediate:true});watch(()=>[wanted.value,toValue(loaded),toValue(task)?.id,toValue(active)],()=>{if(wanted.value&&toValue(active)&&toValue(loaded)&&toValue(task)?.id!==wanted.value)router.replace(withoutWindow())},{immediate:true});return{hide,open,opener:()=>opener?.isConnected?opener:null,setView,show,transcriptOpen,view}}function useAiTaskHost({sessionId,sessionsApiPath,projectSlug,enabled,active,request,route,router,openAiSetup,reviewResolved,fallbackFocus}){const toast=ref(null);const tasks=useAiTasks({sessionId,sessionsApiPath,projectSlug,enabled,request,onClosed(closed){const heading=closed.phase===`done`?AI_TASK_MESSAGES.outcome.done:AI_TASK_MESSAGES.outcome.notDone;toast.value={text:AI_TASK_MESSAGES.toast(closed.title,heading),action:false}}});const projection=computed(()=>tasks.task.value&&projectAiTask(tasks.task.value,{viewerId:tasks.viewerId.value}));const taskWindow=useAiTaskWindow({task:tasks.task,loaded:tasks.loaded,active,opensOn:()=>projection.value?.opensOn||`progress`,route,router});function returnFocusTarget(){return taskWindow.opener()||document.querySelector(`[data-vibe64-ai-task-tray]`)||fallbackFocus()}async function start(kind,opener,input){const task=await tasks.start(kind,input);if(task)await nextTick();if(task)taskWindow.show(opener);else toast.value={text:tasks.error.value,action:false};return task}async function close(){const target=returnFocusTarget();await tasks.close();if(tasks.task.value)return;taskWindow.hide();await nextTick();(target?.isConnected?target:fallbackFocus())?.focus({preventScroll:true})}async function waitForAi(){taskWindow.hide();await nextTick();fallbackFocus()?.focus({preventScroll:true})}function run(actionId){const{task}=tasks;if(actionId===AI_TASK_ACTIONS.ANSWER||actionId===AI_TASK_ACTIONS.OPEN_CHAT)taskWindow.setView(`chat`);else if(actionId===AI_TASK_ACTIONS.CHECK)tasks.check();else if(actionId===AI_TASK_ACTIONS.RUN_NOW)tasks.check({whileAiWorks:true});else if(actionId===AI_TASK_ACTIONS.WAIT_FOR_AI)waitForAi();else if(actionId===AI_TASK_ACTIONS.CONTINUE)tasks.continueTask();else if(actionId===AI_TASK_ACTIONS.FINISH)tasks.finish();else if(actionId===AI_TASK_ACTIONS.END)tasks.cancel();else if(actionId===AI_TASK_ACTIONS.AI_SETUP)openAiSetup();else if(actionId===AI_TASK_ACTIONS.REVIEW&&task.value)reviewResolved()}function seeToastResult(){toast.value=null;taskWindow.show(null)}watch(()=>tasks.task.value&&aiTaskEnded(tasks.task.value),(ended,wasEnded)=>{if(!ended||wasEnded!==false||taskWindow.open.value||!toValue(active))return;toast.value={text:AI_TASK_MESSAGES.toast(tasks.task.value.title,projection.value.outcome.heading),action:true}});return reactive({cancel:tasks.cancel,cancelRequested:tasks.cancelRequested,check:tasks.check,close,closing:tasks.closing,error:tasks.error,hide:taskWindow.hide,open:taskWindow.open,projection,returnFocusTarget,run,seeToastResult,setTranscript:open=>{taskWindow.transcriptOpen.value=open},setView:taskWindow.setView,show:taskWindow.show,start,starting:tasks.starting,task:tasks.task,toast,transcriptOpen:taskWindow.transcriptOpen,view:taskWindow.view})}var _sfc_main$4={__name:`Vibe64AiTaskButton`,props:{kind:{required:true,type:String},allowed:{required:true,type:Boolean},title:{required:true,type:String},input:{required:true,type:Object}},emits:[`done`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const tasks=inject(VIBE64_AI_TASKS_KEY);const own=computed(()=>tasks.task?.kind===props.kind?tasks.task:null);const linked=computed(()=>Boolean(own.value));const label=computed(()=>{if(tasks.starting)return AI_TASK_MESSAGES.button.opening;if(!own.value)return AI_TASK_MESSAGES.button.fix;return tasks.projection.ended?AI_TASK_MESSAGES.button.result:AI_TASK_MESSAGES.button.busy});const disabled=computed(()=>!own.value&&(!props.allowed||tasks.starting));watch(()=>own.value?.phase===AI_TASK_PHASES.DONE?own.value.id:``,doneId=>{if(doneId)emit(`done`)});function activate(event){const opener=event.currentTarget;if(own.value)tasks.show(opener);else tasks.start(props.kind,opener,props.input)}return(_ctx,_cache)=>{return openBlock(),createBlock(VBtn,{"aria-busy":label.value===unref(AI_TASK_MESSAGES).button.opening?`true`:void 0,class:`vibe64-ai-task-button`,"data-vibe64-ai-task-button":``,disabled:disabled.value,"prepend-icon":`$smartToy`,size:`small`,title:__props.title,type:`button`,variant:`tonal`,onClick:activate},createSlots({default:withCtx(()=>[createTextVNode(toDisplayString(label.value)+` `,1)]),_:2},[linked.value?{name:`append`,fn:withCtx(()=>[createVNode(VIcon,{icon:`$arrowForward`,size:`16`,"aria-hidden":`true`})]),key:`0`}:void 0]),1032,[`aria-busy`,`disabled`,`title`])}}};var Vibe64AiTaskButton_default=_plugin_vue_export_helper_default(_sfc_main$4,[[`__scopeId`,`data-v-2233af9d`]]);var _hoisted_1$3=[`aria-label`,`title`];var _hoisted_2$3={class:`vibe64-ai-task-tray__label`};var _sfc_main$3={__name:`Vibe64AiTaskTray`,setup(__props){const tasks=inject(VIBE64_AI_TASKS_KEY);const glyphIcons={attention:`$errorFilled`,done:`$checkCircleFilled`,"not-done":`$cancel`,turn:`$circle`};return(_ctx,_cache)=>{return openBlock(),createElementBlock(`button`,{"aria-label":`${unref(tasks).task.title}: ${unref(tasks).projection.tray}`,class:normalizeClass([`vibe64-ai-task-tray`,`vibe64-ai-task-tray--${unref(tasks).projection.glyph}`]),"data-vibe64-ai-task-tray":``,title:unref(tasks).projection.tray,type:`button`,onClick:_cache[0]||(_cache[0]=$event=>unref(tasks).show($event.currentTarget))},[unref(tasks).projection.glyph===`working`?(openBlock(),createBlock(VProgressCircular,{key:0,indeterminate:``,size:`16`,width:`2`,"aria-hidden":`true`})):(openBlock(),createBlock(VIcon,{key:1,icon:glyphIcons[unref(tasks).projection.glyph],size:`18`,"aria-hidden":`true`},null,8,[`icon`])),createBaseVNode(`span`,_hoisted_2$3,toDisplayString(unref(tasks).projection.tray),1)],10,_hoisted_1$3)}}};var Vibe64AiTaskTray_default=_plugin_vue_export_helper_default(_sfc_main$3,[[`__scopeId`,`data-v-56857b35`]]);var PHONE_WIDTH=600;var SHORT_HEIGHT=560;var EXPANDED_WIDTH=960;function aiTaskFit(width,height){const phone=width<PHONE_WIDTH;if(phone||height<SHORT_HEIGHT)return{fullscreen:true,phone,width:void 0,height:void 0};return width<EXPANDED_WIDTH?{fullscreen:false,phone,width:`min(92vw, 46rem)`,height:`88dvh`}:{fullscreen:false,phone,width:`46rem`,height:`min(80dvh, 46rem)`}}var REDUCED_MOTION=`(prefers-reduced-motion: reduce)`;function useAiTaskFocus({title,views,selectedView,setView,returnFocusTarget}){const tabElements=new Map;const motionQuery=globalThis.matchMedia(REDUCED_MOTION);const reducedMotion=ref(motionQuery.matches);const noteMotion=event=>{reducedMotion.value=event.matches};motionQuery.addEventListener(`change`,noteMotion);onScopeDispose(()=>motionQuery.removeEventListener(`change`,noteMotion));function focusTitle(){title.value?.focus({preventScroll:true})}function returnFocus(){returnFocusTarget()?.focus({preventScroll:true})}function setTab(view,element){if(element)tabElements.set(view,element);else tabElements.delete(view)}async function moveBetweenViews(event){const index=views.indexOf(selectedView());const next={ArrowLeft:views[(index+views.length-1)%views.length],ArrowRight:views[(index+1)%views.length],End:views.at(-1),Home:views[0]}[event.key];if(!next)return;event.preventDefault();setView(next);await nextTick();tabElements.get(next)?.focus()}return{focusTitle,moveBetweenViews,reducedMotion,returnFocus,setTab}}var _hoisted_1$2={class:`ai-task-outcome`};var _hoisted_2$2={key:0};var _hoisted_3$2={key:1};var _sfc_main$2={__name:`Vibe64AiTaskOutcome`,props:{task:{required:true,type:Object},projection:{required:true,type:Object}},emits:[`see-conversation`],setup(__props,{emit:__emit}){const emit=__emit;return(_ctx,_cache)=>{return openBlock(),createElementBlock(`div`,_hoisted_1$2,[createBaseVNode(`section`,null,[createBaseVNode(`h3`,null,toDisplayString(unref(AI_TASK_MESSAGES).outcome.problem),1),createBaseVNode(`p`,null,[createVNode(unref(LongTextInlineParts_default),{text:__props.task.problem.summary},null,8,[`text`])])]),createBaseVNode(`section`,null,[createBaseVNode(`h3`,null,toDisplayString(unref(AI_TASK_MESSAGES).outcome.whatHappened),1),createBaseVNode(`p`,null,[createVNode(unref(LongTextInlineParts_default),{text:__props.projection.outcome.happened},null,8,[`text`])])]),__props.projection.outcome.report?(openBlock(),createElementBlock(`section`,_hoisted_2$2,[createBaseVNode(`h3`,null,toDisplayString(unref(AI_TASK_MESSAGES).outcome.whatTheAiDid),1),createBaseVNode(`p`,null,[createVNode(unref(LongTextInlineParts_default),{text:__props.projection.outcome.report},null,8,[`text`])])])):createCommentVNode(``,true),__props.projection.outcome.next?(openBlock(),createElementBlock(`section`,_hoisted_3$2,[createBaseVNode(`h3`,null,toDisplayString(unref(AI_TASK_MESSAGES).outcome.whatsNext),1),createBaseVNode(`p`,null,toDisplayString(__props.projection.outcome.next),1)])):createCommentVNode(``,true),createVNode(VBtn,{class:`ai-task-outcome__conversation`,"data-vibe64-ai-task-transcript":``,variant:`text`,onClick:_cache[0]||(_cache[0]=$event=>emit(`see-conversation`))},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(AI_TASK_MESSAGES).outcome.seeConversation),1)]),_:1})])}}};var Vibe64AiTaskOutcome_default=_plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-a9609028`]]);var _hoisted_1$1={class:`ai-task-progress`};var _hoisted_2$1={class:`ai-task-progress__steps`};var _hoisted_3$1={class:`ai-task-progress__label`};var _hoisted_4$1={key:0,class:`ai-task-progress__attempt`};var _hoisted_5$1={key:0,class:`ai-task-progress__note`};var _hoisted_6$1={key:1,class:`ai-task-progress__output`};var _hoisted_7$1=[`aria-label`];var _hoisted_8$1={class:`ai-task-progress__heading`};var _hoisted_9$1=[`datetime`];var _sfc_main$1={__name:`Vibe64AiTaskProgress`,props:{task:{required:true,type:Object},projection:{required:true,type:Object},output:{required:true,type:Boolean},commentary:{required:true,type:Array}},setup(__props){const props=__props;const stepIcons={active:`$radioOn`,done:`$checkCircleFilled`,failed:`$cancel`,pending:`$circle`};const activity=computed(()=>[...props.task.log,...props.commentary].sort((a,b)=>a.at.localeCompare(b.at)));return(_ctx,_cache)=>{return openBlock(),createElementBlock(`div`,_hoisted_1$1,[createBaseVNode(`ol`,_hoisted_2$1,[(openBlock(true),createElementBlock(Fragment,null,renderList(__props.projection.steps,step=>{return openBlock(),createElementBlock(`li`,{key:step.label,class:normalizeClass([`ai-task-progress__step`,`ai-task-progress__step--${step.state}`])},[createVNode(VIcon,{icon:stepIcons[step.state],size:`18`,"aria-hidden":`true`},null,8,[`icon`]),createBaseVNode(`span`,_hoisted_3$1,toDisplayString(step.label),1),step.attempt?(openBlock(),createElementBlock(`span`,_hoisted_4$1,toDisplayString(step.attempt),1)):createCommentVNode(``,true)],2)}),128))]),__props.projection.note?(openBlock(),createElementBlock(`p`,_hoisted_5$1,[createVNode(unref(LongTextInlineParts_default),{text:__props.projection.note},null,8,[`text`])])):createCommentVNode(``,true),_ctx.$slots[`check-output`]&&__props.output?(openBlock(),createElementBlock(`details`,_hoisted_6$1,[createBaseVNode(`summary`,null,toDisplayString(__props.task.check.output),1),renderSlot(_ctx.$slots,`check-output`,{},void 0,true)])):createCommentVNode(``,true),createBaseVNode(`section`,{class:`ai-task-progress__activity`,"aria-label":unref(AI_TASK_MESSAGES).progress.activity},[createBaseVNode(`h3`,_hoisted_8$1,toDisplayString(unref(AI_TASK_MESSAGES).progress.activity),1),createBaseVNode(`ol`,null,[(openBlock(true),createElementBlock(Fragment,null,renderList(activity.value,entry=>{return openBlock(),createElementBlock(`li`,{key:`${entry.at}:${entry.text}`},[createBaseVNode(`time`,{datetime:entry.at},toDisplayString(unref(aiTaskTime)(entry.at)),9,_hoisted_9$1),createBaseVNode(`span`,null,toDisplayString(entry.text),1)])}),128))])],8,_hoisted_7$1)])}}};var Vibe64AiTaskProgress_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-8b486df1`]]);var _hoisted_1=[`aria-labelledby`,`data-vibe64-ai-task-phase`,`data-vibe64-ai-task-reason`];var _hoisted_2={class:`ai-task__header`};var _hoisted_3={class:`ai-task__heading`};var _hoisted_4=[`id`];var _hoisted_5={"aria-live":`polite`,class:`ai-task__status`,"data-vibe64-ai-task-status":``};var _hoisted_6={key:0,class:`ai-task__commands`};var _hoisted_7={class:`ai-task__problem`};var _hoisted_8=[`title`];var _hoisted_9=[`aria-expanded`,`aria-label`];var _hoisted_10={class:`ai-task__details-word`};var _hoisted_11={key:0,class:`ai-task__details`,"data-vibe64-ai-task-details-text":``,tabindex:`0`};var _hoisted_12=[`aria-label`];var _hoisted_13=[`id`,`aria-controls`,`aria-selected`,`data-vibe64-ai-task-view`,`tabindex`,`onClick`];var _hoisted_14=[`aria-label`];var _hoisted_15={class:`ai-task__body`};var _hoisted_16=[`id`,`aria-labelledby`];var _hoisted_17=[`id`,`aria-labelledby`,`role`];var _hoisted_18={key:1,class:`ai-task__error`,role:`alert`};var _hoisted_19={key:2,class:`ai-task__footer ai-task__footer--question`};var _hoisted_20={class:`ai-task__actions`};var _hoisted_21={key:3,class:`ai-task__footer`};var _hoisted_22={class:`ai-task__actions`};var _hoisted_23={key:4,class:`ai-task__footer`};var _hoisted_24={class:`ai-task__actions`};var _sfc_main={__name:`Vibe64AiTaskWindow`,props:{source:{required:true,type:Object},commentary:{required:true,type:Array},output:{required:true,type:Boolean}},setup(__props){const props=__props;const glyphIcons={attention:`$errorFilled`,done:`$checkCircleFilled`,"not-done":`$cancel`,turn:`$circle`};const titleId=useId();const title=ref(null);const task=computed(()=>props.source.task);const projection=computed(()=>props.source.projection);const footerActions=computed(()=>aiTaskFooterActions(projection.value.actions,props.source.view));const{width,height}=useDisplay();const fit=computed(()=>aiTaskFit(width.value,height.value));const detailsOpen=ref(false);const confirmingCancel=ref(false);const cancelling=computed(()=>props.source.cancelRequested||task.value.phase===`cancelling`);const tabs=[{id:`progress`,label:AI_TASK_MESSAGES.views.progress},{id:`chat`,label:AI_TASK_MESSAGES.views.chat}];const{focusTitle,moveBetweenViews,reducedMotion,returnFocus,setTab}=useAiTaskFocus({title,views:tabs.map(tab=>tab.id),selectedView:()=>props.source.view,setView:view=>props.source.setView(view),returnFocusTarget:()=>props.source.returnFocusTarget()});function requestCancel(){if(cancelling.value)props.source.cancel();else confirmingCancel.value=true}function cancel(){confirmingCancel.value=false;props.source.cancel()}function escape(){if(projection.value.ended)props.source.close();else props.source.hide()}watch(()=>projection.value.ended,async ended=>{if(!ended)return;confirmingCancel.value=false;await nextTick();focusTitle()});return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"aria-labelledby":unref(titleId),fullscreen:fit.value.fullscreen,height:fit.value.height,"model-value":__props.source.open,"no-click-animation":``,persistent:``,width:fit.value.width,transition:unref(reducedMotion)?false:void 0,onAfterEnter:unref(focusTitle),onAfterLeave:unref(returnFocus),onKeydown:withKeys(withModifiers(escape,[`stop`,`prevent`]),[`esc`])},{default:withCtx(()=>[createBaseVNode(`section`,{"aria-labelledby":unref(titleId),class:normalizeClass([`ai-task`,{"ai-task--fullscreen":fit.value.fullscreen,"ai-task--ended":projection.value.ended}]),"data-vibe64-ai-task":``,"data-vibe64-ai-task-phase":task.value.phase,"data-vibe64-ai-task-reason":task.value.reason},[createBaseVNode(`header`,_hoisted_2,[createBaseVNode(`span`,{class:normalizeClass([`ai-task__glyph`,`ai-task__glyph--${projection.value.glyph}`]),"aria-hidden":`true`},[projection.value.glyph===`working`?(openBlock(),createBlock(VProgressCircular,{key:0,indeterminate:!unref(reducedMotion),"model-value":unref(reducedMotion)?60:void 0,size:`20`,width:`2`},null,8,[`indeterminate`,`model-value`])):(openBlock(),createBlock(VIcon,{key:1,icon:glyphIcons[projection.value.glyph],size:`22`},null,8,[`icon`]))],2),createBaseVNode(`div`,_hoisted_3,[createBaseVNode(`h2`,{id:unref(titleId),ref_key:`title`,ref:title,tabindex:`-1`},toDisplayString(projection.value.ended?projection.value.outcome.heading:task.value.title),9,_hoisted_4),createBaseVNode(`p`,_hoisted_5,[projection.value.ended?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(task.value.title),1)],64)):(openBlock(),createBlock(unref(LongTextInlineParts_default),{key:1,text:projection.value.status},null,8,[`text`]))])]),!projection.value.ended?(openBlock(),createElementBlock(`div`,_hoisted_6,[createVNode(VBtn,{"data-vibe64-ai-task-hide":``,variant:`text`,onClick:__props.source.hide},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(AI_TASK_MESSAGES).actions.hide),1)]),_:1},8,[`onClick`]),createVNode(VBtn,{"aria-busy":cancelling.value?`true`:void 0,"data-vibe64-ai-task-cancel":``,variant:`text`,onClick:requestCancel},{default:withCtx(()=>[createTextVNode(toDisplayString(cancelling.value?unref(AI_TASK_MESSAGES).actions.cancelling:unref(AI_TASK_MESSAGES).actions.cancel),1)]),_:1},8,[`aria-busy`])])):createCommentVNode(``,true)]),!projection.value.ended?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`div`,_hoisted_7,[createBaseVNode(`span`,{class:`ai-task__problem-line`,title:task.value.problem.summary},[createVNode(unref(LongTextInlineParts_default),{text:task.value.problem.summary},null,8,[`text`])],8,_hoisted_8),task.value.problem.details?(openBlock(),createElementBlock(`button`,{key:0,"aria-expanded":detailsOpen.value?`true`:`false`,"aria-label":unref(AI_TASK_MESSAGES).actions.details,class:`ai-task__details-toggle`,"data-vibe64-ai-task-details":``,type:`button`,onClick:_cache[0]||(_cache[0]=$event=>detailsOpen.value=!detailsOpen.value)},[createBaseVNode(`span`,_hoisted_10,toDisplayString(unref(AI_TASK_MESSAGES).actions.details),1),createVNode(VIcon,{icon:detailsOpen.value?`$collapse`:`$expand`,size:`18`,"aria-hidden":`true`},null,8,[`icon`])],8,_hoisted_9)):createCommentVNode(``,true)]),detailsOpen.value?(openBlock(),createElementBlock(`pre`,_hoisted_11,toDisplayString(task.value.problem.details),1)):createCommentVNode(``,true),createBaseVNode(`div`,{"aria-label":unref(AI_TASK_MESSAGES).views.label,class:`ai-task__views`,role:`tablist`,onKeydown:_cache[1]||(_cache[1]=(...args)=>unref(moveBetweenViews)&&unref(moveBetweenViews)(...args))},[(openBlock(),createElementBlock(Fragment,null,renderList(tabs,tab=>{return createBaseVNode(`button`,{id:`${unref(titleId)}-${tab.id}-tab`,key:tab.id,ref_for:true,ref:element=>unref(setTab)(tab.id,element),"aria-controls":`${unref(titleId)}-${tab.id}`,"aria-selected":__props.source.view===tab.id?`true`:`false`,class:normalizeClass([`ai-task__view`,{"ai-task__view--selected":__props.source.view===tab.id}]),"data-vibe64-ai-task-view":tab.id,role:`tab`,tabindex:__props.source.view===tab.id?0:-1,type:`button`,onClick:$event=>__props.source.setView(tab.id)},[createTextVNode(toDisplayString(tab.label)+` `,1),tab.id===`chat`&&projection.value.chatDot?(openBlock(),createElementBlock(`span`,{key:0,class:`ai-task__dot`,role:`img`,"aria-label":unref(AI_TASK_MESSAGES).views.waiting},null,8,_hoisted_14)):createCommentVNode(``,true)],10,_hoisted_13)}),64))],40,_hoisted_12)],64)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_15,[!projection.value.ended?withDirectives((openBlock(),createElementBlock(`section`,{key:0,id:`${unref(titleId)}-progress`,"aria-labelledby":`${unref(titleId)}-progress-tab`,class:`ai-task__panel`,role:`tabpanel`},[createVNode(Vibe64AiTaskProgress_default,{commentary:__props.commentary,output:__props.output,projection:projection.value,task:task.value},{"check-output":withCtx(()=>[renderSlot(_ctx.$slots,`check-output`,{},void 0,true)]),_:3},8,[`commentary`,`output`,`projection`,`task`])],8,_hoisted_16)),[[vShow,__props.source.view===`progress`]]):!__props.source.transcriptOpen?(openBlock(),createBlock(Vibe64AiTaskOutcome_default,{key:1,projection:projection.value,task:task.value,onSeeConversation:_cache[2]||(_cache[2]=$event=>__props.source.setTranscript(true))},null,8,[`projection`,`task`])):createCommentVNode(``,true),withDirectives(createBaseVNode(`section`,{id:`${unref(titleId)}-chat`,"aria-labelledby":projection.value.ended?void 0:`${unref(titleId)}-chat-tab`,class:`ai-task__panel`,role:projection.value.ended?void 0:`tabpanel`},[renderSlot(_ctx.$slots,`chat`,{visible:__props.source.open&&(projection.value.ended?__props.source.transcriptOpen:__props.source.view===`chat`)},void 0,true)],8,_hoisted_17),[[vShow,!projection.value.ended?__props.source.view===`chat`:__props.source.transcriptOpen]])]),__props.source.error?(openBlock(),createElementBlock(`p`,_hoisted_18,toDisplayString(__props.source.error),1)):createCommentVNode(``,true),confirmingCancel.value?(openBlock(),createElementBlock(`footer`,_hoisted_19,[createBaseVNode(`p`,null,toDisplayString(projection.value.cancelQuestion),1),createBaseVNode(`div`,_hoisted_20,[createVNode(VBtn,{"data-vibe64-ai-task-keep-going":``,variant:`text`,onClick:_cache[3]||(_cache[3]=$event=>confirmingCancel.value=false)},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(AI_TASK_MESSAGES).actions.keepGoing),1)]),_:1}),createVNode(VBtn,{color:`error`,"data-vibe64-ai-task-cancel-confirm":``,variant:`flat`,onClick:cancel},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(AI_TASK_MESSAGES).cancelConfirm(task.value.noun)),1)]),_:1})])])):projection.value.ended?(openBlock(),createElementBlock(`footer`,_hoisted_21,[createBaseVNode(`div`,_hoisted_22,[__props.source.transcriptOpen?(openBlock(),createBlock(VBtn,{key:0,variant:`text`,onClick:_cache[4]||(_cache[4]=$event=>__props.source.setTranscript(false))},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(AI_TASK_MESSAGES).outcome.showResult),1)]),_:1})):createCommentVNode(``,true),createVNode(VBtn,{"aria-busy":__props.source.closing?`true`:void 0,color:`primary`,"data-vibe64-ai-task-close":``,variant:`flat`,onClick:__props.source.close},{default:withCtx(()=>[createTextVNode(toDisplayString(__props.source.closing?unref(AI_TASK_MESSAGES).actions.closing:unref(AI_TASK_MESSAGES).actions.close),1)]),_:1},8,[`aria-busy`,`onClick`])])])):footerActions.value.length?(openBlock(),createElementBlock(`footer`,_hoisted_23,[createBaseVNode(`div`,_hoisted_24,[(openBlock(true),createElementBlock(Fragment,null,renderList(footerActions.value,item=>{return openBlock(),createBlock(VBtn,{key:item.id,color:item.primary?`primary`:void 0,"data-vibe64-ai-task-action":item.id,variant:item.primary?`flat`:`text`,onClick:$event=>__props.source.run(item.id)},{default:withCtx(()=>[createTextVNode(toDisplayString(item.label),1)]),_:2},1032,[`color`,`data-vibe64-ai-task-action`,`variant`,`onClick`])}),128))])])):createCommentVNode(``,true)],10,_hoisted_1)]),_:3},8,[`aria-labelledby`,`fullscreen`,`height`,`model-value`,`width`,`transition`,`onAfterEnter`,`onAfterLeave`,`onKeydown`])}}};var Vibe64AiTaskWindow_default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-43823fc5`]]);var REPOSITORY_STATUS_SESSION_REASONS=new Set([`claude-stream-turn-idle`,`codex-app-server-turn-idle`,`opencode-server-turn-idle`,`repository-canonical-changed`,`session-pull-request`,`session-repository-checked`,`session-save-completed`,`session-save-failed`,`session-save-started`,`session-save-update-required`,`session-starter-applied`,`session-turn-checkpoint-failed`,`session-turn-checkpoint-updated`,`session-update-completed`,`session-update-failed`,`session-update-started`]);var REPOSITORY_UPDATE_CHECK_FAILED_REASON=`session-repository-check-failed`;var REPOSITORY_CANONICAL_RECHECK_REASONS=new Set([`repository-canonical-changed`,`session-pull-request`,`session-save-failed`,`session-save-update-required`,`session-update-failed`]);function repositoryStatusSessionId(payload={}){const event=normalizeObject(payload);return String(event.sessionId||event.session?.sessionId||``).trim()}function repositoryStatusRealtimeShouldRefresh(payload={}){return REPOSITORY_STATUS_SESSION_REASONS.has(String(normalizeObject(payload).reason||``).trim())}function repositoryStatusRealtimeNeedsCanonicalCheck(payload={}){return REPOSITORY_CANONICAL_RECHECK_REASONS.has(String(normalizeObject(payload).reason||``).trim())}export{Vibe64AiTaskWindow_default as a,useAiTaskHost as c,repositoryStatusSessionId as i,AI_TASK_PHASES as l,repositoryStatusRealtimeNeedsCanonicalCheck as n,Vibe64AiTaskTray_default as o,repositoryStatusRealtimeShouldRefresh as r,Vibe64AiTaskButton_default as s,REPOSITORY_UPDATE_CHECK_FAILED_REASON as t,VIBE64_AI_TASKS_KEY as u};
|
package/dist/assets/{vibe64RepositoryRealtime-ByZfq2fE.css → vibe64RepositoryRealtime-rnWlv9jw.css}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vibe64-ai-task-button[data-v-2233af9d]{white-space:normal;block-size:auto;min-block-size:1.75rem;min-inline-size:min(8.5rem,100%);max-inline-size:100%}.vibe64-ai-task-tray[data-v-56857b35]{background:rgba(var(--v-theme-primary), .12);color:rgb(var(--v-theme-on-surface));cursor:pointer;font:inherit;border:0;border-radius:999px;flex:0 auto;align-items:center;gap:.375rem;min-width:0;max-width:12rem;height:2rem;margin-inline-end:.25rem;padding-inline:.625rem .75rem;font-size:.8125rem;font-weight:600;display:inline-flex}.vibe64-ai-task-tray[data-v-56857b35]:focus-visible{outline:2px solid rgb(var(--v-theme-primary));outline-offset:2px}.vibe64-ai-task-tray__label[data-v-56857b35]{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.vibe64-ai-task-tray--working .v-progress-circular[data-v-56857b35]{color:rgb(var(--v-theme-primary))}.vibe64-ai-task-tray--attention[data-v-56857b35]{background:rgba(var(--v-theme-warning), .2)}.vibe64-ai-task-tray--attention .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-warning))}.vibe64-ai-task-tray--done[data-v-56857b35]{background:rgba(var(--v-theme-success), .16)}.vibe64-ai-task-tray--done .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-success))}.vibe64-ai-task-tray--not-done[data-v-56857b35]{background:rgba(var(--v-theme-error), .14)}.vibe64-ai-task-tray--not-done .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-error))}@media (width<=599px){.vibe64-ai-task-tray[data-v-56857b35]{justify-content:center;width:3rem;height:3rem;margin-inline-end:0;padding-inline:0}.vibe64-ai-task-tray__label[data-v-56857b35]{display:none}}@media (pointer:coarse){.vibe64-ai-task-tray[data-v-56857b35]{min-height:3rem}}.ai-task-outcome[data-v-bc318273]{overscroll-behavior:contain;align-content:start;justify-items:start;gap:1.25rem;height:100%;padding:1.25rem;display:grid;overflow-y:auto}.ai-task-outcome section[data-v-bc318273]{min-width:0}.ai-task-outcome h3[data-v-bc318273]{color:rgba(var(--v-theme-on-surface), .7);letter-spacing:.02em;margin:0 0 .25rem;font-size:.8125rem;font-weight:600}.ai-task-outcome p[data-v-bc318273]{overflow-wrap:anywhere;white-space:pre-line;margin:0}.ai-task-outcome__conversation[data-v-bc318273]{min-height:var(--ai-task-target,2.5rem);margin-inline-start:-.75rem}.ai-task-progress[data-v-1d71ea78]{overscroll-behavior:contain;align-content:start;gap:1rem;height:100%;padding:1rem 1.25rem;display:grid;overflow-y:auto}.ai-task-progress__steps[data-v-1d71ea78]{gap:.5rem;margin:0;padding:0;list-style:none;display:grid}.ai-task-progress__step[data-v-1d71ea78]{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:.625rem;display:grid}.ai-task-progress__step--pending[data-v-1d71ea78]{color:rgba(var(--v-theme-on-surface), .6)}.ai-task-progress__step--active[data-v-1d71ea78]{color:rgb(var(--v-theme-primary));font-weight:600}.ai-task-progress__step--done .v-icon[data-v-1d71ea78]{color:rgb(var(--v-theme-success))}.ai-task-progress__step--failed .v-icon[data-v-1d71ea78]{color:rgb(var(--v-theme-error))}.ai-task-progress__label[data-v-1d71ea78]{color:rgb(var(--v-theme-on-surface));overflow-wrap:anywhere}.ai-task-progress__step--pending .ai-task-progress__label[data-v-1d71ea78]{color:inherit}.ai-task-progress__attempt[data-v-1d71ea78]{color:rgba(var(--v-theme-on-surface), .7);white-space:nowrap;font-size:.8125rem;font-weight:400}.ai-task-progress__note[data-v-1d71ea78]{overflow-wrap:anywhere;margin:0}.ai-task-progress__output summary[data-v-1d71ea78]{cursor:pointer;min-height:var(--ai-task-target,2.5rem);align-items:center;font-weight:600;display:flex}.ai-task-progress__heading[data-v-1d71ea78]{color:rgba(var(--v-theme-on-surface), .7);letter-spacing:.02em;margin:0 0 .375rem;font-size:.8125rem;font-weight:600}.ai-task-progress__activity ol[data-v-1d71ea78]{gap:.25rem;margin:0;padding:0;list-style:none;display:grid}.ai-task-progress__activity li[data-v-1d71ea78]{grid-template-columns:auto minmax(0,1fr);column-gap:.75rem;font-size:.875rem;display:grid}.ai-task-progress__activity time[data-v-1d71ea78]{color:rgba(var(--v-theme-on-surface), .7);font-variant-numeric:tabular-nums}.ai-task-progress__activity span[data-v-1d71ea78]{-webkit-line-clamp:3;line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@container ai-task (width<=30rem){.ai-task-progress[data-v-1d71ea78]{padding:.75rem 1rem}.ai-task-progress__step[data-v-1d71ea78]{grid-template-columns:auto minmax(0,1fr)}.ai-task-progress__attempt[data-v-1d71ea78]{white-space:normal;grid-column:2}}.ai-task[data-v-5f35de55]{--ai-task-target:2.5rem;background:rgb(var(--v-theme-surface));color:rgb(var(--v-theme-on-surface));border-radius:1rem;grid-template:"header""problem""details""views""body"minmax(0,1fr)"error""footer"/minmax(0,1fr);width:100%;height:100%;display:grid;overflow:hidden;container:ai-task/size}.ai-task--fullscreen[data-v-5f35de55]{padding-block-start:env(safe-area-inset-top);padding-block-end:env(safe-area-inset-bottom);padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);border-radius:0}.ai-task__header[data-v-5f35de55]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:header;align-items:center;column-gap:.625rem;min-width:0;padding:.75rem .75rem .75rem 1.25rem;display:flex}.ai-task--ended .ai-task__header[data-v-5f35de55]{padding-inline-end:1.25rem}.ai-task__glyph[data-v-5f35de55]{flex:none;justify-content:center;align-items:center;width:1.5rem;height:1.5rem;display:inline-flex}.ai-task__glyph--working[data-v-5f35de55]{color:rgb(var(--v-theme-primary))}.ai-task__glyph--attention[data-v-5f35de55]{color:rgb(var(--v-theme-warning))}.ai-task__glyph--turn[data-v-5f35de55]{color:rgb(var(--v-theme-primary))}.ai-task__glyph--done[data-v-5f35de55]{color:rgb(var(--v-theme-success))}.ai-task__glyph--not-done[data-v-5f35de55]{color:rgb(var(--v-theme-error))}.ai-task__heading[data-v-5f35de55]{flex:auto;min-width:0}.ai-task__heading h2[data-v-5f35de55]{overflow-wrap:anywhere;outline:none;margin:0;font-size:1.0625rem;font-weight:600;line-height:1.3}.ai-task__status[data-v-5f35de55]{color:rgba(var(--v-theme-on-surface), .72);overflow-wrap:anywhere;margin:0;font-size:.875rem;line-height:1.3}.ai-task__commands[data-v-5f35de55]{flex:none;align-items:center;gap:.125rem;display:flex}.ai-task__problem[data-v-5f35de55]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:problem;align-items:center;column-gap:.75rem;min-width:0;padding:.25rem .75rem .25rem 1.25rem;display:flex}.ai-task__problem-line[data-v-5f35de55]{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:.9375rem;overflow:hidden}.ai-task__details-toggle[data-v-5f35de55]{color:inherit;cursor:pointer;font:inherit;min-height:var(--ai-task-target);min-width:var(--ai-task-target);background:0 0;border:0;border-radius:.5rem;flex:none;justify-content:center;align-items:center;gap:.125rem;padding-inline:.5rem;font-size:.875rem;font-weight:500;display:inline-flex}.ai-task__details-toggle[data-v-5f35de55]:hover{background:rgba(var(--v-theme-on-surface), .06)}.ai-task__details-toggle[data-v-5f35de55]:focus-visible,.ai-task__view[data-v-5f35de55]:focus-visible,.ai-task__details[data-v-5f35de55]:focus-visible{outline:2px solid rgb(var(--v-theme-primary));outline-offset:-2px}.ai-task__details[data-v-5f35de55]{background:rgba(var(--v-theme-on-surface), .04);border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);overflow-wrap:anywhere;white-space:pre-wrap;grid-area:details;max-height:40cqh;margin:0;padding:.625rem 1.25rem;font-family:inherit;font-size:.875rem;overflow-y:auto}.ai-task__views[data-v-5f35de55]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:views;gap:.25rem;padding-inline:.75rem;display:flex}.ai-task__view[data-v-5f35de55]{border:0;color:rgba(var(--v-theme-on-surface), .72);cursor:pointer;font:inherit;min-height:var(--ai-task-target);background:0 0;border-block-end:2px solid #0000;justify-content:center;align-items:center;gap:.375rem;min-width:5rem;padding-inline:.75rem;font-size:.9375rem;font-weight:500;display:inline-flex}.ai-task__view[data-v-5f35de55]:hover{color:rgb(var(--v-theme-on-surface))}.ai-task__view--selected[data-v-5f35de55]{border-block-end-color:rgb(var(--v-theme-primary));color:rgb(var(--v-theme-on-surface));font-weight:600}.ai-task__dot[data-v-5f35de55]{background:rgb(var(--v-theme-warning));border-radius:50%;width:.5rem;height:.5rem;display:inline-block}.ai-task__body[data-v-5f35de55]{grid-area:body;min-width:0;min-height:0;position:relative}.ai-task__panel[data-v-5f35de55]{min-width:0;height:100%;min-height:0}.ai-task__error[data-v-5f35de55]{color:rgb(var(--v-theme-error));overflow-wrap:anywhere;grid-area:error;margin:0;padding:.5rem 1.25rem 0;font-size:.875rem}.ai-task__footer[data-v-5f35de55]{border-block-start:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:footer;gap:.5rem;padding:.625rem 1.25rem;display:grid}.ai-task__footer p[data-v-5f35de55]{overflow-wrap:anywhere;margin:0}.ai-task__actions[data-v-5f35de55]{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.ai-task__actions .v-btn[data-v-5f35de55]{max-width:100%}.ai-task__footer:not(.ai-task__footer--question) .ai-task__actions>.v-btn[data-v-5f35de55]:first-child:not(:last-child){margin-inline-end:auto}@media (pointer:coarse){.ai-task[data-v-5f35de55]{--ai-task-target:3rem}}@container ai-task (width<=30rem){.ai-task__header[data-v-5f35de55],.ai-task__problem[data-v-5f35de55]{padding-inline:1rem .5rem}.ai-task__details[data-v-5f35de55]{padding-inline:1rem}.ai-task__views[data-v-5f35de55]{padding-inline:.25rem}.ai-task__footer[data-v-5f35de55],.ai-task__error[data-v-5f35de55]{padding-inline:1rem}.ai-task__details-word[data-v-5f35de55]{display:none}}@media (height<=559px){.ai-task[data-v-5f35de55]{grid-template:"header header""problem views""details details""body body"minmax(0,1fr)"error error""footer footer"/minmax(0,1fr) auto}.ai-task__header[data-v-5f35de55]{min-height:var(--ai-task-target);border-block-end:0;padding-block:0}.ai-task__heading[data-v-5f35de55]{align-items:baseline;column-gap:.5rem;min-width:0;display:flex}.ai-task__heading h2[data-v-5f35de55]{white-space:nowrap;flex:none}.ai-task__status[data-v-5f35de55]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}.ai-task__status[data-v-5f35de55]:before{content:"· "}.ai-task__problem[data-v-5f35de55]{padding-block:0}.ai-task__views[data-v-5f35de55]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);padding-inline:0 .5rem}.ai-task__view[data-v-5f35de55]{min-width:0}@container ai-task (width<=30rem){.ai-task__heading[data-v-5f35de55]{display:block}.ai-task__status[data-v-5f35de55]:before{content:none}}}@media (prefers-reduced-motion:reduce){.ai-task__view[data-v-5f35de55],.ai-task__details-toggle[data-v-5f35de55]{transition:none}}
|
|
1
|
+
.vibe64-ai-task-button[data-v-2233af9d]{white-space:normal;block-size:auto;min-block-size:1.75rem;min-inline-size:min(8.5rem,100%);max-inline-size:100%}.vibe64-ai-task-tray[data-v-56857b35]{background:rgba(var(--v-theme-primary), .12);color:rgb(var(--v-theme-on-surface));cursor:pointer;font:inherit;border:0;border-radius:999px;flex:0 auto;align-items:center;gap:.375rem;min-width:0;max-width:12rem;height:2rem;margin-inline-end:.25rem;padding-inline:.625rem .75rem;font-size:.8125rem;font-weight:600;display:inline-flex}.vibe64-ai-task-tray[data-v-56857b35]:focus-visible{outline:2px solid rgb(var(--v-theme-primary));outline-offset:2px}.vibe64-ai-task-tray__label[data-v-56857b35]{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.vibe64-ai-task-tray--working .v-progress-circular[data-v-56857b35]{color:rgb(var(--v-theme-primary))}.vibe64-ai-task-tray--attention[data-v-56857b35]{background:rgba(var(--v-theme-warning), .2)}.vibe64-ai-task-tray--attention .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-warning))}.vibe64-ai-task-tray--done[data-v-56857b35]{background:rgba(var(--v-theme-success), .16)}.vibe64-ai-task-tray--done .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-success))}.vibe64-ai-task-tray--not-done[data-v-56857b35]{background:rgba(var(--v-theme-error), .14)}.vibe64-ai-task-tray--not-done .v-icon[data-v-56857b35]{color:rgb(var(--v-theme-error))}@media (width<=599px){.vibe64-ai-task-tray[data-v-56857b35]{justify-content:center;width:3rem;height:3rem;margin-inline-end:0;padding-inline:0}.vibe64-ai-task-tray__label[data-v-56857b35]{display:none}}@media (pointer:coarse){.vibe64-ai-task-tray[data-v-56857b35]{min-height:3rem}}.ai-task-outcome[data-v-a9609028]{overscroll-behavior:contain;align-content:start;justify-items:start;gap:1.25rem;height:100%;padding:1.25rem;display:grid;overflow-y:auto}.ai-task-outcome section[data-v-a9609028]{min-width:0}.ai-task-outcome h3[data-v-a9609028]{color:rgba(var(--v-theme-on-surface), .7);letter-spacing:.02em;margin:0 0 .25rem;font-size:.8125rem;font-weight:600}.ai-task-outcome p[data-v-a9609028]{overflow-wrap:anywhere;white-space:pre-line;margin:0}.ai-task-outcome__conversation[data-v-a9609028]{min-height:var(--ai-task-target,2.5rem);margin-inline-start:-.75rem}.ai-task-progress[data-v-8b486df1]{overscroll-behavior:contain;align-content:start;gap:1rem;height:100%;padding:1rem 1.25rem;display:grid;overflow-y:auto}.ai-task-progress__steps[data-v-8b486df1]{gap:.5rem;margin:0;padding:0;list-style:none;display:grid}.ai-task-progress__step[data-v-8b486df1]{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:.625rem;display:grid}.ai-task-progress__step--pending[data-v-8b486df1]{color:rgba(var(--v-theme-on-surface), .6)}.ai-task-progress__step--active[data-v-8b486df1]{color:rgb(var(--v-theme-primary));font-weight:600}.ai-task-progress__step--done .v-icon[data-v-8b486df1]{color:rgb(var(--v-theme-success))}.ai-task-progress__step--failed .v-icon[data-v-8b486df1]{color:rgb(var(--v-theme-error))}.ai-task-progress__label[data-v-8b486df1]{color:rgb(var(--v-theme-on-surface));overflow-wrap:anywhere}.ai-task-progress__step--pending .ai-task-progress__label[data-v-8b486df1]{color:inherit}.ai-task-progress__attempt[data-v-8b486df1]{color:rgba(var(--v-theme-on-surface), .7);white-space:nowrap;font-size:.8125rem;font-weight:400}.ai-task-progress__note[data-v-8b486df1]{overflow-wrap:anywhere;margin:0}.ai-task-progress__output summary[data-v-8b486df1]{cursor:pointer;min-height:var(--ai-task-target,2.5rem);align-items:center;font-weight:600;display:flex}.ai-task-progress__heading[data-v-8b486df1]{color:rgba(var(--v-theme-on-surface), .7);letter-spacing:.02em;margin:0 0 .375rem;font-size:.8125rem;font-weight:600}.ai-task-progress__activity ol[data-v-8b486df1]{gap:.25rem;margin:0;padding:0;list-style:none;display:grid}.ai-task-progress__activity li[data-v-8b486df1]{grid-template-columns:auto minmax(0,1fr);column-gap:.75rem;font-size:.875rem;display:grid}.ai-task-progress__activity time[data-v-8b486df1]{color:rgba(var(--v-theme-on-surface), .7);font-variant-numeric:tabular-nums}.ai-task-progress__activity span[data-v-8b486df1]{-webkit-line-clamp:3;line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}@container ai-task (width<=30rem){.ai-task-progress[data-v-8b486df1]{padding:.75rem 1rem}.ai-task-progress__step[data-v-8b486df1]{grid-template-columns:auto minmax(0,1fr)}.ai-task-progress__attempt[data-v-8b486df1]{white-space:normal;grid-column:2}}.ai-task[data-v-43823fc5]{--ai-task-target:2.5rem;background:rgb(var(--v-theme-surface));color:rgb(var(--v-theme-on-surface));border-radius:1rem;grid-template:"header""problem""details""views""body"minmax(0,1fr)"error""footer"/minmax(0,1fr);width:100%;height:100%;display:grid;overflow:hidden;container:ai-task/size}.ai-task--fullscreen[data-v-43823fc5]{padding-block-start:env(safe-area-inset-top);padding-block-end:env(safe-area-inset-bottom);padding-inline:env(safe-area-inset-left) env(safe-area-inset-right);border-radius:0}.ai-task__header[data-v-43823fc5]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:header;align-items:center;column-gap:.625rem;min-width:0;padding:.75rem .75rem .75rem 1.25rem;display:flex}.ai-task--ended .ai-task__header[data-v-43823fc5]{padding-inline-end:1.25rem}.ai-task__glyph[data-v-43823fc5]{flex:none;justify-content:center;align-items:center;width:1.5rem;height:1.5rem;display:inline-flex}.ai-task__glyph--working[data-v-43823fc5]{color:rgb(var(--v-theme-primary))}.ai-task__glyph--attention[data-v-43823fc5]{color:rgb(var(--v-theme-warning))}.ai-task__glyph--turn[data-v-43823fc5]{color:rgb(var(--v-theme-primary))}.ai-task__glyph--done[data-v-43823fc5]{color:rgb(var(--v-theme-success))}.ai-task__glyph--not-done[data-v-43823fc5]{color:rgb(var(--v-theme-error))}.ai-task__heading[data-v-43823fc5]{flex:auto;min-width:0}.ai-task__heading h2[data-v-43823fc5]{overflow-wrap:anywhere;outline:none;margin:0;font-size:1.0625rem;font-weight:600;line-height:1.3}.ai-task__status[data-v-43823fc5]{color:rgba(var(--v-theme-on-surface), .72);overflow-wrap:anywhere;margin:0;font-size:.875rem;line-height:1.3}.ai-task__commands[data-v-43823fc5]{flex:none;align-items:center;gap:.125rem;display:flex}.ai-task__problem[data-v-43823fc5]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:problem;align-items:center;column-gap:.75rem;min-width:0;padding:.25rem .75rem .25rem 1.25rem;display:flex}.ai-task__problem-line[data-v-43823fc5]{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-size:.9375rem;overflow:hidden}.ai-task__details-toggle[data-v-43823fc5]{color:inherit;cursor:pointer;font:inherit;min-height:var(--ai-task-target);min-width:var(--ai-task-target);background:0 0;border:0;border-radius:.5rem;flex:none;justify-content:center;align-items:center;gap:.125rem;padding-inline:.5rem;font-size:.875rem;font-weight:500;display:inline-flex}.ai-task__details-toggle[data-v-43823fc5]:hover{background:rgba(var(--v-theme-on-surface), .06)}.ai-task__details-toggle[data-v-43823fc5]:focus-visible,.ai-task__view[data-v-43823fc5]:focus-visible,.ai-task__details[data-v-43823fc5]:focus-visible{outline:2px solid rgb(var(--v-theme-primary));outline-offset:-2px}.ai-task__details[data-v-43823fc5]{background:rgba(var(--v-theme-on-surface), .04);border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);overflow-wrap:anywhere;white-space:pre-wrap;grid-area:details;max-height:40cqh;margin:0;padding:.625rem 1.25rem;font-family:inherit;font-size:.875rem;overflow-y:auto}.ai-task__views[data-v-43823fc5]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:views;gap:.25rem;padding-inline:.75rem;display:flex}.ai-task__view[data-v-43823fc5]{border:0;color:rgba(var(--v-theme-on-surface), .72);cursor:pointer;font:inherit;min-height:var(--ai-task-target);background:0 0;border-block-end:2px solid #0000;justify-content:center;align-items:center;gap:.375rem;min-width:5rem;padding-inline:.75rem;font-size:.9375rem;font-weight:500;display:inline-flex}.ai-task__view[data-v-43823fc5]:hover{color:rgb(var(--v-theme-on-surface))}.ai-task__view--selected[data-v-43823fc5]{border-block-end-color:rgb(var(--v-theme-primary));color:rgb(var(--v-theme-on-surface));font-weight:600}.ai-task__dot[data-v-43823fc5]{background:rgb(var(--v-theme-warning));border-radius:50%;width:.5rem;height:.5rem;display:inline-block}.ai-task__body[data-v-43823fc5]{grid-area:body;min-width:0;min-height:0;position:relative}.ai-task__panel[data-v-43823fc5]{min-width:0;height:100%;min-height:0}.ai-task__error[data-v-43823fc5]{color:rgb(var(--v-theme-error));overflow-wrap:anywhere;grid-area:error;margin:0;padding:.5rem 1.25rem 0;font-size:.875rem}.ai-task__footer[data-v-43823fc5]{border-block-start:1px solid rgba(var(--v-theme-on-surface), .12);grid-area:footer;gap:.5rem;padding:.625rem 1.25rem;display:grid}.ai-task__footer p[data-v-43823fc5]{overflow-wrap:anywhere;margin:0}.ai-task__actions[data-v-43823fc5]{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.ai-task__actions .v-btn[data-v-43823fc5]{max-width:100%}.ai-task__footer:not(.ai-task__footer--question) .ai-task__actions>.v-btn[data-v-43823fc5]:first-child:not(:last-child){margin-inline-end:auto}@media (pointer:coarse){.ai-task[data-v-43823fc5]{--ai-task-target:3rem}}@container ai-task (width<=30rem){.ai-task__header[data-v-43823fc5],.ai-task__problem[data-v-43823fc5]{padding-inline:1rem .5rem}.ai-task__details[data-v-43823fc5]{padding-inline:1rem}.ai-task__views[data-v-43823fc5]{padding-inline:.25rem}.ai-task__footer[data-v-43823fc5],.ai-task__error[data-v-43823fc5]{padding-inline:1rem}.ai-task__details-word[data-v-43823fc5]{display:none}}@media (height<=559px){.ai-task[data-v-43823fc5]{grid-template:"header header""problem views""details details""body body"minmax(0,1fr)"error error""footer footer"/minmax(0,1fr) auto}.ai-task__header[data-v-43823fc5]{min-height:var(--ai-task-target);border-block-end:0;padding-block:0}.ai-task__heading[data-v-43823fc5]{align-items:baseline;column-gap:.5rem;min-width:0;display:flex}.ai-task__heading h2[data-v-43823fc5]{white-space:nowrap;flex:none}.ai-task__status[data-v-43823fc5]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;overflow:hidden}.ai-task__status[data-v-43823fc5]:before{content:"· "}.ai-task__problem[data-v-43823fc5]{padding-block:0}.ai-task__views[data-v-43823fc5]{border-block-end:1px solid rgba(var(--v-theme-on-surface), .12);padding-inline:0 .5rem}.ai-task__view[data-v-43823fc5]{min-width:0}@container ai-task (width<=30rem){.ai-task__heading[data-v-43823fc5]{display:block}.ai-task__status[data-v-43823fc5]:before{content:none}}}@media (prefers-reduced-motion:reduce){.ai-task__view[data-v-43823fc5],.ai-task__details-toggle[data-v-43823fc5]{transition:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as unref,H as openBlock,N as nextTick,Xt as toDisplayString,b as createVNode,d as createBaseVNode,f as createBlock,i as Fragment,it as watch,m as createElementBlock,ot as withCtx,p as createCommentVNode,u as computed,vt as ref,y as createTextVNode}from"./runtime-core.esm-bundler-Bi1P1jMa.js";import{S as VIcon,_ as VProgressLinear}from"./VChip-D2IukBZw.js";import{t as useEndpointResource}from"./useEndpointResource-CmMwteuX.js";import{t as VSelect}from"./VSelect-Ch00dyiM.js";import{n as VAlert,t as VSkeletonLoader}from"./VSkeletonLoader-Bl9P5wdh.js";import{t as VTextField}from"./VTextField-B9R7EIjg.js";import{i as scopedDevelopmentApiUrl}from"./studioUrls-k_pQIuPs.js";import{l as requestVibe64AiOnboarding,y as useModelRouting}from"./client-BRcncaFt.js";import{t as VBtn}from"./VBtn-2vbH580C.js";import{t as VSheet}from"./VSheet-D5wAuyc2.js";import{t as VDialog}from"./VDialog-BCIrX462.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-BFqQSnAE.js";import{t as VSpacer}from"./VSpacer-GgPR_AzN.js";import{t as VSwitch}from"./VSwitch-DftK1EyR.js";import{t as VTextarea}from"./VTextarea-CMgyRNk-.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{t as _sfc_main$2}from"./SelectField-RGWl_ms9.js";import{t as useUiFeedback}from"./useUiFeedback-CWb6o71Z.js";import{t as readRefOrGetterValue}from"./vueRefOrGetterValue-y-4f_In7.js";import{L as vibe64SessionPath,k as vibe64RepositoryApiPath,o as VIBE64_SESSIONS_API_SUFFIX}from"./vibe64SessionRequestConfig-DVRCRAex.js";import{b as sameVibe64AssistantSelection,c as vibe64AssistantSelectionLabel}from"./shared-B6plZPQ_.js";import{A as requestVibe64AccountConnectionsDialog,O as Vibe64SessionAssistantMenu_default}from"./index-DAareKn3.js";import{a as vibe64SessionPullRequest,i as vibe64SessionDisplayTitle}from"./vibe64SessionViewModel-CQCds_jb.js";import{a as githubProjectRepositoryName,t as GITHUB_BODY_MAX_LENGTH}from"./vibe64GithubProject-CJneIo5O.js";var _hoisted_1$1={class:`d-flex align-center justify-space-between ga-2 pa-5 pb-2`};var _hoisted_2$1={class:`d-flex align-center ga-3`};var _hoisted_3$1={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$1={__name:`Vibe64CreatePullRequestDialog`,props:{modelValue:Boolean,dashboardContext:{required:true,type:Object}},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(()=>vibe64SessionPath(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.`)}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$1,[createBaseVNode(`div`,_hoisted_2$1,[createVNode(VIcon,{icon:`$callMerge`,color:`primary`}),_cache[6]||(_cache[6]=createBaseVNode(`h2`,{class:`text-title-large`},`Create pull request`,-1))]),createVNode(VBtn,{icon:`$close`,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,[`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$1,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 on-surface-variant 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:unref(GITHUB_BODY_MAX_LENGTH),disabled:pending.value,"hide-details":``},null,8,[`modelValue`,`maxlength`,`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 pushed`),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 publish the app.`)],-1))]),_:1}),createVNode(VCardActions,{class:`pa-5 pt-2`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{variant:`text`,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`,disabled:pending.value||!title.value.trim()||!destinationReview.value||__props.dashboardContext.sourceOperationsSuspended,"aria-busy":pending.value,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(pending.value?`Creating…`: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$1,[[`__scopeId`,`data-v-3f93a801`]]);var _hoisted_1={class:`vibe64-assistant-dialog__title-copy`};var _hoisted_2={class:`text-body-small`};var _hoisted_3={key:2,class:`vibe64-assistant-dialog__ai`};var _hoisted_4={class:`text-body-medium mb-0`};var _hoisted_5={key:3,class:`d-flex flex-column ga-2`};var _hoisted_6={key:0,class:`d-flex flex-column ga-3 mt-3`};var _hoisted_7={key:0,class:`text-body-small`,style:{"overflow-wrap":`anywhere`}};var _hoisted_8={key:0,class:`vibe64-assistant-dialog__progress`,role:`status`,"aria-live":`polite`};var _sfc_main={__name:`Vibe64AssistantSessionDialog`,props:{modelValue:Boolean,toolbar:{required:true,type:Object}},emits:[`created`,`update:model-value`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const routing=useModelRouting({enabled:computed(()=>props.modelValue),view:`main`});const mainSelection=routing.mainChatSelection;const openConnectionSettings=()=>requestVibe64AccountConnectionsDialog({section:`ai`});const canChooseSessionAi=computed(()=>routing.resource.data.value?.canConfigure===true);const sessionAi=ref(null);const customOpen=ref(false);const changeButton=ref(null);const aiSummary=computed(()=>sessionAi.value?`This session runs on: ${vibe64AssistantSelectionLabel(sessionAi.value)}`:`Runs on your main AI: ${vibe64AssistantSelectionLabel(mainSelection.value)}`);function openSessionAiChoice(){if(canChooseSessionAi.value&&!submitting.value)customOpen.value=true}function chooseSessionAi(selection){sessionAi.value=sameVibe64AssistantSelection(selection,mainSelection.value)?null:selection;return{ok:true}}function useMainAi(){sessionAi.value=null}function setUpAi(){close();requestVibe64AiOnboarding()}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(`${vibe64RepositoryApiPath(`/api${VIBE64_SESSIONS_API_SUFFIX}`)}/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(!mainSelection.value||submitting.value||!branchSelectionReady.value)return;let response;try{const options={};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(sessionAi.value||{},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=``;sessionAi.value=null;customOpen.value=false},{immediate:true});watch(submitting,async(running,wasRunning)=>{if(running||!wasRunning||!props.modelValue)return;await nextTick();const target=submitButton.value?.$el;if(target?.isConnected===true)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(()=>[createBaseVNode(`span`,_hoisted_1,[_cache[7]||(_cache[7]=createBaseVNode(`strong`,{class:`text-title-large`},`Start an AI session`,-1)),createBaseVNode(`small`,_hoisted_2,toDisplayString(sessionAi.value?`Starts in Custom. Choose Senior, Junior or Auto from chat.`:`Starts in Auto. Choose Senior or Junior from chat.`),1)]),createVNode(VBtn,{"aria-label":`Close AI session dialog`,disabled:submitting.value,icon:`$close`,title:`Close`,variant:`text`,onClick:close},null,8,[`disabled`])]),_:1}),createVNode(VCardText,{class:`vibe64-assistant-dialog__body`},{default:withCtx(()=>[unref(routing).resource.isInitialLoading.value?(openBlock(),createBlock(VSkeletonLoader,{key:0,type:`list-item-two-line`})):unref(routing).loadError.value?(openBlock(),createBlock(VAlert,{key:1,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(routing).loadError.value)+` `,1),createVNode(VBtn,{variant:`text`,onClick:_cache[0]||(_cache[0]=$event=>unref(routing).resource.reload())},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(`Try again`,-1)])]),_:1})]),_:1})):unref(mainSelection)?(openBlock(),createElementBlock(`div`,_hoisted_3,[createBaseVNode(`p`,_hoisted_4,[createTextVNode(toDisplayString(aiSummary.value)+` `,1),canChooseSessionAi.value?(openBlock(),createBlock(VBtn,{key:0,ref_key:`changeButton`,ref:changeButton,disabled:submitting.value,size:`small`,variant:`text`,onClick:openSessionAiChoice},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(` Change `,-1)])]),_:1},8,[`disabled`])):createCommentVNode(``,true),sessionAi.value?(openBlock(),createBlock(VBtn,{key:1,disabled:submitting.value,size:`small`,variant:`text`,onClick:useMainAi},{default:withCtx(()=>[..._cache[10]||(_cache[10]=[createTextVNode(`Use main AI`,-1)])]),_:1},8,[`disabled`])):createCommentVNode(``,true)]),createVNode(VBtn,{class:`vibe64-assistant-dialog__main-ai`,disabled:submitting.value,"prepend-icon":`$settings`,size:`small`,variant:`text`,onClick:openConnectionSettings},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(` Change main AI for all sessions `,-1)])]),_:1},8,[`disabled`])])):(openBlock(),createElementBlock(`div`,_hoisted_5,[_cache[13]||(_cache[13]=createBaseVNode(`strong`,null,`No AI is set up yet`,-1)),_cache[14]||(_cache[14]=createBaseVNode(`span`,{class:`text-body-small`},`Set up your AI, then come back to start a session.`,-1)),createVNode(VBtn,{color:`primary`,variant:`flat`,class:`align-self-start`,onClick:setUpAi},{default:withCtx(()=>[..._cache[12]||(_cache[12]=[createTextVNode(`Set up your AI`,-1)])]),_:1})])),branchSelectionAvailable.value?(openBlock(),createElementBlock(Fragment,{key:4},[createVNode(VSelect,{modelValue:branchMode.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$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_6,[createBranch.value?(openBlock(),createBlock(VTextField,{key:0,modelValue:newBranchName.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$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[3]||(_cache[3]=$event=>unref(branches).reload())},{default:withCtx(()=>[..._cache[15]||(_cache[15]=[createTextVNode(`Try again`,-1)])]),_:1})]),_:1})):(openBlock(),createElementBlock(Fragment,{key:3},[createVNode(unref(_sfc_main$2),{modelValue:branchName.value,"onUpdate:modelValue":_cache[4]||(_cache[4]=$event=>branchName.value=$event),items:unref(branches).data.value?.branches||[],loading:unref(branches).isLoading.value,"item-title":`name`,"item-value":`name`,label:createBranch.value?`Create from`:`Branch`,disabled:submitting.value,"hide-details":``},null,8,[`modelValue`,`items`,`loading`,`label`,`disabled`]),selectedBranch.value?(openBlock(),createElementBlock(`p`,_hoisted_7,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[16]||(_cache[16]=createBaseVNode(`p`,{class:`text-body-small`},`Publishing the app still uses the project branch.`,-1))],64))])):createCommentVNode(``,true)],64)):createCommentVNode(``,true)]),_:1}),submitting.value?(openBlock(),createElementBlock(`div`,_hoisted_8,[createVNode(VProgressLinear,{indeterminate:``,color:`primary`,rounded:``}),_cache[17]||(_cache[17]=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 repositories 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[18]||(_cache[18]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{ref_key:`submitButton`,ref:submitButton,"aria-busy":submitting.value?`true`:void 0,color:`primary`,disabled:!unref(mainSelection)||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}),createVNode(Vibe64SessionAssistantMenu_default,{modelValue:customOpen.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>customOpen.value=$event),target:changeButton.value?.$el||null,selection:sessionAi.value||unref(mainSelection),"can-configure":canChooseSessionAi.value,"changes-disabled":submitting.value,"save-selection":chooseSessionAi},null,8,[`modelValue`,`target`,`selection`,`can-configure`,`changes-disabled`])]),_:1})]),_:1},8,[`model-value`,`persistent`])}}};var Vibe64AssistantSessionDialog_default=_plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-2024d654`]]);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){target.focus({preventScroll:true});return document.activeElement===target}await new Promise(resolve=>{(globalThis.requestAnimationFrame||(callback=>setTimeout(callback,16)))(resolve)})}return false}export{Vibe64AssistantSessionDialog_default as n,Vibe64CreatePullRequestDialog_default as r,focusCreatedVibe64SessionTab as t};
|
package/dist/index.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<style>@layer vuetify-core.reset, vuetify-core.base, vuetify-components, vuetify-overrides, vuetify-utilities.theme-base, vuetify-utilities.typography, vuetify-utilities.helpers, vuetify-utilities.theme-background, vuetify-utilities.theme-foreground, vuetify-final.transitions, vuetify-final.trumps;</style>
|
|
5
|
-
<meta name="jskit-client-build" content="
|
|
5
|
+
<meta name="jskit-client-build" content="1f21f1c4ae6657a9">
|
|
6
6
|
|
|
7
7
|
<meta charset="UTF-8" />
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}, true);
|
|
25
25
|
</script>
|
|
26
26
|
<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>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-DAareKn3.js"></script>
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/runtime-core.esm-bundler-Bi1P1jMa.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/normalize-BD25VwNK.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/returnToPath-CILshEkc.js">
|
|
@@ -53,37 +53,34 @@
|
|
|
53
53
|
<link rel="modulepreload" crossorigin href="/assets/devtools-CN5uWJaH-_xug6686.js">
|
|
54
54
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-BvdcsxN9.js">
|
|
55
55
|
<link rel="modulepreload" crossorigin href="/assets/lazy-vXRXMwYF.js">
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/VOverlay-
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
59
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
60
|
-
<link rel="modulepreload" crossorigin href="/assets/VTextField-BMvaWVTN.js">
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/assets/VCheckboxBtn-6ebHAnh9.js">
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/VOverlay-EPzW7eVB.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/VMenu-Bql3E6DV.js">
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/VTextField-B9R7EIjg.js">
|
|
59
|
+
<link rel="modulepreload" crossorigin href="/assets/VCheckboxBtn-DDlYJnth.js">
|
|
62
60
|
<link rel="modulepreload" crossorigin href="/assets/VSheet-D5wAuyc2.js">
|
|
63
|
-
<link rel="modulepreload" crossorigin href="/assets/VSelect-
|
|
61
|
+
<link rel="modulepreload" crossorigin href="/assets/VSelect-Ch00dyiM.js">
|
|
64
62
|
<link rel="modulepreload" crossorigin href="/assets/VBtn-2vbH580C.js">
|
|
65
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
63
|
+
<link rel="modulepreload" crossorigin href="/assets/VSkeletonLoader-Bl9P5wdh.js">
|
|
66
64
|
<link rel="modulepreload" crossorigin href="/assets/vibe64AssistantHost-CyWUOG-F.js">
|
|
67
65
|
<link rel="modulepreload" crossorigin href="/assets/asyncModuleRecovery-BALhPqsY.js">
|
|
68
|
-
<link rel="modulepreload" crossorigin href="/assets/VDialog-
|
|
66
|
+
<link rel="modulepreload" crossorigin href="/assets/VDialog-BCIrX462.js">
|
|
69
67
|
<link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-DNW4j-dv.js">
|
|
70
68
|
<link rel="modulepreload" crossorigin href="/assets/browser-D8z6v6Ge.js">
|
|
71
69
|
<link rel="modulepreload" crossorigin href="/assets/StudioErrorNotice-CCT_T6mT.js">
|
|
72
70
|
<link rel="modulepreload" crossorigin href="/assets/browserLocalStorage-B4C7rHrs.js">
|
|
73
71
|
<link rel="modulepreload" crossorigin href="/assets/clipboard-CZs9aH3L.js">
|
|
74
|
-
<link rel="modulepreload" crossorigin href="/assets/useVibe64Learning-
|
|
72
|
+
<link rel="modulepreload" crossorigin href="/assets/useVibe64Learning-DiLAIKbI.js">
|
|
75
73
|
<link rel="modulepreload" crossorigin href="/assets/layout-B_cpKP4k.js">
|
|
76
74
|
<link rel="modulepreload" crossorigin href="/assets/errors-D17nJYne.js">
|
|
77
75
|
<link rel="modulepreload" crossorigin href="/assets/studioUrls-k_pQIuPs.js">
|
|
78
|
-
<link rel="modulepreload" crossorigin href="/assets/VAutocomplete-
|
|
79
|
-
<link rel="modulepreload" crossorigin href="/assets/VCheckbox-
|
|
76
|
+
<link rel="modulepreload" crossorigin href="/assets/VAutocomplete-BnpXAJGa.js">
|
|
77
|
+
<link rel="modulepreload" crossorigin href="/assets/VCheckbox-BK0ss4F4.js">
|
|
80
78
|
<link rel="modulepreload" crossorigin href="/assets/VCard-BFqQSnAE.js">
|
|
81
79
|
<link rel="modulepreload" crossorigin href="/assets/VRow-Dz87sIhY.js">
|
|
82
80
|
<link rel="modulepreload" crossorigin href="/assets/VSpacer-GgPR_AzN.js">
|
|
83
81
|
<link rel="modulepreload" crossorigin href="/assets/VExpansionPanels-BHw1Id_o.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/VRadioGroup-
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/VSwitch-DUkp5sfW.js">
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/VRadioGroup-CL3HTmyT.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/VSwitch-DftK1EyR.js">
|
|
87
84
|
<link rel="modulepreload" crossorigin href="/assets/pathname-JHQIKk21.js">
|
|
88
85
|
<link rel="modulepreload" crossorigin href="/assets/usePaths-CvUbx5-V.js">
|
|
89
86
|
<link rel="modulepreload" crossorigin href="/assets/useUiFeedback-CWb6o71Z.js">
|
|
@@ -93,27 +90,27 @@
|
|
|
93
90
|
<link rel="modulepreload" crossorigin href="/assets/shared-DjZEYqzW.js">
|
|
94
91
|
<link rel="modulepreload" crossorigin href="/assets/vibe64ApiResponses-DuJ9mfus.js">
|
|
95
92
|
<link rel="modulepreload" crossorigin href="/assets/studioGateApi-UqmdV50W.js">
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/client-
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/client-BRcncaFt.js">
|
|
97
94
|
<link rel="modulepreload" crossorigin href="/assets/client-4uCr4dYG.js">
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/VTextarea-
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/VTextarea-CMgyRNk-.js">
|
|
99
96
|
<link rel="modulepreload" crossorigin href="/assets/useAssistantAttachments-BkYZckgz.js">
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/conversation-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/SelectField-
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/thinkingText-mMYz6e03.js">
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/conversation-BoB7Drme.js">
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/SelectField-RGWl_ms9.js">
|
|
103
100
|
<link rel="modulepreload" crossorigin href="/assets/vueRefOrGetterValue-y-4f_In7.js">
|
|
104
101
|
<link rel="modulepreload" crossorigin href="/assets/vibe64BrowserTabOrigin-vIN_87mi.js">
|
|
105
102
|
<link rel="modulepreload" crossorigin href="/assets/vibe64SessionRequestConfig-DVRCRAex.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="/assets/conversation-D7T_us2O.js">
|
|
106
104
|
<link rel="modulepreload" crossorigin href="/assets/windowSizeClass-DQekxFgV.js">
|
|
107
105
|
<link rel="stylesheet" crossorigin href="/assets/VChip-4Nj-0ztL.css">
|
|
108
106
|
<link rel="stylesheet" crossorigin href="/assets/VOverlay-DG-PukqI.css">
|
|
109
|
-
<link rel="stylesheet" crossorigin href="/assets/
|
|
110
|
-
<link rel="stylesheet" crossorigin href="/assets/VMenu-9TUL6_ph.css">
|
|
107
|
+
<link rel="stylesheet" crossorigin href="/assets/VMenu-DCU7zd0B.css">
|
|
111
108
|
<link rel="stylesheet" crossorigin href="/assets/VTextField-F6unyhrS.css">
|
|
112
109
|
<link rel="stylesheet" crossorigin href="/assets/VCheckboxBtn-o1O5Bixh.css">
|
|
113
110
|
<link rel="stylesheet" crossorigin href="/assets/VSheet-BbLSwuzR.css">
|
|
114
111
|
<link rel="stylesheet" crossorigin href="/assets/VSelect-yFA6_y4G.css">
|
|
115
112
|
<link rel="stylesheet" crossorigin href="/assets/VBtn-C1plz3b1.css">
|
|
116
|
-
<link rel="stylesheet" crossorigin href="/assets/
|
|
113
|
+
<link rel="stylesheet" crossorigin href="/assets/VSkeletonLoader-DXZarZ9m.css">
|
|
117
114
|
<link rel="stylesheet" crossorigin href="/assets/VDialog-DP-kc9Gx.css">
|
|
118
115
|
<link rel="stylesheet" crossorigin href="/assets/StudioErrorNotice-CQfeUEOD.css">
|
|
119
116
|
<link rel="stylesheet" crossorigin href="/assets/useVibe64Learning-B9b7aUr-.css">
|
|
@@ -124,11 +121,10 @@
|
|
|
124
121
|
<link rel="stylesheet" crossorigin href="/assets/VSpacer-DfbUir7X.css">
|
|
125
122
|
<link rel="stylesheet" crossorigin href="/assets/VExpansionPanels-cvCWEkWz.css">
|
|
126
123
|
<link rel="stylesheet" crossorigin href="/assets/VRadioGroup-C9f4tbih.css">
|
|
127
|
-
<link rel="stylesheet" crossorigin href="/assets/VSkeletonLoader-LCPSxykp.css">
|
|
128
124
|
<link rel="stylesheet" crossorigin href="/assets/VSwitch-DAlld-JI.css">
|
|
129
125
|
<link rel="stylesheet" crossorigin href="/assets/client-CM6TGZc9.css">
|
|
130
126
|
<link rel="stylesheet" crossorigin href="/assets/VTextarea--uW4w6nq.css">
|
|
131
|
-
<link rel="stylesheet" crossorigin href="/assets/conversation-
|
|
127
|
+
<link rel="stylesheet" crossorigin href="/assets/conversation-BMyk8R_u.css">
|
|
132
128
|
<link rel="stylesheet" crossorigin href="/assets/index-Ctygjyf8.css">
|
|
133
129
|
</head>
|
|
134
130
|
<body>
|
|
@@ -34,7 +34,9 @@ the same at every size.
|
|
|
34
34
|
## What the window shows
|
|
35
35
|
|
|
36
36
|
The header names the fix and says, in one line, what is happening now. Below it,
|
|
37
|
-
the problem stays in view. Choose **Details** to read all of it.
|
|
37
|
+
the problem stays in view. Choose **Details** to read all of it. Names in the
|
|
38
|
+
problem, such as a Stack's `## Deployment` section, show as code, as they do in
|
|
39
|
+
Chat; hover the problem to see it as written.
|
|
38
40
|
|
|
39
41
|
Two views sit under the problem, and only one shows at a time:
|
|
40
42
|
|
|
@@ -97,9 +97,12 @@ authorise another turn. Colleague's watches treat Waiting as needing attention.
|
|
|
97
97
|
In Auto, Senior always does the finishing steps after implementation, even when
|
|
98
98
|
Senior implemented it or both roles use the same model: the review, Deslop and
|
|
99
99
|
[UI pass](ui-pass.md) the chat's **Chat settings** switches turn on, in one
|
|
100
|
-
Senior turn, then **Save**.
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
Senior turn, then **Save**. The implementation turns before it end by saying
|
|
101
|
+
what changed and what was checked, without asking you to try or publish the
|
|
102
|
+
work, and only that last turn ends normally; see [How each turn
|
|
103
|
+
ends](chat-settings.md#how-each-turn-ends). **Automatically review changes**,
|
|
104
|
+
**Automatically deslop changes**, **Automatically UI pass changes** and
|
|
105
|
+
**Automatically save changes** are all on for new chats. Each step a switch starts adds a notice
|
|
103
106
|
such as **Review started automatically (Chat settings: Automatically review
|
|
104
107
|
changes)**. Turning a switch off asks first and says what is lost; **Cancel**
|
|
105
108
|
keeps it on. When review, Deslop and the UI pass are all off, a handoff after
|
|
@@ -89,9 +89,29 @@ Each review covers everything changed since the last one, so a quick follow-up
|
|
|
89
89
|
is reviewed on its own, and work that stopped or waited before review is
|
|
90
90
|
included in the next.
|
|
91
91
|
|
|
92
|
+
A message you steer into a working turn, such as a status question, changes
|
|
93
|
+
none of this: the agent answers it and carries on, and when that turn finishes
|
|
94
|
+
the work the next step runs, then **Save**, as it would have without your message.
|
|
95
|
+
The same holds when the agent messages another session during the turn and the
|
|
96
|
+
chat shows that sent message before the agent's final reply.
|
|
97
|
+
|
|
92
98
|
With review, Deslop and the UI pass all off, finished work goes straight to
|
|
93
99
|
**Save** (when it is on) and the chat notes **Work finished.**
|
|
94
100
|
|
|
101
|
+
## How each turn ends
|
|
102
|
+
|
|
103
|
+
While review, Deslop or the UI pass is on, the work is not finished when the
|
|
104
|
+
agent stops implementing, so a turn that the finishing turn follows ends by
|
|
105
|
+
saying what it changed and what it checked. It does not ask you to try or
|
|
106
|
+
publish the work, and it offers no next steps. It may still say **Ready to
|
|
107
|
+
try** while its checks run, so you can try the change early. Only the last turn
|
|
108
|
+
of the piece of work ends normally: the finishing turn, or, with review, Deslop
|
|
109
|
+
and the UI pass all off, the turn that finished the work. A question the agent
|
|
110
|
+
only answers ends normally too. Every turn also knows how the work is saved:
|
|
111
|
+
with **Automatically save changes** on, the agent says it will be saved
|
|
112
|
+
automatically and never asks you to choose **Save**; with it off, it leaves
|
|
113
|
+
**Save** to you.
|
|
114
|
+
|
|
95
115
|
## What the chat shows
|
|
96
116
|
|
|
97
117
|
Each step that a switch starts adds a notice to the chat as it starts, for
|