Skip to content

Cognee desktop: share-from-anywhere, quick capture, voice notes, git memory hook - #328

Merged
Vasilije1990 merged 36 commits into
Vasilije1990/spotlightfrom
Vasilije1990/spotlight-capture
Aug 31, 2026
Merged

Cognee desktop: share-from-anywhere, quick capture, voice notes, git memory hook#328
Vasilije1990 merged 36 commits into
Vasilije1990/spotlightfrom
Vasilije1990/spotlight-capture

Conversation

@Vasilije1990

@Vasilije1990 Vasilije1990 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Adds four low-friction ways to get knowledge into cognee memory, all funneling through one new backend endpoint. Builds on the desktop-app base branch (Vasilije1990/spotlight — branch name is a historical codename; see #330).

What's in here

POST /capture (backend)

One endpoint for every capture path: writes a timestamped markdown note (title, source attribution, body) into <data_dir>/capture/ and kicks off incremental indexing. The note becomes searchable like any document.

⌥⇧Space quick capture (app)

A small floating panel — type a thought, hit ↩, keep working. Registered as a second Carbon hotkey (GlobalHotKey now takes an id parameter so multiple hotkeys coexist). Esc or focus loss dismisses.

Share from anywhere

  • scripts/cognee-send — stdlib-only CLI: bare text captures a note, file paths trigger indexing, --to <user> shares via the handover flow. Respects COGNEE_DESKTOP_URL (legacy SPOTLIGHT_URL honored).
  • scripts/install_share_quick_action.sh — installs a macOS Quick Action ("Send to cognee") so any app's text selection can be captured via the Services menu.

Git as memory

  • scripts/install_git_memory_hook.sh — adds a post-commit hook that sends each commit message to memory, backgrounded and failing silently so it never slows a commit.

Voice notes

.mp3 / .m4a / .wav / .aac added to the default indexable extensions — cognee's loaders transcribe audio at index time, so a voice memo dropped in a watched folder becomes searchable memory.

Testing

  • 33 backend tests pass (uv run pytest), including two new /capture tests (note written + indexed + findable; empty text rejected).
  • ruff format + ruff check clean.
  • Swift app builds and bundles (swift build, make_app.sh).
  • Live-verified against a fake-mode backend: curl /capture, cognee-send text + file paths, captured notes findable by search.

🤖 Generated with Claude Code

Vasilije1990 and others added 14 commits August 5, 2026 19:21
Four ways to get a thought into memory without opening the app:

- POST /capture — writes a stamped markdown note into the capture
  folder and indexes it like any document. All capture paths funnel
  through this one endpoint.
- ⌥⇧Space quick-capture panel — type one line, hit return, keep
  working. Second Carbon hotkey (GlobalHotKey now takes an id).
- scripts/cognee-send — stdlib-only CLI: text captures, file paths
  index, --to shares to a teammate. Plus an Automator Quick Action
  installer ("Send to cognee" from any app's selection).
- scripts/install_git_memory_hook.sh — post-commit hook that sends
  each commit message to memory in the background, failing silently
  so it never slows a commit.

Voice notes: .mp3/.m4a/.wav/.aac join the default indexable
extensions — cognee's loaders transcribe audio at index time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Each GlobalHotKey installed its own Carbon event handler, but every
handler receives every kEventHotKeyPressed event. With two hotkeys
registered, pressing either fired the last-installed handler (quick
capture), which consumed the event — so ⌥Space opened the capture bar
instead of search. Read the pressed EventHotKeyID from the event,
act only on our own ID, and pass foreign events along the handler
chain with eventNotHandledErr.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ⌥⇧Space bar now consults GET /whisper (debounced 500ms, notes of
12+ chars): if memory already holds something close, a quiet
"memory knows: …" line appears under the field; with experiments on, a
conflicting fact shows as an orange warning instead — catch the
contradiction before saving it, not after. Panel canvas grows to fit
the whisper row without window resizing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Vasilije1990 Vasilije1990 changed the title Spotlight: share-from-anywhere, quick capture, voice notes, git memory hook Cognee desktop: share-from-anywhere, quick capture, voice notes, git memory hook Aug 10, 2026
Vasilije1990 and others added 10 commits August 11, 2026 17:02
Local cognee was a second-class citizen: the adapter searched only its
own dataset, so connector datasets (github-<repo>), answer attribution,
remember, and the graph view existed only against a cloud tenant.

LocalCogneeAdapter now matches HttpCogneeAdapter's contract:
- scope-all search spans every local dataset minus exclusions. A merged
  local search returns flat payloads with no dataset envelopes, so
  scope-all runs one search per dataset — the same thing the server
  does for an explicit list — and attribution means the same thing in
  both modes (the shared _attributed_answer helper is now literally the
  same code path).
- remember() lands notes with a node_set and cognifies in the
  background, so inbox ingest and feedback work locally.
- make_adapter wires local mode with the same search scope and inbox
  exclusions as cloud; /graph renders cognee's own local visualization.

Verified live against in-process cognee 1.4: the mock GitHub repo in
its own dataset answers alongside the main dataset, with
"your files + github" attribution, and /graph serves HTML.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These were written to a stray nested path by a relative-cd slip and
missed the previous commit: settings/build gradle files, manifest, and
the assets/answer.txt offline copy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Vasilije1990
Vasilije1990 marked this pull request as ready for review August 31, 2026 12:52
@Vasilije1990
Vasilije1990 merged commit 81d81d2 into Vasilije1990/spotlight Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant