mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-07 19:38:19 +02:00
ensure shared assistants accessible via query params (#2740)
This commit is contained in:
parent
2d74d44538
commit
b4417fabd7
@ -187,7 +187,6 @@ export function ChatPage({
|
||||
)
|
||||
: undefined
|
||||
);
|
||||
|
||||
// Gather default temperature settings
|
||||
const search_param_temperature = searchParams.get(
|
||||
SEARCH_PARAM_NAMES.TEMPERATURE
|
||||
@ -694,11 +693,12 @@ export function ChatPage({
|
||||
|
||||
useEffect(() => {
|
||||
if (messageHistory.length === 0 && chatSessionIdRef.current === null) {
|
||||
// Select from available assistants so shared assistants appear.
|
||||
setSelectedAssistant(
|
||||
finalAssistants.find((persona) => persona.id === defaultAssistantId)
|
||||
availableAssistants.find((persona) => persona.id === defaultAssistantId)
|
||||
);
|
||||
}
|
||||
}, [defaultAssistantId, finalAssistants, messageHistory.length]);
|
||||
}, [defaultAssistantId, availableAssistants, messageHistory.length]);
|
||||
|
||||
const [
|
||||
selectedDocuments,
|
||||
|
@ -153,6 +153,7 @@ export async function fetchChatData(searchParams: {
|
||||
console.log(`Failed to fetch assistants - ${assistantsFetchError}`);
|
||||
}
|
||||
// remove those marked as hidden by an admin
|
||||
|
||||
assistants = assistants.filter((assistant) => assistant.is_visible);
|
||||
|
||||
// sort them in priority order
|
||||
|
Loading…
x
Reference in New Issue
Block a user