mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 03:43:11 +08:00
fix(desktop): repair Windows updater and installer flow (#801)
Prevent stale same-version update metadata from surfacing another install prompt, avoid showing a fake desktop version fallback, and configure the Windows NSIS installer to expose install directory selection. Fixes #801 Tested: bun run verify Confidence: high Scope-risk: moderate
This commit is contained in:
@@ -112,6 +112,12 @@ describe('formatToolUse', () => {
|
||||
expect(result).toContain('🔧 Bash')
|
||||
expect(result).toContain('npm test')
|
||||
})
|
||||
|
||||
it('summarizes file tools with a shortened path', () => {
|
||||
const result = formatToolUse('Read', { file_path: '/Users/test/project/src/index.ts' })
|
||||
|
||||
expect(result).toBe('🔧 Read …/project/src/index.ts')
|
||||
})
|
||||
})
|
||||
|
||||
describe('formatPermissionRequest', () => {
|
||||
|
||||
@@ -88,6 +88,25 @@ describe('SessionStore', () => {
|
||||
expect(store2.get('anything')).toBeNull()
|
||||
})
|
||||
|
||||
it('uses CLAUDE_CONFIG_DIR for the default session store path', () => {
|
||||
const previousConfigDir = process.env.CLAUDE_CONFIG_DIR
|
||||
process.env.CLAUDE_CONFIG_DIR = tmpDir
|
||||
try {
|
||||
const defaultStore = new SessionStore()
|
||||
defaultStore.set('chat-default', 'uuid-default', '/default-project')
|
||||
|
||||
const savedPath = path.join(tmpDir, 'adapter-sessions.json')
|
||||
expect(fs.existsSync(savedPath)).toBe(true)
|
||||
expect(JSON.parse(fs.readFileSync(savedPath, 'utf8'))['chat-default'].sessionId).toBe('uuid-default')
|
||||
} finally {
|
||||
if (previousConfigDir === undefined) {
|
||||
delete process.env.CLAUDE_CONFIG_DIR
|
||||
} else {
|
||||
process.env.CLAUDE_CONFIG_DIR = previousConfigDir
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
it('lists all entries', () => {
|
||||
store.set('chat-1', 'uuid-1', '/a')
|
||||
store.set('chat-2', 'uuid-2', '/b')
|
||||
|
||||
Reference in New Issue
Block a user