feat(servers): bring linked-server sessions to parity with local

Add a read-only Source Control panel for linked servers backed by the OpenCode VCS API, broadcast remote events to every client, include recent linked-server sessions in Activity with per-server sidebar indicators, and enable the session picker, tool shortcuts, mobile activity, remote Skills panel and remote permission prompt titles.
This commit is contained in:
Chris Scott committed 2026-10-18 21:46:14 -04:00
1 parent 9ec2ed5903
commit 7874afdab9
38 files changed
+1506 -279

No files matched your search

+30
View File
@@ -37,6 +37,14 @@ export type OpenCodeLocationInfo = Awaited<ReturnType<OpenCodeApi['location']['g
export type OpenCodeProject = Awaited<ReturnType<OpenCodeApi['project']['list']>>[number]
export type VcsInfo = Awaited<ReturnType<OpenCodeApi['vcs']['get']>>['data']
export type VcsFileStatus = Awaited<ReturnType<OpenCodeApi['vcs']['status']>>['data'][number]
export type VcsFileDiff = Awaited<ReturnType<OpenCodeApi['vcs']['diff']>>['data'][number]
export type VcsDiffMode = 'working' | 'branch' | 'committed'
export interface SessionPage {
items: SessionInfo[]
nextCursor?: string
@@ -333,6 +341,28 @@ export async function listSkills(directory?: string, serverId?: string): Promise
return data
}
export async function getVcsInfo(directory: string, serverId?: string): Promise<VcsInfo> {
const { data } = await callOpenCode((api) => api.vcs.get(openCodeLocation(directory)), serverId)
return data
}
export async function listVcsStatus(directory: string, serverId?: string): Promise<VcsFileStatus[]> {
const { data } = await callOpenCode((api) => api.vcs.status(openCodeLocation(directory)), serverId)
return data
}
export async function getVcsDiff(
directory: string,
mode: VcsDiffMode,
serverId?: string,
): Promise<VcsFileDiff[]> {
const { data } = await callOpenCode(
(api) => api.vcs.diff({ ...openCodeLocation(directory), mode }),
serverId,
)
return data
}
export async function listPendingPermissions(
directory: string,
serverId?: string,