mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-11 05:23:18 +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
|
|
@ -610,7 +610,12 @@ export class DingtalkController {
|
|||
await this.#stopRuntime(identity.botId);
|
||||
if (previousConfig) await this.#configStore.save(previousConfig).catch(() => undefined);
|
||||
else if (this.#configStore.get(identity.botId)) {
|
||||
await this.#configStore.remove(identity.botId).catch(() => undefined);
|
||||
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-dingtalk] failed to clean up cancelled bot state:', cleanupError);
|
||||
});
|
||||
}
|
||||
}
|
||||
await this.#restoreCredential(identity.secretRef, previousSecret);
|
||||
if (previousConfig && cleanString(previousSecret?.value)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue