mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
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:
1 parent
9ec2ed5903
commit
7874afdab9
38 files changed
+1506
-279
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user