mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
docs: document the OpenCode client migration surfaces (OM-179)
Adds JSDoc comments to the functions this branch adds or changes, so the touched-code docstring coverage clears the review threshold. Comments only; no code, formatting or import changes.
This commit is contained in:
1 parent
64e87ba1ea
commit
6297403a41
41 files changed
+691
No files matched your search
@@ -191,6 +191,10 @@ function buildPromptFields(input: PromptFields) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches one page of sessions for the given list options and normalizes the
|
||||
* server cursor so the end of the list is `undefined` rather than null.
|
||||
*/
|
||||
export async function listSessionPage(input: SessionPageInput, serverId?: string): Promise<SessionPage> {
|
||||
const { data, cursor } = await callOpenCode((api) => api.session.list(input), serverId)
|
||||
return { items: data, nextCursor: cursor.next ?? undefined }
|
||||
@@ -519,6 +523,10 @@ export async function listPendingPermissions(
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Replies to a pending permission request with the user's decision, sending the
|
||||
* optional message only when one is supplied.
|
||||
*/
|
||||
export async function replyPermission(
|
||||
sessionID: string,
|
||||
requestID: string,
|
||||
|
||||
@@ -163,6 +163,10 @@ export async function toggleOpenCodeFavoriteModel(model: ModelSelection): Promis
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the model's display name, falling back to its ID when the catalog
|
||||
* provides no name.
|
||||
*/
|
||||
export function formatModelName(model: Model): string {
|
||||
return model.name || model.modelID;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user