fix: allow deleting system default sync channel with immediate heal
Remove hard ban that returned 400 with no UI feedback; delete then Ensure+rebinding, and show confirm/toast on SyncPage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -869,6 +869,8 @@ export type SyncChannel = {
|
||||
pk_columns: Record<string, string>;
|
||||
/** 绑定智能体:模块/库归属对照 */
|
||||
agent_id?: number;
|
||||
/** 公司默认同步通道(Z12) */
|
||||
is_system_default?: boolean;
|
||||
/** 绑定已发布模块 slug */
|
||||
app_slug?: string;
|
||||
last_error?: string;
|
||||
@@ -966,6 +968,16 @@ export async function deleteSyncChannel(session: Session, id: string) {
|
||||
});
|
||||
const data = await readJson(res);
|
||||
throwIfBad(res, data, "delete sync channel failed");
|
||||
return data as {
|
||||
ok?: boolean;
|
||||
deleted_id?: string;
|
||||
was_system_default?: boolean;
|
||||
recreated_default?: boolean;
|
||||
channel_id?: string;
|
||||
bindings_fixed?: number;
|
||||
agents_fixed?: number;
|
||||
heal_error?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export async function testSyncEndpoints(
|
||||
|
||||
Reference in New Issue
Block a user