diff --git a/application/single_app/config.py b/application/single_app/config.py index 14e7f949f..43ca4b9fe 100644 --- a/application/single_app/config.py +++ b/application/single_app/config.py @@ -101,7 +101,7 @@ EXECUTOR_TYPE = 'thread' EXECUTOR_MAX_WORKERS = 30 SESSION_TYPE = 'filesystem' -VERSION = "0.261.314" +VERSION = "0.261.315" IS_DEVELOPMENT = is_development_env_enabled() # Opt-out for deployments where App Service Easy Auth is active but the platform diff --git a/application/v2_ui/src/components/chat/Composer.tsx b/application/v2_ui/src/components/chat/Composer.tsx index 41e6c6d42..8cc1cd0bb 100644 --- a/application/v2_ui/src/components/chat/Composer.tsx +++ b/application/v2_ui/src/components/chat/Composer.tsx @@ -35,7 +35,6 @@ import { buildSelectionFields, hasResolvableAgent } from '../../lib/chatRequestS import { modelSelectionKey, findModel, type ModelCatalogEntry } from '../../lib/models'; import { promptUrls, resolveGating } from '../../lib/composerGating'; import { resolveDocumentScope } from '../../lib/documentScope'; -import { readPublicWorkspaceSelection } from '../../lib/publicChatScope'; import { usePublicWorkspaceLabels } from '../../lib/publicWorkspaceLabels'; import { addContextItem, @@ -165,7 +164,7 @@ function ToolToggle({ )} > {icon} - {label} + {label} ); } @@ -391,6 +390,11 @@ export function Composer({ initialAgentSelection }: { initialAgentSelection?: st // when orchestrating with manual controls left reachable. const manualControlsVisible = !orchestrating || (manualControlsGovernable && manualControlsOpen); + useEffect(() => { + if (!manualControlsVisible) { + setPickerOpen(false); + } + }, [manualControlsVisible]); /** * The Orchestrate model: Auto (a model chosen per step) or one pinned model. @@ -1014,7 +1018,19 @@ export function Composer({ initialAgentSelection }: { initialAgentSelection?: st const submit = (allowUnfilled = false) => { if (publicWorkspaceSelection && (!features.enable_public_workspaces || publicScopeConflict || answeringFromStoredResult || (options.imageGeneration && !orchestrating))) { - toast.error('Public search needs public sources only. Clear incompatible sources or choose Current context.'); + const recovery = options.imageGeneration && !orchestrating + ? 'Turn off Image, then open Documents and choose Current context.' + : answeringFromStoredResult + ? 'Remove the saved result, then open Documents and choose Current context.' + : orchestrating && !manualControlsGovernable + ? 'Switch to Manual mode, then open Documents and choose Current context, or start a new chat.' + : `Open ${orchestrating ? 'Manual controls, then ' : ''}Documents to clear incompatible references or choose Current context.`; + toast.error(`Public search needs available public sources only. ${recovery}`); + if (!answeringFromStoredResult && !(options.imageGeneration && !orchestrating) + && (!orchestrating || manualControlsGovernable)) { + setManualControlsOpen(true); + setPickerOpen(true); + } return; } if (streaming || !canPost || uploadsBlocked || workflowResultOpening) { @@ -1651,35 +1667,21 @@ export function Composer({ initialAgentSelection }: { initialAgentSelection?: st )} - {!shared && (features.enable_public_workspaces || publicWorkspaceSelection) && ( -
- - - {publicWorkspaceSelection && - {publicWorkspaceSelection === 'all' ? 'Public only, including hidden workspaces.' : 'Public only, using your directory visibility choices.'} - } - {publicScopeConflict &&

- {nonPublicReferences - ? 'Clear personal or group references, or choose Current context before sending.' - : 'Clear whole-workspace references, or choose Current context to search a selected workspace.'} -

} - {publicWorkspaceSelection && !features.enable_public_workspaces &&

- Public workspaces are currently disabled. Choose Current context to continue. -

} -
- )} { if (open) { clearAnalysisResultContext(); } setPickerOpen(open); + if (!open) { + textareaRef.current?.focus(); + } }} searchAll={options.documentSearch} onToggleSearchAll={publicWorkspaceSelection ? undefined : () => { @@ -1939,7 +1944,7 @@ export function Composer({ initialAgentSelection }: { initialAgentSelection?: st