Repository navigation
feat(assistant): set up a namespace's assistant in the app and give it chat rooms - #164
Merged
Merged
Conversation
…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
Owner
Author
|
Local CI: green. The self-hosted runner is down, so I replayed every PR job from
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = podsorteam/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.tsxuses the generated client from #154.bridge.rooms(default empty, validated in settings.py) maps a gateway, or a gateway/channel, to a namespace.bridge.conversationsets the chat's scope from it and follows the setting when it changes.bridge.answerpasses that scope to retrieval and the Toolbox. These are two commits, shipped together because the CI runner's queue is long.Types of changes
Checklist:
__tests__/ns-assistant.test.tsx, plustest_a_room_given_to_a_namespace_assistantintests/api/test_bridge.py. Full jest suite: 693 passed.docs/assistant.mdanddocs/chat-rooms.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01TSYJbUHw4k8JEbfavcabQJ
Generated by Claude Code