@smart-cloud/ai-kit-ui 1.1.37 → 1.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/ai-feature/AiFeature.tsx +6 -4
package/package.json
CHANGED
|
@@ -336,7 +336,7 @@ const AiFeatureBase: FC<AiFeatureProps & AiKitShellInjectedProps> = (props) => {
|
|
|
336
336
|
|
|
337
337
|
const [state, setState] = useState<string>();
|
|
338
338
|
const [featureOpen, setFeatureOpen] = useState<boolean>(!showOpenButton);
|
|
339
|
-
const [optionsOpen, setOptionsOpen] = useState<boolean>();
|
|
339
|
+
const [optionsOpen, setOptionsOpen] = useState<boolean>(false);
|
|
340
340
|
const [backendConfigured, setBackendConfigured] = useState(false);
|
|
341
341
|
const [error, setError] = useState<string | null>(null);
|
|
342
342
|
const [generated, setGenerated] = useState<never | null>(null);
|
|
@@ -970,7 +970,6 @@ Follow these additional instructions: ${instructions}`
|
|
|
970
970
|
|
|
971
971
|
useEffect(() => {
|
|
972
972
|
if (
|
|
973
|
-
optionsOpen !== false ||
|
|
974
973
|
!featureOpen ||
|
|
975
974
|
!autoRun ||
|
|
976
975
|
!canGenerate ||
|
|
@@ -998,7 +997,10 @@ Follow these additional instructions: ${instructions}`
|
|
|
998
997
|
useEffect(() => {
|
|
999
998
|
if (!allowOverrideParameters) return;
|
|
1000
999
|
if (mode === "proofread") return;
|
|
1001
|
-
if (!canGenerate)
|
|
1000
|
+
if (!canGenerate) {
|
|
1001
|
+
setOptionsOpen(true);
|
|
1002
|
+
autoRunOnceRef.current = true;
|
|
1003
|
+
}
|
|
1002
1004
|
}, [allowOverrideParameters, canGenerate, mode]);
|
|
1003
1005
|
|
|
1004
1006
|
useEffect(() => {
|
|
@@ -1220,7 +1222,7 @@ Follow these additional instructions: ${instructions}`
|
|
|
1220
1222
|
)}
|
|
1221
1223
|
</Group>
|
|
1222
1224
|
|
|
1223
|
-
<CollapseComponent in={optionsOpen
|
|
1225
|
+
<CollapseComponent in={optionsOpen}>
|
|
1224
1226
|
{optionsDisplay === "collapse" && <Divider my="sm" />}
|
|
1225
1227
|
<OptionsComponent gap="xs" justify="space-between">
|
|
1226
1228
|
{/* TOPIC */}
|