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:
Chris Scott committed 2026-11-05 16:32:43 -05:00
1 parent 64e87ba1ea
commit 6297403a41
41 files changed
+691

No files matched your search

+8
View File
@@ -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,
+4
View File
@@ -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;
}