@knime/scripting-editor 0.0.91 → 0.0.92

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.
@@ -1,13 +1,13 @@
1
1
  import { l as i } from "./log-BmIREpQ5.js";
2
- function c(r) {
2
+ function t(r) {
3
3
  return new Promise((n) => setTimeout(n, r));
4
4
  }
5
- const t = 100, l = 2e3, S = (r, ...n) => {
5
+ const c = 100, l = 2e3, a = (r, ...n) => {
6
6
  typeof consola > "u" ? console.error(r, ...n) : consola.error(r, ...n);
7
- }, a = (r) => {
7
+ }, g = (r) => {
8
8
  const n = /* @__PURE__ */ new Map(), o = {
9
9
  suggestCode: async () => {
10
- await c(l);
10
+ await t(l);
11
11
  const e = n.get("codeSuggestion");
12
12
  return typeof e < "u" && e({
13
13
  status: "SUCCESS",
@@ -18,7 +18,7 @@ const t = 100, l = 2e3, S = (r, ...n) => {
18
18
  };
19
19
  return {
20
20
  async sendToService(e, s) {
21
- return i(`Called scriptingService.sendToService("${e}")`, s), await c(t), r.sendToServiceMockResponses && e in r.sendToServiceMockResponses ? r.sendToServiceMockResponses[e](s) : e in o ? o[e](s) : (S(
21
+ return i(`Called scriptingService.sendToService("${e}")`, s), await t(c), r.sendToServiceMockResponses && e in r.sendToServiceMockResponses ? r.sendToServiceMockResponses[e](s) : e in o ? o[e](s) : (a(
22
22
  `${e} not implemented in sendToServiceMockResponses.
23
23
  Returning undefined.`
24
24
  ), Promise.resolve());
@@ -38,10 +38,15 @@ const t = 100, l = 2e3, S = (r, ...n) => {
38
38
  connectToLanguageServer() {
39
39
  return i("Called scriptingService.connectToLanguageServer"), Promise.reject(new Error("No language server in mock"));
40
40
  },
41
+ getAiDisclaimer() {
42
+ return i("Called scriptingService.getAiDisclaimer"), Promise.resolve(
43
+ "This is a fake AI disclaimer. Enjoy the AI. It does nothing!"
44
+ );
45
+ },
41
46
  // Console handling
42
47
  eventHandlers: n
43
48
  };
44
49
  };
45
50
  export {
46
- a as createScriptingServiceMock
51
+ g as createScriptingServiceMock
47
52
  };
@@ -46,16 +46,6 @@ export type UseCodeEditorReturn = {
46
46
  * @param requiredImport the import to add before the text. Can be left out.
47
47
  */
48
48
  insertColumnReference: (textToInsert: string, requiredImport?: string) => void;
49
- /**
50
- * Inserts the specified function reference at the current cursor position in the editor.
51
- * Uses snippets to give really nice insertion behavior for function arguments. If the
52
- * arguments are null, the function will be inserted without arguments OR brackets.
53
- * If the arguments are an empty list, the function will be inserted with empty brackets.
54
- *
55
- * @param functionName
56
- * @param functionArgs the arguments to the function.
57
- */
58
- insertFunctionReference: (functionName: string, functionArgs: string[] | null) => void;
59
49
  };
60
50
  export type UseDiffEditorParams = ContainerParams & {
61
51
  originalModel: monaco.editor.ITextModel;
@@ -5,7 +5,8 @@ declare const scriptingService: {
5
5
  registerEventHandler(type: string, handler: (args: any) => void): void;
6
6
  connectToLanguageServer(): Promise<MonacoLSPConnection>;
7
7
  isCallKnimeUiApiAvailable(portToTestFor: PortConfig): Promise<boolean>;
8
- isLoggedIntoHub(): Promise<any>;
8
+ isLoggedIntoHub(): Promise<boolean>;
9
+ getAiDisclaimer(): Promise<string>;
9
10
  };
10
11
  export type ScriptingServiceType = typeof scriptingService;
11
12
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@knime/scripting-editor",
3
3
  "type": "module",
4
- "version": "0.0.91",
4
+ "version": "0.0.92",
5
5
  "description": "Shared Scripting Editor components for KNIME",
6
6
  "author": "KNIME AG, Zurich, Switzerland",
7
7
  "license": "See the file license.txt",