mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-13 04:03:30 +00:00
refactor(desktop): remove unused plugin classification query
This commit is contained in:
@@ -238,11 +238,6 @@ export class DesktopProjectManager {
|
||||
return pluginRecords(this.paths.profile)
|
||||
}
|
||||
|
||||
/** @returns Whether the profile enables any third-party bundle, without loading plugin files. */
|
||||
hasEnabledPlugins(): boolean {
|
||||
return existsSync(this.paths.profile) && profilePluginNames(this.paths.profile).length > 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinitialize the profile, deleting configuration and third-party packages without a backup.
|
||||
* @param hooks - Stop the Host before resetting files; restart after preparation succeeds.
|
||||
|
||||
@@ -92,9 +92,13 @@ describe('desktop external plugin profile', () => {
|
||||
const patch = join(manager.paths.profile, 'node_modules/plugin/bundle.yml')
|
||||
unlinkSync(patch)
|
||||
await manager.mutate({ type: 'plugins-disable-all' }, hooks({ afterChange: async () => {
|
||||
expect(manager.hasEnabledPlugins()).toBe(false)
|
||||
expect((JSON.parse(readFileSync(join(manager.paths.profile, 'package.json'), 'utf8')) as {
|
||||
dsh: { profile: { bundles: string[] } }
|
||||
}).dsh.profile.bundles).not.toContain('plugin')
|
||||
} }))
|
||||
expect(manager.hasEnabledPlugins()).toBe(false)
|
||||
expect((JSON.parse(readFileSync(join(manager.paths.profile, 'package.json'), 'utf8')) as {
|
||||
dsh: { profile: { bundles: string[] } }
|
||||
}).dsh.profile.bundles).not.toContain('plugin')
|
||||
expect(existsSync(join(manager.paths.profile, 'node_modules/plugin/package.json'))).toBe(true)
|
||||
expect(calls(root)).toHaveLength(2)
|
||||
await expect(manager.applyRelease()).resolves.toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user