Skip to content

Commit c81b8db

Browse files
authored
Merge branch 'master' into move-appjs-to-appts
2 parents ecf7556 + c61b5fb commit c81b8db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ export const TabsUI = (props: TabsUIProps) => {
8888

8989
const getAI = async () => {
9090
try {
91-
return await props.plugin.call('settings', 'getCopilotSetting')
91+
const init_state = await props.plugin.call('settings', 'getCopilotSetting')
92+
if (init_state === undefined || init_state === null) {
93+
await props.plugin.call('settings', 'updateCopilotChoice', ai_switch)
94+
return ai_switch
95+
}
96+
return init_state
9297
} catch (e) {
9398
return false
9499
}

0 commit comments

Comments
 (0)