mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: finish the ai plugin (B18)
This commit is contained in:
1 parent
6b4d1432ab
commit
21937a6b02
193 files changed
+23429
-4244
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Check } from "lucide-react";
|
||||
import { useTranslation } from "@termix/plugin-sdk/frontend";
|
||||
import { setAssistantEnabledForUser } from "./settings/AiUserSettings";
|
||||
import { setAiOptIn } from "./ai-api";
|
||||
|
||||
/**
|
||||
* Asks once, plainly.
|
||||
@@ -17,7 +17,8 @@ export function AiAssistantStep() {
|
||||
|
||||
function apply(next: boolean) {
|
||||
setEnabled(next);
|
||||
setAssistantEnabledForUser(next);
|
||||
// The local choice still shows if the write fails.
|
||||
setAiOptIn(next).catch(() => undefined);
|
||||
}
|
||||
|
||||
// Skipping the step entirely still has to mean off, not unset.
|
||||
|
||||
Reference in new issue
Block a user