@harborclient/sdk 1.3.3 → 1.3.4
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/CHANGELOG.md +10 -0
- package/dist/components/AnchorMenuPanel/index.d.ts +35 -0
- package/dist/components/AnchorMenuPanel/index.d.ts.map +1 -0
- package/dist/components/AnchorMenuPanel/index.js +364 -0
- package/dist/components/FormGroup/index.d.ts +7 -1
- package/dist/components/FormGroup/index.d.ts.map +1 -1
- package/dist/components/FormGroup/index.js +8 -11
- package/dist/components/PageSidebar/index.d.ts +1 -0
- package/dist/components/PageSidebar/index.d.ts.map +1 -1
- package/dist/components/PageSidebar/index.js +4 -13
- package/dist/components/Resizable/useResizable.d.ts +6 -0
- package/dist/components/Resizable/useResizable.d.ts.map +1 -1
- package/dist/components/Resizable/useResizable.js +113 -11
- package/dist/components/SettingFieldActions/index.d.ts +42 -0
- package/dist/components/SettingFieldActions/index.d.ts.map +1 -0
- package/dist/components/SettingFieldActions/index.js +66 -0
- package/dist/components/SidebarItem/SidebarHistoryItem.d.ts +5 -1
- package/dist/components/SidebarItem/SidebarHistoryItem.d.ts.map +1 -1
- package/dist/components/SidebarItem/SidebarHistoryItem.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/runtime/createBridgedPluginContext.js +166 -2
- package/dist/snippets.d.ts +22 -0
- package/dist/types.d.ts +858 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/snippets.d.ts
CHANGED
|
@@ -317,6 +317,17 @@ interface HcResponseApi {
|
|
|
317
317
|
document(): HcResponseDocument;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Optional configuration for hc.ask.
|
|
322
|
+
*/
|
|
323
|
+
interface HcAskOptions {
|
|
324
|
+
/**
|
|
325
|
+
* Model selection as `"name"` or `"name: source"`.
|
|
326
|
+
* Omit to use the first available model.
|
|
327
|
+
*/
|
|
328
|
+
model?: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
320
331
|
/**
|
|
321
332
|
* HarborClient script sandbox API exposed as the global hc object.
|
|
322
333
|
*/
|
|
@@ -357,6 +368,17 @@ interface HcScriptApi {
|
|
|
357
368
|
* @throws When the setting is disabled or sendRequest is unavailable in this context.
|
|
358
369
|
*/
|
|
359
370
|
sendRequest(req: HcSendRequestInput): Promise<HcSendRequestResponse>;
|
|
371
|
+
/**
|
|
372
|
+
* Sends a one-shot prompt to a configured AI model.
|
|
373
|
+
* Includes the current send's request (and response in post-request scripts)
|
|
374
|
+
* in the model context. Returns null when AI is not configured or the
|
|
375
|
+
* model selection cannot be resolved.
|
|
376
|
+
*
|
|
377
|
+
* @param prompt - Text sent to the model.
|
|
378
|
+
* @param options - Optional `{ model }` where model is `"name"` or `"name: source"`.
|
|
379
|
+
* Omit model (or options) to use the first available model.
|
|
380
|
+
*/
|
|
381
|
+
ask(prompt: string, options?: HcAskOptions): Promise<string | null>;
|
|
360
382
|
test(name: string, fn: () => void): void;
|
|
361
383
|
/** Chai BDD expect; see https://www.chaijs.com/api/bdd/ */
|
|
362
384
|
expect: HcExpectStatic;
|