Skip to content

Nylas Chat#22

Merged
qasim-nylas merged 9 commits intonylas:mainfrom
mqasimca:nylas-chat-i001
Feb 13, 2026
Merged

Nylas Chat#22
qasim-nylas merged 9 commits intonylas:mainfrom
mqasimca:nylas-chat-i001

Conversation

@mqasimca
Copy link
Contributor

No description provided.

mqasimca and others added 7 commits February 12, 2026 22:02
Add `nylas chat` command that launches a web-based AI chat interface
for interacting with email, calendar, and contacts through locally
installed AI agents (Claude, Codex, Ollama).

Key features:
- Auto-detects installed AI agents via PATH lookup
- Text-based tool protocol (TOOL_CALL/TOOL_RESULT) for agent-API bridge
- SSE streaming for real-time chat responses
- Persistent conversation history as JSON files on disk
- Context window management with automatic compaction
- Agent switching via dropdown without restart
- Modern dark/light theme web UI
…ehensive tests

- Add slash commands (/help, /new, /clear, /model, /email, /calendar,
  /contacts, /status) with tab completion and server-side execution
- Add approval gating for destructive operations (send_email, create_event)
  with channel-based synchronization and SSE approval_required/resolved events
- Add streaming responses with token-by-token SSE delivery and
  stream-then-parse strategy for tool call detection
- Split chat.css into chat.css + components.css for maintainability
- Add comprehensive Go unit tests for executor (email/calendar/contacts/
  folders tool dispatch), conversation handlers, prompt builder, and session
- Add Playwright E2E tests (28 tests) covering smoke, UI interactions,
  slash commands, and API health endpoints
- Fix welcome element preservation when clearing/resetting messages
- Fix async command execution to properly await sidebar operations
When --limit is set above 200, automatically switch to cursor-based
pagination instead of returning an API error. This applies to email
list, calendar events list, and contacts list commands.

Also extracts MaxAPILimit constant to common/pagination.go, replaces
custom contains() helper with slices.Contains, optimizes page size
to use the full API limit (200) instead of hardcoded 50, and
refactors contacts list to use common.WithClient.
- Replace custom contains()/findSubstring() with strings.Contains()
- Replace getScopesClient()/getProvidersClient() with common.GetNylasClient()
- Add withSlackClient()/getSlackClientOrError() helpers to reduce slack boilerplate
- Add common.IsStructuredOutput() to replace repeated 3-line format check pattern
- Fix folder list UNREAD column alignment when ANSI colors are applied
- Replace local truncate/truncateString with common.Truncate() (audit, slack, integration tests)
- Replace local printJSON with common.PrintJSON() (timezone package, 5 files)
- Widen IsJSON(cmd) to IsStructuredOutput(cmd) so --format yaml and --quiet
  use the structured output path instead of falling through to table (15 files)
- Fix buggy truncate in email_gpg_test.go that produced maxLen+3 chars
The create command rejected '@' and '*' characters, preventing full
email addresses and wildcard patterns. Also, created inboxes were not
saved to the local grant store, so they didn't appear in `auth list`.
qasim-nylas
qasim-nylas previously approved these changes Feb 13, 2026
When no agents are installed (e.g., CI runners), DetectAgents returned
nil which caused TestDetectAgents_Structure to fail with NotNil assert.
@qasim-nylas qasim-nylas merged commit f140ccd into nylas:main Feb 13, 2026
2 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