mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
This brings the desktop memory worktree onto local main after main advanced with opener, IM, zoom, and autonomous goal work. The conflict resolution keeps both the selected-chat reference imports and memory event settings entrypoint in MessageList, and keeps both open-targets and memory API routes in the server router. Constraint: main and feat/desktop-memory-surface diverged across desktop chat and server routing. Constraint: desktop Vitest runs src-tauri tests under Vitest, so the Tauri config test cannot import bun:test. Rejected: Fast-forward merge | main carried newer local commits not present on the memory branch. Confidence: high Scope-risk: moderate Directive: Keep chat selection references, memory cards, open-target routes, and memory routes together when touching these files. Tested: bun run check:desktop Tested: bun run check:server
27 lines
744 B
TypeScript
27 lines
744 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { readFileSync } from 'node:fs'
|
|
import { dirname } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { join } from 'node:path'
|
|
|
|
const currentDir = dirname(fileURLToPath(import.meta.url))
|
|
|
|
describe('tauri security config', () => {
|
|
it('allows desktop sidecar image URLs for opener icons', () => {
|
|
const config = JSON.parse(
|
|
readFileSync(join(currentDir, 'tauri.conf.json'), 'utf8'),
|
|
) as {
|
|
app?: {
|
|
security?: {
|
|
csp?: string
|
|
}
|
|
}
|
|
}
|
|
|
|
const csp = config.app?.security?.csp ?? ''
|
|
expect(csp).toContain('img-src')
|
|
expect(csp).toContain('http://127.0.0.1:*')
|
|
expect(csp).toContain('http://localhost:*')
|
|
})
|
|
})
|