@@ -15,6 +15,7 @@ import type {
1515 SkillOption ,
1616 WorkspaceInfo ,
1717} from "../../../types" ;
18+ import { formatCollaborationModeLabel } from "../../../utils/collaborationModes" ;
1819import { ComposerInput } from "../../composer/components/ComposerInput" ;
1920import { useComposerImages } from "../../composer/hooks/useComposerImages" ;
2021import { useComposerAutocompleteState } from "../../composer/hooks/useComposerAutocompleteState" ;
@@ -56,6 +57,13 @@ type WorkspaceHomeProps = {
5657 modelSelections : Record < string , number > ;
5758 onToggleModel : ( modelId : string ) => void ;
5859 onModelCountChange : ( modelId : string , count : number ) => void ;
60+ collaborationModes : { id : string ; label : string } [ ] ;
61+ selectedCollaborationModeId : string | null ;
62+ onSelectCollaborationMode : ( id : string | null ) => void ;
63+ reasoningOptions : string [ ] ;
64+ selectedEffort : string | null ;
65+ onSelectEffort : ( effort : string ) => void ;
66+ reasoningSupported : boolean ;
5967 error : string | null ;
6068 isSubmitting : boolean ;
6169 activeWorkspaceId : string | null ;
@@ -124,6 +132,13 @@ export function WorkspaceHome({
124132 modelSelections,
125133 onToggleModel,
126134 onModelCountChange,
135+ collaborationModes,
136+ selectedCollaborationModeId,
137+ onSelectCollaborationMode,
138+ reasoningOptions,
139+ selectedEffort,
140+ onSelectEffort,
141+ reasoningSupported,
127142 error,
128143 isSubmitting,
129144 activeWorkspaceId,
@@ -671,6 +686,83 @@ export function WorkspaceHome({
671686 </ div >
672687 ) }
673688 </ div >
689+ { collaborationModes . length > 0 && (
690+ < div className = "composer-select-wrap workspace-home-control" >
691+ < div className = "open-app-button" >
692+ < span className = "composer-icon" aria-hidden >
693+ < svg viewBox = "0 0 24 24" fill = "none" >
694+ < path
695+ d = "M7 7h10M7 12h6M7 17h8"
696+ stroke = "currentColor"
697+ strokeWidth = "1.4"
698+ strokeLinecap = "round"
699+ />
700+ </ svg >
701+ </ span >
702+ < select
703+ className = "composer-select composer-select--model"
704+ aria-label = "Collaboration mode"
705+ value = { selectedCollaborationModeId ?? "" }
706+ onChange = { ( event ) =>
707+ onSelectCollaborationMode ( event . target . value || null )
708+ }
709+ disabled = { isSubmitting }
710+ >
711+ { collaborationModes . map ( ( mode ) => (
712+ < option key = { mode . id } value = { mode . id } >
713+ { formatCollaborationModeLabel ( mode . label || mode . id ) }
714+ </ option >
715+ ) ) }
716+ </ select >
717+ </ div >
718+ </ div >
719+ ) }
720+ < div className = "composer-select-wrap workspace-home-control" >
721+ < div className = "open-app-button" >
722+ < span className = "composer-icon" aria-hidden >
723+ < svg viewBox = "0 0 24 24" fill = "none" >
724+ < path
725+ d = "M8.5 4.5a3.5 3.5 0 0 0-3.46 4.03A4 4 0 0 0 6 16.5h2"
726+ stroke = "currentColor"
727+ strokeWidth = "1.4"
728+ strokeLinecap = "round"
729+ />
730+ < path
731+ d = "M15.5 4.5a3.5 3.5 0 0 1 3.46 4.03A4 4 0 0 1 18 16.5h-2"
732+ stroke = "currentColor"
733+ strokeWidth = "1.4"
734+ strokeLinecap = "round"
735+ />
736+ < path
737+ d = "M9 12h6"
738+ stroke = "currentColor"
739+ strokeWidth = "1.4"
740+ strokeLinecap = "round"
741+ />
742+ < path
743+ d = "M12 12v6"
744+ stroke = "currentColor"
745+ strokeWidth = "1.4"
746+ strokeLinecap = "round"
747+ />
748+ </ svg >
749+ </ span >
750+ < select
751+ className = "composer-select composer-select--effort"
752+ aria-label = "Thinking mode"
753+ value = { selectedEffort ?? "" }
754+ onChange = { ( event ) => onSelectEffort ( event . target . value ) }
755+ disabled = { isSubmitting || ! reasoningSupported }
756+ >
757+ { reasoningOptions . length === 0 && < option value = "" > Default</ option > }
758+ { reasoningOptions . map ( ( effortOption ) => (
759+ < option key = { effortOption } value = { effortOption } >
760+ { effortOption }
761+ </ option >
762+ ) ) }
763+ </ select >
764+ </ div >
765+ </ div >
674766 </ div >
675767
676768 < div className = "workspace-home-agent" >
0 commit comments