Q172: disconnecting a provider shows what it stops, then the outcome
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
059970e7e1
commit
538d834647
12 files changed
+170
-1
No files matched your search
@@ -18,6 +18,7 @@ export const platformContracts = {
|
||||
clearIntegrationKey: z.strictObject({ name: z.enum(INTEGRATION_KEY_NAMES) }) satisfies z.ZodType<C.ClearIntegrationKeyInput>,
|
||||
saveProviderCredential: z.strictObject({ orgId: id, providerId: id, secret: z.string(), model: z.string().nullable() }) satisfies z.ZodType<C.SaveProviderCredentialInput>,
|
||||
providerEndpoint: z.strictObject({ orgId: id, providerId: id }),
|
||||
providerDisconnectImpact: z.strictObject({ orgId: id, providerId: id }),
|
||||
setProviderModel: z.strictObject({ orgId: id, providerId: id, model: z.string().max(200) }) satisfies z.ZodType<C.SetProviderModelInput>,
|
||||
revokeProviderCredential: z.strictObject({ orgId: id, providerId: id }) satisfies z.ZodType<C.RevokeProviderCredentialInput>,
|
||||
startProviderOAuth: z.strictObject({
|
||||
|
||||
@@ -41,6 +41,7 @@ import { cancelQueuedRun } from "../services/run-cancel";
|
||||
import { runHistory } from "../services/run-history";
|
||||
import { deleteWorkspace, setPrimaryWorkspace, updateWorkspace } from "../services/workspace-admin";
|
||||
import { setProviderModel } from "../services/provider-default-model";
|
||||
import { providerDisconnectImpact } from "../services/provider-disconnect-impact";
|
||||
|
||||
export interface IpcDeps {
|
||||
connection: DatabaseConnection;
|
||||
@@ -233,6 +234,13 @@ export function registerIpcHandlers(deps: IpcDeps): void {
|
||||
return fail("provider_endpoint_failed", error instanceof Error ? error.message : String(error));
|
||||
}
|
||||
});
|
||||
handle("providerDisconnectImpact", (input) => {
|
||||
try {
|
||||
return ok(providerDisconnectImpact(deps.connection.db, input.orgId, input.providerId));
|
||||
} catch (error) {
|
||||
return fail("provider_impact_failed", error instanceof Error ? error.message : String(error));
|
||||
}
|
||||
});
|
||||
handle("setProviderModel", (input) => mutate(() => setProviderModel(deps.connection.db, input)));
|
||||
handle("revokeProviderCredential", async (input) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user