@@ -15,7 +15,8 @@ import {
1515 SelectTrigger ,
1616 SelectValue ,
1717} from '@/components/ui/select' ;
18- import { Monitor , Settings , Split } from 'lucide-react' ;
18+ import { Checkbox } from '@/components/ui/checkbox' ;
19+ import { ListChecks , Monitor , Settings , Split } from 'lucide-react' ;
1920import { useLayoutStore } from '@/stores' ;
2021import { useConfigStore , type ThreadCwdMode } from '@/stores/codex' ;
2122
@@ -38,7 +39,8 @@ export function Composer({
3839} : ComposerProps ) {
3940 const [ images , setImages ] = useState < string [ ] > ( [ ] ) ;
4041 const { isConfigLess, setIsConfigLess } = useLayoutStore ( ) ;
41- const { threadCwdMode, setThreadCwdMode } = useConfigStore ( ) ;
42+ const { threadCwdMode, setThreadCwdMode, collaborationMode, setCollaborationMode } =
43+ useConfigStore ( ) ;
4244
4345 const handleSend = async ( message : string ) => {
4446 await onSend ( message , images ) ;
@@ -75,7 +77,6 @@ export function Composer({
7577 < SkillsPopover />
7678 </ >
7779 ) }
78- < AccessModePopover />
7980 < ModelReasonSelector />
8081 </ InputArea >
8182
@@ -102,6 +103,17 @@ export function Composer({
102103 </ SelectItem >
103104 </ SelectContent >
104105 </ Select >
106+ < label className = "mr-1 inline-flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-xs hover:bg-accent/60" >
107+ < Checkbox
108+ checked = { collaborationMode === 'plan' }
109+ onCheckedChange = { ( checked ) =>
110+ setCollaborationMode ( checked === true ? 'plan' : 'default' )
111+ }
112+ />
113+ < ListChecks className = "h-3.5 w-3.5 text-muted-foreground" />
114+ < span > Plan</ span >
115+ </ label >
116+ < AccessModePopover />
105117 </ div >
106118 </ div >
107119 ) ;
0 commit comments