@adminforth/agent 1.16.4 → 1.17.0

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/build.log CHANGED
@@ -31,5 +31,5 @@ custom/skills/fetch_data/SKILL.md
31
31
  custom/skills/mutate_data/
32
32
  custom/skills/mutate_data/SKILL.md
33
33
 
34
- sent 185,131 bytes received 436 bytes 371,134.00 bytes/sec
35
- total size is 183,342 speedup is 0.99
34
+ sent 185,223 bytes received 432 bytes 371,310.00 bytes/sec
35
+ total size is 183,434 speedup is 0.99
@@ -193,6 +193,7 @@ const props = defineProps<{
193
193
  name: string;
194
194
  }>;
195
195
  defaultModeName: string | null;
196
+ stickByDefault: boolean;
196
197
  }
197
198
  }>();
198
199
 
@@ -245,6 +246,7 @@ onMounted(async () => {
245
246
  agentStore.setAvailableModes(props.meta.modes, props.meta.defaultModeName);
246
247
  agentStore.regisrerTextInput(textInput.value);
247
248
  textInput.value?.focus();
249
+ agentStore.setIsTeleportedToBody(props.meta.stickByDefault);
248
250
  await agentStore.fetchSessionsList();
249
251
  });
250
252
 
@@ -193,6 +193,7 @@ const props = defineProps<{
193
193
  name: string;
194
194
  }>;
195
195
  defaultModeName: string | null;
196
+ stickByDefault: boolean;
196
197
  }
197
198
  }>();
198
199
 
@@ -245,6 +246,7 @@ onMounted(async () => {
245
246
  agentStore.setAvailableModes(props.meta.modes, props.meta.defaultModeName);
246
247
  agentStore.regisrerTextInput(textInput.value);
247
248
  textInput.value?.focus();
249
+ agentStore.setIsTeleportedToBody(props.meta.stickByDefault);
248
250
  await agentStore.fetchSessionsList();
249
251
  });
250
252
 
package/dist/index.js CHANGED
@@ -100,7 +100,7 @@ export default class AdminForthAgentPlugin extends AdminForthPlugin {
100
100
  modifyResourceConfig: { get: () => super.modifyResourceConfig }
101
101
  });
102
102
  return __awaiter(this, void 0, void 0, function* () {
103
- var _a;
103
+ var _a, _b;
104
104
  _super.modifyResourceConfig.call(this, adminforth, resourceConfig);
105
105
  if (!((_a = this.options.modes) === null || _a === void 0 ? void 0 : _a.length)) {
106
106
  throw new Error("modes is required for AdminForthAgentPlugin");
@@ -114,6 +114,7 @@ export default class AdminForthAgentPlugin extends AdminForthPlugin {
114
114
  pluginInstanceId: this.pluginInstanceId,
115
115
  modes: this.options.modes.map((mode) => ({ name: mode.name })),
116
116
  defaultModeName: this.options.modes[0].name,
117
+ stickByDefault: (_b = this.options.stickByDefault) !== null && _b !== void 0 ? _b : false,
117
118
  }
118
119
  });
119
120
  if (!this.pluginOptions.sessionResource) {
package/index.ts CHANGED
@@ -130,6 +130,7 @@ export default class AdminForthAgentPlugin extends AdminForthPlugin {
130
130
  pluginInstanceId: this.pluginInstanceId,
131
131
  modes: this.options.modes.map((mode) => ({ name: mode.name })),
132
132
  defaultModeName: this.options.modes[0].name,
133
+ stickByDefault: this.options.stickByDefault ?? false,
133
134
  }
134
135
  });
135
136
  if (!this.pluginOptions.sessionResource) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.16.4",
3
+ "version": "1.17.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/types.ts CHANGED
@@ -70,4 +70,9 @@ export interface PluginOptions extends PluginsCommonOptions {
70
70
  * Resource configuration for turns.
71
71
  */
72
72
  turnResource: ITurnResource;
73
+
74
+ /**
75
+ * Makes chat sticky by default. By default this prop is false
76
+ */
77
+ stickByDefault?: boolean;
73
78
  }