mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-12 13:00:44 +08:00
feat: support per-bot workspace switching
This commit is contained in:
parent
adcace3512
commit
44dd50216a
64 changed files with 3878 additions and 712 deletions
|
|
@ -388,7 +388,14 @@ export class QqController {
|
|||
if (record.controller.signal.aborted) {
|
||||
await this.#stopRuntime(identity.botId);
|
||||
if (previousConfig) await this.#configStore.save(previousConfig).catch(() => undefined);
|
||||
else await this.#configStore.remove(identity.botId).catch(() => undefined);
|
||||
else {
|
||||
const removed = await this.#configStore.remove(identity.botId).catch(() => null);
|
||||
if (removed) {
|
||||
await this.#deleteState({ botId: identity.botId, config }).catch((cleanupError) => {
|
||||
this.#logger.warn?.('[dsh-im:qq] cancelled bot state cleanup failed:', cleanupError);
|
||||
});
|
||||
}
|
||||
}
|
||||
await this.#restoreCredential(identity.secretRef, previousSecret);
|
||||
throw error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue