mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
add: console mock suggestions env.
This commit is contained in:
+2
-1
@@ -11,7 +11,8 @@ export const VARS = {
|
||||
APPWRITE_ENDPOINT: env.PUBLIC_APPWRITE_ENDPOINT ?? undefined,
|
||||
GROWTH_ENDPOINT: env.PUBLIC_GROWTH_ENDPOINT ?? undefined,
|
||||
PUBLIC_STRIPE_KEY: env.PUBLIC_STRIPE_KEY ?? undefined,
|
||||
EMAIL_VERIFICATION: env.PUBLIC_CONSOLE_EMAIL_VERIFICATION === 'true'
|
||||
EMAIL_VERIFICATION: env.PUBLIC_CONSOLE_EMAIL_VERIFICATION === 'true',
|
||||
MOCK_AI_SUGGESTIONS: (env.PUBLIC_CONSOLE_MOCK_AI_SUGGESTIONS ?? 'true') === 'true'
|
||||
};
|
||||
|
||||
export const ENV = {
|
||||
|
||||
+2
-6
@@ -41,6 +41,7 @@
|
||||
import Options from './options.svelte';
|
||||
import { InputSelect, InputText } from '$lib/elements/forms';
|
||||
import { Confirm } from '$lib/components';
|
||||
import { VARS } from '$lib/system';
|
||||
|
||||
let resizeObserver: ResizeObserver;
|
||||
let spreadsheetContainer: HTMLElement;
|
||||
@@ -388,11 +389,6 @@
|
||||
$tableColumnSuggestions.thinking = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark this as `true` when developing locally,
|
||||
* make sure not to spend credits unnecessarily!
|
||||
*/
|
||||
const useMockSuggestions = false;
|
||||
async function suggestColumns() {
|
||||
$tableColumnSuggestions.thinking = true;
|
||||
let suggestedColumns: {
|
||||
@@ -404,7 +400,7 @@
|
||||
};
|
||||
|
||||
try {
|
||||
if (useMockSuggestions) {
|
||||
if (VARS.MOCK_AI_SUGGESTIONS) {
|
||||
/* animation */
|
||||
await sleep(1250);
|
||||
suggestedColumns = mockSuggestions;
|
||||
|
||||
Reference in New Issue
Block a user