Sync snapshot (2026-08-23) (#130)

- Convert scanned PDFs to editable text with local OCR, running through the operating system's own engine on macOS and Windows
- Add a much richer AI workflow to Docs, PDF, and Markdown: selection-scoped questions, batched edits, character-level edits, comment and tracked-change awareness, citations back to the source block, and in-document image generation
- Let Slides open the same presentation in a second window and edit it from both
- Improve PDF to Excel table recovery: tables spanning pages merge into one worksheet, and label/value grids and rule-less statement bands become real rows
- Fix a large wave of Word layout fidelity in Docs, Excel parity in Sheets, and PowerPoint import fidelity in Slides

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
This commit is contained in:
merrick-2002
2026-08-23 23:10:02 +08:00
committed by GitHub
co-authored by GenOffice
parent f68df70e22
commit 6d9b6812dd
372 changed files with 34693 additions and 3274 deletions
@@ -72,6 +72,54 @@ describe('resolveAiSettings', () => {
// provider not mentioned in stored.providers keeps the computed default
expect(resolved.providers.anthropic.apiKey).toBe('preset-key')
})
it('rewrites a stored model id the vendor has retired', () => {
const resolved = resolveAiSettings(
{
providers: {
deepseek: { apiKey: 'sk-user', model: 'deepseek-reasoner' },
} as never,
},
defaultAiSettings(),
)
expect(resolved.providers.deepseek).toEqual({ apiKey: 'sk-user', model: 'deepseek-v4-flash' })
})
it('leaves a still-supported model id alone', () => {
const resolved = resolveAiSettings(
{
providers: {
deepseek: { apiKey: 'sk-user', model: 'deepseek-v4-pro' },
} as never,
},
defaultAiSettings(),
)
expect(resolved.providers.deepseek.model).toBe('deepseek-v4-pro')
})
it('trims whitespace pasted around stored keys and base URLs', () => {
const resolved = resolveAiSettings(
{
providers: {
deepseek: { apiKey: ' sk-user\n', model: 'deepseek-v4-pro' },
custom: { apiKey: 'k', model: 'm', baseUrl: ' http://localhost:1234/v1 ' },
} as never,
},
defaultAiSettings(),
)
expect(resolved.providers.deepseek.apiKey).toBe('sk-user')
expect(resolved.providers.deepseek.baseUrl).toBeUndefined()
expect(resolved.providers.custom.baseUrl).toBe('http://localhost:1234/v1')
})
it('trims the legacy single-endpoint key and base URL too', () => {
const resolved = resolveAiSettings(
{ apiKey: ' legacy-key ', baseUrl: ' https://legacy.example.com/v1 ' },
defaultAiSettings(),
)
expect(resolved.providers.custom.apiKey).toBe('legacy-key')
expect(resolved.providers.custom.baseUrl).toBe('https://legacy.example.com/v1')
})
})
describe('activeProvider', () => {