Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

the bigger notes model says in the log when it starts downloading and when it is in (#11)

christianmat922f34bd66df
diff --git a/app/src/main/setup.ts b/app/src/main/setup.ts
index 84595871..5aa2892f 100644
--- a/app/src/main/setup.ts
+++ b/app/src/main/setup.ts
@@ -275,7 +275,12 @@ export class SetupController {
private startBackground(item: Item): Promise<void> {
this.backgroundItem = item
this.backgroundFailed = false
- this.background = this.fetch(item).then((path) => { if (this.paths) this.paths = { ...this.paths, recommendedLlm: path } }).catch((err) => {
+ const already = isVerified(item.dir, item.fileName, this.sha(item))
+ if (!already) console.info('NOTES', `downloading the bigger notes model ${item.fileName} (${(item.bytes / 1e9).toFixed(1)} GB)`)
+ this.background = this.fetch(item).then((path) => {
+ if (!already) console.info('NOTES', 'the bigger notes model is in')
+ if (this.paths) this.paths = { ...this.paths, recommendedLlm: path }
+ }).catch((err) => {
this.backgroundFailed = true
console.warn('the bigger notes model did not download', err)
})
diff --git a/app/test/setup.test.ts b/app/test/setup.test.ts
index 1ac800b7..738d8ce9 100644
--- a/app/test/setup.test.ts
+++ b/app/test/setup.test.ts
@@ -147,6 +147,20 @@ describe('SetupController', () => {
expect(asked.filter((u) => u === embedUrl).length).toBe(6)
})
+ it('the bigger notes model says in the log when it starts downloading and when it is in, and logs nothing when it is already there', async () => {
+ const info = vi.spyOn(console, 'info').mockImplementation(() => {})
+ try {
+ const { c, root } = setup()
+ await c.start(); await c.idle()
+ const lines = () => info.mock.calls.map((a) => a.join(' ')).filter((l) => /bigger notes model/.test(l))
+ expect(lines()).toEqual([expect.stringMatching(/downloading the bigger notes model gemma-4-26B.*14\.\d GB/), expect.stringMatching(/the bigger notes model is in/)])
+ info.mockClear()
+ const again = new SetupController({ getHardware: async () => m1max, getCatalog: async () => catalog, modelsDir: root, download: recorder().deps, sha256Override: 'FAKE', retryDelaysMs: [0] })
+ await again.start(); await again.idle()
+ expect(lines()).toEqual([])
+ } finally { info.mockRestore() }
+ })
+
it('does not wait for a recommended model that fails: still ready', async () => {
const root = mkdtempSync(join(tmpdir(), 'yogurt-setup-'))
const inner = fakeDownloadDeps({ stepMs: 0 })