Migrate UI to v2 SDK client

Use v2 OpencodeClient with normalized request handling and rehydrate pending permissions via GET /permission on instance hydration.
This commit is contained in:
Shantur Rathore
2026-01-04 22:01:49 +00:00
parent fcb5998474
commit 1377bc6b91
15 changed files with 186 additions and 117 deletions

View File

@@ -90,9 +90,9 @@ const InstanceServiceStatus: Component<InstanceServiceStatusProps> = (props) =>
setPendingMcpAction(serverName, action)
try {
if (shouldEnable) {
await client.mcp.connect({ path: { name: serverName } })
await client.mcp.connect({ name: serverName })
} else {
await client.mcp.disconnect({ path: { name: serverName } })
await client.mcp.disconnect({ name: serverName })
}
await refreshMetadata()
} catch (error) {