File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
apps/desktop/src/components Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 66 import { BACKEND } from ' $lib/backend' ;
77 import { BASE_BRANCH_SERVICE } from ' $lib/baseBranch/baseBranchService.svelte' ;
88 import { SETTINGS_SERVICE } from ' $lib/config/appSettingsV2' ;
9+ import { projectDisableCodegen } from ' $lib/config/config' ;
910 import { ircEnabled } from ' $lib/config/uiFeatureFlags' ;
1011 import { IRC_SERVICE } from ' $lib/irc/ircService.svelte' ;
1112 import { MODE_SERVICE } from ' $lib/mode/modeService' ;
5051 const singleBranchMode = $derived ($settingsStore ?.featureFlags .singleBranch ?? false );
5152 const useCustomTitleBar = $derived (! ($settingsStore ?.ui .useNativeTitleBar ?? false ));
5253 const backend = inject (BACKEND );
54+ const codegenDisabled = $derived (projectDisableCodegen (projectId ));
5355
5456 const mode = $derived (modeService .mode (projectId ));
5557 const currentMode = $derived (mode .response );
270272 >
271273 Create branch
272274 </Button >
273- <Button
274- testId ={TestId .ChromeHeaderCreateCodegenSessionButton }
275- kind =" outline"
276- tooltip =" New Codegen Session"
277- icon =" ai-new-session"
278- onclick ={() => {
279- createAiStack ();
280- }}
281- />
275+ {#if ! $codegenDisabled }
276+ <Button
277+ testId ={TestId .ChromeHeaderCreateCodegenSessionButton }
278+ kind =" outline"
279+ tooltip =" New Codegen Session"
280+ icon =" ai-new-session"
281+ onclick ={() => {
282+ createAiStack ();
283+ }}
284+ />
285+ {/if }
282286 {/if }
283287 </div >
284288</div >
You can’t perform that action at this time.
0 commit comments