mirror of
https://github.com/YuJunZhiXue/dsh-purge.git
synced 2026-11-28 12:10:22 +08:00
fix: 停用/卸载时清掉 selectedDefault=redteam(#108)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ac58b3e355
commit
5d4b45ca4f
6 files changed
+77
-17
No files matched your search
@@ -11,6 +11,7 @@ import { homedir } from 'node:os'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { readPresetDefinition } from './preset-composition.js'
|
||||
import { scheduleClearOwnedSelectedDefault } from '../preset-default.js'
|
||||
|
||||
/** Cordis 插件名。 */
|
||||
export const name = 'dsh-purge-redteam'
|
||||
@@ -605,6 +606,7 @@ export function apply(ctx) {
|
||||
closed = true
|
||||
if (timer) clearInterval(timer)
|
||||
if (stop) clearTimeout(stop)
|
||||
try { scheduleClearOwnedSelectedDefault({ ctx }) } catch { /* 清默认失败不挡停用 */ }
|
||||
void undeclare()
|
||||
}
|
||||
}, 'dsh-purge-redteam: declare agent preset')
|
||||
|
||||
Reference in new issue
Block a user