feat(DATAGO-132732): Add singleAgentMode support to ChatContext#1433
Open
feat(DATAGO-132732): Add singleAgentMode support to ChatContext#1433
Conversation
Add URL-based single-agent mode support to the community library.
This enables enterprise applications to lock the UI to a specific agent
via URL parameter (?agent=AgentName).
## Changes
### ChatContext.ts
- Add `singleAgentMode: boolean` to ChatState interface
- Add `setSingleAgentMode` setter to ChatActions interface
### ChatProvider.tsx
- Initialize `singleAgentMode` state (default: false)
- Add `singleAgentMode` and `setSingleAgentMode` to context value
### SharedChatProvider.tsx
- Add `singleAgentMode` field (always false for shared sessions)
- Add `setSingleAgentMode` no-op setter for interface compatibility
### ChatInputArea.tsx
- Conditionally hide agent selector when `singleAgentMode === true`
- Wrap agent dropdown in `{!singleAgentMode && (<>...</>)}` guard
## Testing
- All existing tests pass (no breaking changes)
- Default behavior unchanged (singleAgentMode defaults to false)
- Enterprise applications can now control agent selector visibility
## Related
- Enterprise implementation: solace-agent-mesh-enterprise PR #TBD
- JIRA: DATAGO-132732
✅ FOSSA Guard: Licensing (
|
✅ FOSSA Guard: Vulnerability (
|
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.
Summary
Adds
singleAgentModesupport to the community library to enable URL-based single-agent mode in enterprise applications.Changes
New Fields
ChatContext.ts:
singleAgentMode: boolean- State indicating if single-agent mode is activesetSingleAgentMode- Setter to control single-agent modeChatProvider.tsx:
singleAgentModestate (default:false)SharedChatProvider.tsx:
falsevalue (shared sessions don't support single-agent mode)ChatInputArea.tsx:
singleAgentMode === true{!singleAgentMode && (<>...</>)}guardBehavior
Default (Normal Mode):
singleAgentMode: falseSingle-Agent Mode (when enabled by consumer):
singleAgentMode: trueTesting
Enterprise Usage
Enterprise applications can now control the agent selector visibility:
```typescript
// In enterprise provider
const urlAgent = getAgentFromUrl(); // Parse ?agent= from URL
if (urlAgent) {
setSingleAgentMode(true);
setSelectedAgentName(urlAgent);
}
```
Related
🤖 Generated with Claude Code