8000 feat(assistant): set up a namespace's assistant in the app and give it chat rooms by adeelahmad · Pull Request #164 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(assistant): set up a namespace's assistant in the app and give it chat rooms - #164

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-3598ol
Oct 5, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-3598ol

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: a namespace's own assistant (#154) could only be turned on and read through the API, and chat rooms always reached the general Lens assistant.

After: each namespace's page (Admin → Namespaces → the namespace) has an Assistant section. Owners use it to switch the assistant on, name it and give it instructions. It also lists what the assistant remembers and where each memory came from (a link to the moment, "told in a conversation" or "written here"), and you can add, pin or forget memories there. In Settings → Chat rooms, Rooms for a namespace's assistant takes lines like team = pods or team/general = pods. Conversations in those rooms are scoped to that namespace, so its assistant answers with its instructions and memory, and starting a message with the assistant's name addresses it too.

How: components/assistant/ns-assistant-section.tsx uses the generated client from #154. bridge.rooms (default empty, validated in settings.py) maps a gateway, or a gateway/channel, to a namespace. bridge.conversation sets the chat's scope from it and follows the setting when it changes. bridge.answer passes that scope to retrieval and the Toolbox. These are two commits, shipped together because the CI runner's queue is long.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (ruff, mypy, eslint, tsc pass).
  • I added or updated tests: __tests__/ns-assistant.test.tsx, plus test_a_room_given_to_a_namespace_assistant in tests/api/test_bridge.py. Full jest suite: 693 passed.
  • I have updated docs/assistant.md and docs/chat-rooms.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TSYJbUHw4k8JEbfavcabQJ


Generated by Claude Code

claude added 2 commits October 5, 2026 05:26
…and see what it remembers

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSYJbUHw4k8JEbfavcabQJ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSYJbUHw4k8JEbfavcabQJ
@adeelahmad adeelahmad self-assigned this Oct 5, 2026
Copy link
Copy Markdown
Owner Author

Local CI: green. The self-hosted runner is down, so I replayed every PR job from .github/workflows (ci.yml, pre-commit.yml, pr-title.yml) with ci/local-ci.sh on head 437dfef merged into main 05431b9, the same merge GitHub's pull_request event tests.

Job Result Time
FastAPI (embedded SurrealDB) pass 363s
FastAPI (SurrealDB server, 3.2.4) pass 313s
Next.js (lint, tsc, tests, build) pass 178s
pre-commit pass 68s
PR title pass 0s

Generated by Claude Code

@adeelahmad
adeelahmad merged commit 2b1292e into main Oct 5, 2026
7 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-3598ol branch October 5, 2026 12:38
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

0