pika-plugin-ai 0.6.8 → 0.6.9
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -184,8 +184,10 @@ type RequestOptions = {
|
|
|
184
184
|
credentials?: RequestCredentials;
|
|
185
185
|
};
|
|
186
186
|
type ThinkingLevel = "none" | "low" | "medium" | "high";
|
|
187
|
+
type VertexModel = "auto" | "gemini-3.1-pro-preview" | "gemini-2.5-pro" | "gemini-2.5-flash";
|
|
187
188
|
type AiSettings = {
|
|
188
189
|
thinkingLevel: ThinkingLevel;
|
|
190
|
+
vertexModel: VertexModel;
|
|
189
191
|
urlContext: boolean;
|
|
190
192
|
googleSearch: boolean;
|
|
191
193
|
enterpriseWebSearch: boolean;
|
|
@@ -258,4 +260,4 @@ declare function Chat({ chat, host, prepareRequest, settings, }: {
|
|
|
258
260
|
}): react_jsx_runtime.JSX.Element;
|
|
259
261
|
declare function createAiPlugin(opts?: AiPluginProps): Plugin;
|
|
260
262
|
|
|
261
|
-
export { type AddOperation, type AiPluginProps, type AiSettings, type AttachedImage, Chat, type ComponentAiParams, type DataToolStatus, type DeleteOperation, type DuplicateOperation, type FieldAiParams, type JSONSchema, type MoveOperation, type Operation, type PuckMessage, type RequestOptions, type ResetOperation, type TargetComponent, type ThinkingLevel, type ToolStatus, type UpdateOperation, type UpdateRootOperation, createAiPlugin, createAiPlugin as default };
|
|
263
|
+
export { type AddOperation, type AiPluginProps, type AiSettings, type AttachedImage, Chat, type ComponentAiParams, type DataToolStatus, type DeleteOperation, type DuplicateOperation, type FieldAiParams, type JSONSchema, type MoveOperation, type Operation, type PuckMessage, type RequestOptions, type ResetOperation, type TargetComponent, type ThinkingLevel, type ToolStatus, type UpdateOperation, type UpdateRootOperation, type VertexModel, createAiPlugin, createAiPlugin as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -184,8 +184,10 @@ type RequestOptions = {
|
|
|
184
184
|
credentials?: RequestCredentials;
|
|
185
185
|
};
|
|
186
186
|
type ThinkingLevel = "none" | "low" | "medium" | "high";
|
|
187
|
+
type VertexModel = "auto" | "gemini-3.1-pro-preview" | "gemini-2.5-pro" | "gemini-2.5-flash";
|
|
187
188
|
type AiSettings = {
|
|
188
189
|
thinkingLevel: ThinkingLevel;
|
|
190
|
+
vertexModel: VertexModel;
|
|
189
191
|
urlContext: boolean;
|
|
190
192
|
googleSearch: boolean;
|
|
191
193
|
enterpriseWebSearch: boolean;
|
|
@@ -258,4 +260,4 @@ declare function Chat({ chat, host, prepareRequest, settings, }: {
|
|
|
258
260
|
}): react_jsx_runtime.JSX.Element;
|
|
259
261
|
declare function createAiPlugin(opts?: AiPluginProps): Plugin;
|
|
260
262
|
|
|
261
|
-
export { type AddOperation, type AiPluginProps, type AiSettings, type AttachedImage, Chat, type ComponentAiParams, type DataToolStatus, type DeleteOperation, type DuplicateOperation, type FieldAiParams, type JSONSchema, type MoveOperation, type Operation, type PuckMessage, type RequestOptions, type ResetOperation, type TargetComponent, type ThinkingLevel, type ToolStatus, type UpdateOperation, type UpdateRootOperation, createAiPlugin, createAiPlugin as default };
|
|
263
|
+
export { type AddOperation, type AiPluginProps, type AiSettings, type AttachedImage, Chat, type ComponentAiParams, type DataToolStatus, type DeleteOperation, type DuplicateOperation, type FieldAiParams, type JSONSchema, type MoveOperation, type Operation, type PuckMessage, type RequestOptions, type ResetOperation, type TargetComponent, type ThinkingLevel, type ToolStatus, type UpdateOperation, type UpdateRootOperation, type VertexModel, createAiPlugin, createAiPlugin as default };
|
package/dist/index.js
CHANGED
|
@@ -342,6 +342,7 @@ function attachedImageToFileUIPart(img) {
|
|
|
342
342
|
}
|
|
343
343
|
var DEFAULT_AI_SETTINGS = {
|
|
344
344
|
thinkingLevel: "none",
|
|
345
|
+
vertexModel: "auto",
|
|
345
346
|
urlContext: false,
|
|
346
347
|
googleSearch: false,
|
|
347
348
|
enterpriseWebSearch: false,
|
|
@@ -1257,6 +1258,34 @@ function SettingsPanel({
|
|
|
1257
1258
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "puck-ai-settings-scroll", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "puck-ai-settings", children: [
|
|
1258
1259
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "puck-ai-settings-section", children: [
|
|
1259
1260
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "puck-ai-settings-section-title", children: "Model settings" }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "puck-ai-settings-row", children: [
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1263
|
+
"label",
|
|
1264
|
+
{
|
|
1265
|
+
className: "puck-ai-settings-label",
|
|
1266
|
+
htmlFor: "puck-ai-vertex-model",
|
|
1267
|
+
children: [
|
|
1268
|
+
"Model",
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "puck-ai-settings-hint", children: "Auto retries across models if the current region lacks support" })
|
|
1270
|
+
]
|
|
1271
|
+
}
|
|
1272
|
+
),
|
|
1273
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1274
|
+
"select",
|
|
1275
|
+
{
|
|
1276
|
+
id: "puck-ai-vertex-model",
|
|
1277
|
+
className: "puck-ai-settings-select",
|
|
1278
|
+
value: settings.vertexModel,
|
|
1279
|
+
onChange: (e) => onChange({ vertexModel: e.target.value }),
|
|
1280
|
+
children: [
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "auto", children: "Auto (recommended)" }),
|
|
1282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "gemini-3.1-pro-preview", children: "Gemini 3.1 Pro (preview)" }),
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "gemini-2.5-pro", children: "Gemini 2.5 Pro" }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "gemini-2.5-flash", children: "Gemini 2.5 Flash" })
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
] }),
|
|
1260
1289
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "puck-ai-settings-row", children: [
|
|
1261
1290
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1262
1291
|
"label",
|
|
@@ -1604,6 +1633,8 @@ function Chat({
|
|
|
1604
1633
|
const geminiConfig = {};
|
|
1605
1634
|
if (currentSettings.thinkingLevel !== "none")
|
|
1606
1635
|
geminiConfig.thinkingLevel = currentSettings.thinkingLevel;
|
|
1636
|
+
if (currentSettings.vertexModel !== "auto")
|
|
1637
|
+
geminiConfig.vertexModel = currentSettings.vertexModel;
|
|
1607
1638
|
if (currentSettings.urlContext) geminiConfig.urlContext = true;
|
|
1608
1639
|
if (currentSettings.browserCapture) {
|
|
1609
1640
|
geminiConfig.browserCapture = true;
|