@uniqueli/openwork 0.2.0 → 0.2.2

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.
@@ -20,7 +20,7 @@ const electronAPI = {
20
20
  const api = {
21
21
  agent: {
22
22
  // Send message and receive events via callback
23
- invoke: (threadId, message, onEvent) => {
23
+ invoke: (threadId, message, onEvent, modelId) => {
24
24
  const channel = `agent:stream:${threadId}`;
25
25
  const handler = (_, data) => {
26
26
  onEvent(data);
@@ -29,13 +29,13 @@ const api = {
29
29
  }
30
30
  };
31
31
  electron.ipcRenderer.on(channel, handler);
32
- electron.ipcRenderer.send("agent:invoke", { threadId, message });
32
+ electron.ipcRenderer.send("agent:invoke", { threadId, message, modelId });
33
33
  return () => {
34
34
  electron.ipcRenderer.removeListener(channel, handler);
35
35
  };
36
36
  },
37
37
  // Stream agent events for useStream transport
38
- streamAgent: (threadId, message, command, onEvent) => {
38
+ streamAgent: (threadId, message, command, onEvent, modelId) => {
39
39
  const channel = `agent:stream:${threadId}`;
40
40
  const handler = (_, data) => {
41
41
  onEvent(data);
@@ -45,9 +45,9 @@ const api = {
45
45
  };
46
46
  electron.ipcRenderer.on(channel, handler);
47
47
  if (command) {
48
- electron.ipcRenderer.send("agent:resume", { threadId, command });
48
+ electron.ipcRenderer.send("agent:resume", { threadId, command, modelId });
49
49
  } else {
50
- electron.ipcRenderer.send("agent:invoke", { threadId, message });
50
+ electron.ipcRenderer.send("agent:invoke", { threadId, message, modelId });
51
51
  }
52
52
  return () => {
53
53
  electron.ipcRenderer.removeListener(channel, handler);
@@ -116,14 +116,17 @@ const api = {
116
116
  deleteApiKey: (provider) => {
117
117
  return electron.ipcRenderer.invoke("models:deleteApiKey", provider);
118
118
  },
119
- getCustomApiConfig: () => {
120
- return electron.ipcRenderer.invoke("models:getCustomApiConfig");
119
+ getCustomApiConfig: (id) => {
120
+ return electron.ipcRenderer.invoke("models:getCustomApiConfig", id);
121
+ },
122
+ getCustomApiConfigs: () => {
123
+ return electron.ipcRenderer.invoke("models:getCustomApiConfigs");
121
124
  },
122
125
  setCustomApiConfig: (config) => {
123
126
  return electron.ipcRenderer.invoke("models:setCustomApiConfig", config);
124
127
  },
125
- deleteCustomApiConfig: () => {
126
- return electron.ipcRenderer.invoke("models:deleteCustomApiConfig");
128
+ deleteCustomApiConfig: (id) => {
129
+ return electron.ipcRenderer.invoke("models:deleteCustomApiConfig", id);
127
130
  }
128
131
  },
129
132
  workspace: {