diff --git a/examples/nextjs-api-sales/package.json b/examples/nextjs-api-sales/package.json index 8ef2294666..fa313c8cd6 100644 --- a/examples/nextjs-api-sales/package.json +++ b/examples/nextjs-api-sales/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "bulma": "^0.9.3", - "next": "14.2.25", + "next": "14.2.26", "node-fetch": "^3.2.10", "sass": "^1.52.3", "react": "17.0.2", diff --git a/examples/nextjs-api-sales/yarn.lock b/examples/nextjs-api-sales/yarn.lock index f5ac1f3b0c..39ccd73d3e 100644 --- a/examples/nextjs-api-sales/yarn.lock +++ b/examples/nextjs-api-sales/yarn.lock @@ -46,10 +46,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@next/env@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.25.tgz#936d10b967e103e49a4bcea1e97292d5605278dd" - integrity sha512-JnzQ2cExDeG7FxJwqAksZ3aqVJrHjFwZQAEJ9gQZSoEhIow7SNoKZzju/AwQ+PLIR4NY8V0rhcVozx/2izDO0w== +"@next/env@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.26.tgz#5d55f72d2edb7246607c78f61e7d3ff21516bc2e" + integrity sha512-vO//GJ/YBco+H7xdQhzJxF7ub3SUwft76jwaeOyVVQFHCi5DCnkP16WHB+JBylo4vOKPoZBlR94Z8xBxNBdNJA== "@next/eslint-plugin-next@12.1.0": version "12.1.0" @@ -58,50 +58,50 @@ dependencies: glob "7.1.7" -"@next/swc-darwin-arm64@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.25.tgz#7bcccfda0c0ff045c45fbe34c491b7368e373e3d" - integrity sha512-09clWInF1YRd6le00vt750s3m7SEYNehz9C4PUcSu3bAdCTpjIV4aTYQZ25Ehrr83VR1rZeqtKUPWSI7GfuKZQ== +"@next/swc-darwin-arm64@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.26.tgz#84b31a22149b2c49f5c5b29cddd7acb3a84d7e1c" + integrity sha512-zDJY8gsKEseGAxG+C2hTMT0w9Nk9N1Sk1qV7vXYz9MEiyRoF5ogQX2+vplyUMIfygnjn9/A04I6yrUTRTuRiyQ== -"@next/swc-darwin-x64@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.25.tgz#b489e209d7b405260b73f69a38186ed150fb7a08" - integrity sha512-V+iYM/QR+aYeJl3/FWWU/7Ix4b07ovsQ5IbkwgUK29pTHmq+5UxeDr7/dphvtXEq5pLB/PucfcBNh9KZ8vWbug== +"@next/swc-darwin-x64@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.26.tgz#50a5eb37972d313951f76f36f1f0b7100d063ebd" + integrity sha512-U0adH5ryLfmTDkahLwG9sUQG2L0a9rYux8crQeC92rPhi3jGQEY47nByQHrVrt3prZigadwj/2HZ1LUUimuSbg== -"@next/swc-linux-arm64-gnu@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.25.tgz#ba064fabfdce0190d9859493d8232fffa84ef2e2" - integrity sha512-LFnV2899PJZAIEHQ4IMmZIgL0FBieh5keMnriMY1cK7ompR+JUd24xeTtKkcaw8QmxmEdhoE5Mu9dPSuDBgtTg== +"@next/swc-linux-arm64-gnu@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.26.tgz#c4278c157623b05886e37ff17194811aca1c2d00" + integrity sha512-SINMl1I7UhfHGM7SoRiw0AbwnLEMUnJ/3XXVmhyptzriHbWvPPbbm0OEVG24uUKhuS1t0nvN/DBvm5kz6ZIqpg== -"@next/swc-linux-arm64-musl@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.25.tgz#bf0018267e4e0fbfa1524750321f8cae855144a3" - integrity sha512-QC5y5PPTmtqFExcKWKYgUNkHeHE/z3lUsu83di488nyP0ZzQ3Yse2G6TCxz6nNsQwgAx1BehAJTZez+UQxzLfw== +"@next/swc-linux-arm64-musl@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.26.tgz#5751132764b7a1f13a5a3fe447b03d564eb29705" + integrity sha512-s6JaezoyJK2DxrwHWxLWtJKlqKqTdi/zaYigDXUJ/gmx/72CrzdVZfMvUc6VqnZ7YEvRijvYo+0o4Z9DencduA== -"@next/swc-linux-x64-gnu@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.25.tgz#64f5a6016a7148297ee80542e0fd788418a32472" - integrity sha512-y6/ML4b9eQ2D/56wqatTJN5/JR8/xdObU2Fb1RBidnrr450HLCKr6IJZbPqbv7NXmje61UyxjF5kvSajvjye5w== +"@next/swc-linux-x64-gnu@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.26.tgz#74312cac45704762faa73e0880be6549027303af" + integrity sha512-FEXeUQi8/pLr/XI0hKbe0tgbLmHFRhgXOUiPScz2hk0hSmbGiU8aUqVslj/6C6KA38RzXnWoJXo4FMo6aBxjzg== -"@next/swc-linux-x64-musl@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.25.tgz#58dc636d7c55828478159546f7b95ab1e902301c" - integrity sha512-sPX0TSXHGUOZFvv96GoBXpB3w4emMqKeMgemrSxI7A6l55VBJp/RKYLwZIB9JxSqYPApqiREaIIap+wWq0RU8w== +"@next/swc-linux-x64-musl@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.26.tgz#5d96464d71d2000ec704e650a1a86bb9d73f760d" + integrity sha512-BUsomaO4d2DuXhXhgQCVt2jjX4B4/Thts8nDoIruEJkhE5ifeQFtvW5c9JkdOtYvE5p2G0hcwQ0UbRaQmQwaVg== -"@next/swc-win32-arm64-msvc@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.25.tgz#93562d447c799bded1e89c1a62d5195a2a8c6c0d" - integrity sha512-ReO9S5hkA1DU2cFCsGoOEp7WJkhFzNbU/3VUF6XxNGUCQChyug6hZdYL/istQgfT/GWE6PNIg9cm784OI4ddxQ== +"@next/swc-win32-arm64-msvc@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.26.tgz#859472b532b11499b8f5c2237f54401456286913" + integrity sha512-5auwsMVzT7wbB2CZXQxDctpWbdEnEW/e66DyXO1DcgHxIyhP06awu+rHKshZE+lPLIGiwtjo7bsyeuubewwxMw== -"@next/swc-win32-ia32-msvc@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.25.tgz#ad85a33466be1f41d083211ea21adc0d2c6e6554" - integrity sha512-DZ/gc0o9neuCDyD5IumyTGHVun2dCox5TfPQI/BJTYwpSNYM3CZDI4i6TOdjeq1JMo+Ug4kPSMuZdwsycwFbAw== +"@next/swc-win32-ia32-msvc@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.26.tgz#e52e9bd0c43b7a469b03eda6d7a07c3d0c28f549" + integrity sha512-GQWg/Vbz9zUGi9X80lOeGsz1rMH/MtFO/XqigDznhhhTfDlDoynCM6982mPCbSlxJ/aveZcKtTlwfAjwhyxDpg== -"@next/swc-win32-x64-msvc@14.2.25": - version "14.2.25" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.25.tgz#3969c66609e683ec63a6a9f320a855f7be686a08" - integrity sha512-KSznmS6eFjQ9RJ1nEc66kJvtGIL1iZMYmGEXsZPh2YtnLtqrgdVvKXJY2ScjjoFnG6nGLyPFR0UiEvDwVah4Tw== +"@next/swc-win32-x64-msvc@14.2.26": + version "14.2.26" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.26.tgz#6f42a3ae16ae15c5c5e36efa9b7e291c86ab1275" + integrity sha512-2rdB3T1/Gp7bv1eQTTm9d1Y1sv9UuJ2LAwOE0Pe2prHKe32UNscj7YS13fRB37d0GAiGNR+Y7ZcW8YjDI8Ns0w== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1253,12 +1253,12 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -next@14.2.25: - version "14.2.25" - resolved "https://registry.yarnpkg.com/next/-/next-14.2.25.tgz#0657551fde6a97f697cf9870e9ccbdaa465c6008" - integrity sha512-N5M7xMc4wSb4IkPvEV5X2BRRXUmhVHNyaXwEM86+voXthSZz8ZiRyQW4p9mwAoAPIm6OzuVZtn7idgEJeAJN3Q== +next@14.2.26: + version "14.2.26" + resolved "https://registry.yarnpkg.com/next/-/next-14.2.26.tgz#b918b3fc5c55e1a67aada1347907675713687721" + integrity sha512-b81XSLihMwCfwiUVRRja3LphLo4uBBMZEzBBWMaISbKTwOmq3wPknIETy/8000tr7Gq4WmbuFYPS7jOYIf+ZJw== dependencies: - "@next/env" "14.2.25" + "@next/env" "14.2.26" "@swc/helpers" "0.5.5" busboy "1.6.0" caniuse-lite "^1.0.30001579" @@ -1266,15 +1266,15 @@ next@14.2.25: postcss "8.4.31" styled-jsx "5.1.1" optionalDependencies: - "@next/swc-darwin-arm64" "14.2.25" - "@next/swc-darwin-x64" "14.2.25" - "@next/swc-linux-arm64-gnu" "14.2.25" - "@next/swc-linux-arm64-musl" "14.2.25" - "@next/swc-linux-x64-gnu" "14.2.25" - "@next/swc-linux-x64-musl" "14.2.25" - "@next/swc-win32-arm64-msvc" "14.2.25" - "@next/swc-win32-ia32-msvc" "14.2.25" - "@next/swc-win32-x64-msvc" "14.2.25" + "@next/swc-darwin-arm64" "14.2.26" + "@next/swc-darwin-x64" "14.2.26" + "@next/swc-linux-arm64-gnu" "14.2.26" + "@next/swc-linux-arm64-musl" "14.2.26" + "@next/swc-linux-x64-gnu" "14.2.26" + "@next/swc-linux-x64-musl" "14.2.26" + "@next/swc-win32-arm64-msvc" "14.2.26" + "@next/swc-win32-ia32-msvc" "14.2.26" + "@next/swc-win32-x64-msvc" "14.2.26" node-domexception@^1.0.0: version "1.0.0" diff --git a/lerna.json b/lerna.json index 5477109e50..2cec0e2f05 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "3.9.0", + "version": "3.9.1", "npmClient": "yarn", "concurrency": 20, "command": { diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 2ea4cb201a..f3773c0add 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -44,7 +44,7 @@ "bcryptjs": "2.4.3", "bull": "4.10.1", "correlation-id": "4.0.0", - "dd-trace": "5.43.0", + "dd-trace": "5.47.0", "dotenv": "16.0.1", "google-auth-library": "^8.0.1", "google-spreadsheet": "npm:@budibase/google-spreadsheet@4.1.5", diff --git a/packages/bbui/src/Form/Core/TextField.svelte b/packages/bbui/src/Form/Core/TextField.svelte index b6839c5558..17d6f65cb6 100644 --- a/packages/bbui/src/Form/Core/TextField.svelte +++ b/packages/bbui/src/Form/Core/TextField.svelte @@ -104,6 +104,7 @@ on:focus on:input on:keyup + on:keydown on:blur={onBlur} on:focus={onFocus} on:input={onInput} diff --git a/packages/bbui/src/Form/Input.svelte b/packages/bbui/src/Form/Input.svelte index 8e260a46fe..99ec62c556 100644 --- a/packages/bbui/src/Form/Input.svelte +++ b/packages/bbui/src/Form/Input.svelte @@ -41,6 +41,7 @@ on:blur on:focus on:keyup + on:keydown > diff --git a/packages/builder/assets/bb-ai.svg b/packages/builder/assets/bb-ai.svg new file mode 100644 index 0000000000..46a21782f0 --- /dev/null +++ b/packages/builder/assets/bb-ai.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/builder/src/analytics/constants.ts b/packages/builder/src/analytics/constants.ts index 5264e16abc..544d6e99d8 100644 --- a/packages/builder/src/analytics/constants.ts +++ b/packages/builder/src/analytics/constants.ts @@ -3,6 +3,8 @@ export const Events = { COMPONENT_UPDATED: "component:updated", APP_VIEW_PUBLISHED: "app:view_published", BLOCK_EJECTED: "block:ejected", + AI_JS_ACCEPTED: "ai_js:accepted", + AI_JS_REJECTED: "ai_js:rejected", } export const EventSource = { diff --git a/packages/builder/src/components/backend/DataTable/formula.js b/packages/builder/src/components/backend/DataTable/formula.js index 8dcda83c27..65506726e6 100644 --- a/packages/builder/src/components/backend/DataTable/formula.js +++ b/packages/builder/src/components/backend/DataTable/formula.js @@ -1,4 +1,4 @@ -import { FieldType } from "@budibase/types" +import { FieldType, FormulaType } from "@budibase/types" import { FIELDS } from "@/constants/backend" import { tables } from "@/stores/builder" import { get as svelteGet } from "svelte/store" @@ -8,7 +8,6 @@ import { makeReadableKeyPropSafe } from "@/dataBinding" const MAX_DEPTH = 1 const TYPES_TO_SKIP = [ - FieldType.FORMULA, FieldType.AI, FieldType.LONGFORM, FieldType.SIGNATURE_SINGLE, @@ -17,6 +16,18 @@ const TYPES_TO_SKIP = [ FieldType.INTERNAL, ] +const shouldSkipFieldSchema = fieldSchema => { + // Skip some types always + if (TYPES_TO_SKIP.includes(fieldSchema.type)) { + return true + } + // Skip dynamic formula fields + return ( + fieldSchema.type === FieldType.FORMULA && + fieldSchema.formulaType === FormulaType.DYNAMIC + ) +} + export function getBindings({ table, path = null, @@ -32,7 +43,7 @@ export function getBindings({ // skip relationships after a certain depth and types which // can't bind to if ( - TYPES_TO_SKIP.includes(schema.type) || + shouldSkipFieldSchema(schema) || (isRelationship && depth >= MAX_DEPTH) ) { continue diff --git a/packages/builder/src/components/common/CodeEditor/AIGen.svelte b/packages/builder/src/components/common/CodeEditor/AIGen.svelte new file mode 100644 index 0000000000..c7e3a0f1ce --- /dev/null +++ b/packages/builder/src/components/common/CodeEditor/AIGen.svelte @@ -0,0 +1,153 @@ + + +
+ {#if suggestedCode !== null} +
+ + Accept + + + Reject + +
+ {/if} + + +
+ + diff --git a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte index d68a399955..c159804e47 100644 --- a/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte +++ b/packages/builder/src/components/common/CodeEditor/CodeEditor.svelte @@ -6,13 +6,7 @@ + + + + + + + +
+

To enable BB AI:

+
    +
  • + Add your Budibase license key: + Budibase account portal +
  • +
  • + Go to the portal settings page, click AI and switch on BB AI +
  • +
+
+
+
+ {:else if creditsExceeded} + + + + + {#if accountPortalAccess} + Contact sales to unlock additional BB AI credits + {:else} + Contact your account holder to unlock additional BB AI credits + {/if} + + + + {:else} + + {/if} + + {/if} + + + diff --git a/packages/builder/src/dataBinding.js b/packages/builder/src/dataBinding.js index ada1ee274d..f71c838f18 100644 --- a/packages/builder/src/dataBinding.js +++ b/packages/builder/src/dataBinding.js @@ -1317,6 +1317,25 @@ const shouldReplaceBinding = (currentValue, from, convertTo, binding) => { return !invalids.find(invalid => noSpaces?.includes(invalid)) } +// If converting readable to runtime we need to ensure we don't replace words +// which are substrings of other words - e.g. a binding of `a` would turn +// `hah` into `h[a]h` which is obviously wrong. To avoid this we can remove all +// expanded versions of the binding to be replaced. +const excludeReadableExtensions = (string, binding) => { + // Escape any special chars in the binding so we can treat it as a literal + // string match in the regexes below + const escaped = binding.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + // Regex to find prefixed bindings (e.g. exclude xfoo for foo) + const regex1 = new RegExp(`[a-zA-Z0-9-_]+${escaped}[a-zA-Z0-9-_]*`, "g") + // Regex to find prefixed bindings (e.g. exclude foox for foo) + const regex2 = new RegExp(`[a-zA-Z0-9-_]*${escaped}[a-zA-Z0-9-_]+`, "g") + const matches = [...string.matchAll(regex1), ...string.matchAll(regex2)] + for (const match of matches) { + string = string.replace(match[0], new Array(match[0].length + 1).join("*")) + } + return string +} + /** * Utility function which replaces a string between given indices. */ @@ -1361,6 +1380,11 @@ const bindingReplacement = ( // in the search, working from longest to shortest so always use best match first let searchString = newBoundValue for (let from of convertFromProps) { + // If converting readable > runtime, blank out all extensions of this + // string to avoid partial matches + if (convertTo === "runtimeBinding") { + searchString = excludeReadableExtensions(searchString, from) + } const binding = bindableProperties.find(el => el[convertFrom] === from) if ( isJS || diff --git a/packages/builder/src/dataBinding.test.js b/packages/builder/src/dataBinding.test.js index 5e3b484e22..b406ef4277 100644 --- a/packages/builder/src/dataBinding.test.js +++ b/packages/builder/src/dataBinding.test.js @@ -72,6 +72,27 @@ describe("Builder dataBinding", () => { runtimeBinding: "count", type: "context", }, + { + category: "Bindings", + icon: "Brackets", + readableBinding: "location", + runtimeBinding: "[location]", + type: "context", + }, + { + category: "Bindings", + icon: "Brackets", + readableBinding: "foo.[bar]", + runtimeBinding: "[foo].[qwe]", + type: "context", + }, + { + category: "Bindings", + icon: "Brackets", + readableBinding: "foo.baz", + runtimeBinding: "[foo].[baz]", + type: "context", + }, ] it("should convert a readable binding to a runtime one", () => { const textWithBindings = `Hello {{ Current User.firstName }}! The count is {{ Binding.count }}.` @@ -83,6 +104,28 @@ describe("Builder dataBinding", () => { ) ).toEqual(`Hello {{ [user].[firstName] }}! The count is {{ count }}.`) }) + it("should not convert a partial match", () => { + const textWithBindings = `location {{ _location Zlocation location locationZ _location_ }}` + expect( + readableToRuntimeBinding( + bindableProperties, + textWithBindings, + "runtimeBinding" + ) + ).toEqual( + `location {{ _location Zlocation [location] locationZ _location_ }}` + ) + }) + it("should handle special characters in the readable binding", () => { + const textWithBindings = `{{ foo.baz }}` + expect( + readableToRuntimeBinding( + bindableProperties, + textWithBindings, + "runtimeBinding" + ) + ).toEqual(`{{ [foo].[baz] }}`) + }) }) describe("updateReferencesInObject", () => { diff --git a/packages/builder/src/pages/builder/app/[application]/data/_components/AITableGeneration.svelte b/packages/builder/src/pages/builder/app/[application]/data/_components/AITableGeneration.svelte new file mode 100644 index 0000000000..f51f6e2f71 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/data/_components/AITableGeneration.svelte @@ -0,0 +1,65 @@ + + +
+
+ +
+
+ {#if isEnabled} + {#each examplePrompts as prompt} + (promptText = prompt)} + >{prompt} + {/each} + {/if} +
+
+ + diff --git a/packages/builder/src/pages/builder/app/[application]/data/new.svelte b/packages/builder/src/pages/builder/app/[application]/data/new.svelte index 2ba23686ab..3d4094d6b4 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/new.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/new.svelte @@ -15,6 +15,9 @@ import IntegrationIcon from "@/components/backend/DatasourceNavigator/IntegrationIcon.svelte" import CreationPage from "@/components/common/CreationPage.svelte" import ICONS from "@/components/backend/DatasourceNavigator/icons/index.js" + import AiTableGeneration from "./_components/AITableGeneration.svelte" + import { featureFlag } from "@/helpers" + import { FeatureFlag } from "@budibase/types" let internalTableModal let externalDatasourceModal @@ -24,6 +27,10 @@ $: disabled = sampleDataLoading || externalDatasourceLoading + $: aiTableGenerationEnabled = featureFlag.isEnabled( + FeatureFlag.AI_TABLE_GENERATION + ) + const createSampleData = async () => { sampleDataLoading = true @@ -58,7 +65,12 @@ -
+
+ {#if aiTableGenerationEnabled} +
+ +
+ {/if} diff --git a/packages/builder/src/pages/builder/portal/account/usage.svelte b/packages/builder/src/pages/builder/portal/account/usage.svelte index d318f04e09..4fec2b5f02 100644 --- a/packages/builder/src/pages/builder/portal/account/usage.svelte +++ b/packages/builder/src/pages/builder/portal/account/usage.svelte @@ -32,6 +32,7 @@ const oneDayInSeconds = 86400 const EXCLUDE_QUOTAS = { + ["Day Passes"]: () => true, Queries: () => true, Users: license => { return license.plan.model !== PlanModel.PER_USER diff --git a/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte b/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte index fb040204c2..d7688835c3 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte +++ b/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte @@ -1,4 +1,4 @@ - diff --git a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte index ae36fd5b98..b569993cd1 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/index.svelte +++ b/packages/builder/src/pages/builder/portal/settings/ai/index.svelte @@ -1,4 +1,4 @@ -