Skip to content

feat: wire context resolution into CLI and TUI commands - #21

Merged
chris-regnier merged 9 commits into
mainfrom
context-providers
Mar 4, 2026
Merged

feat: wire context resolution into CLI and TUI commands#21
chris-regnier merged 9 commits into
mainfrom
context-providers

Conversation

@chris-regnier

Copy link
Copy Markdown
Owner

Summary

  • Wire resolveContexts() and ComposeContent() into all entry-creation paths (create, jot, today) for both CLI and TUI
  • Contexts are resolved from configured resolvers + manual contexts, then attached to entries as best-effort (non-blocking)
  • Jot appends new contexts on every jot (append-only design)
  • TUI entry detail view now displays attached contexts
  • Added TODO marker for future CompositeProvider (MCP-backed search) wiring

Changes

  • cmd/context_helpers.go — New helpers: buildContentProviders, buildContextResolvers, resolveContexts
  • cmd/create.go — Editor path gets ComposeContent; all paths get resolveContexts
  • cmd/jot.go — Resolve + attach contexts after jot
  • cmd/today.go — Resolve + attach in both todayRun and todayEditRun
  • cmd/root.go — Pass context config to TUI
  • internal/ui/picker.go — TUI context resolution, doCreateWithEditor/doJot attach contexts, formatEntry shows contexts
  • internal/context/composite.go — TODO for future wiring

Test plan

  • go build ./... clean
  • go vet ./... clean
  • All new tests pass (cmd/context_helpers_test.go, cmd/create_test.go, cmd/jot_test.go, cmd/today_test.go, internal/ui/picker_test.go)
  • Gavel analysis: no genuine issues (5 false-positive errors on intentional best-effort error handling)

🤖 Generated with Claude Code

chris-regnier and others added 9 commits March 3, 2026 20:56
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mand

All entry creation paths (editor, stdin, inline) now resolve active
contexts and attach them to entries. The editor path additionally
composes content providers into the editor buffer before opening.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add resolveContexts, buildTUIContentProviders, and buildTUIContextResolvers
helper methods. Modify doCreateWithEditor to compose content via providers
and attach resolved contexts to newly created entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Attach resolved contexts to entries created or updated via jot in both
the existing-entry and new-entry paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gavel found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@chris-regnier
chris-regnier merged commit 5b776ea into main Mar 4, 2026
2 of 4 checks passed
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.

2 participants