@polka-codes/core 0.9.21 → 0.9.23

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.
@@ -9,6 +9,7 @@ import type { ModelMessage as ModelMessage_2 } from 'ai';
9
9
  import type { TextPart } from 'ai';
10
10
  import type { ToolModelMessage } from '@ai-sdk/provider-utils';
11
11
  import type { UserContent } from '@ai-sdk/provider-utils';
12
+ import type { UserContent as UserContent_2 } from 'ai';
12
13
  import type { UserModelMessage } from '@ai-sdk/provider-utils';
13
14
  import { z } from 'zod';
14
15
 
@@ -1122,8 +1123,9 @@ declare class MultiAgent {
1122
1123
  agentName: string;
1123
1124
  task: string;
1124
1125
  context: string;
1126
+ files?: (ImagePart | FilePart)[];
1125
1127
  }): Promise<ExitReason>;
1126
- continueTask(userMessage: string): Promise<ExitReason>;
1128
+ continueTask(userMessage: UserContent_2): Promise<ExitReason>;
1127
1129
  get hasActiveAgent(): boolean;
1128
1130
  abort(): void;
1129
1131
  }
package/dist/index.js CHANGED
@@ -3049,8 +3049,13 @@ var MultiAgent = class {
3049
3049
  throw new Error("An active agent already exists");
3050
3050
  }
3051
3051
  this.#originalTask = options.task;
3052
- return this.#startTask(options.agentName, `<task>${options.task}</task>
3053
- <context>${options.context}</context>`);
3052
+ const userContent = options.files ?? [];
3053
+ userContent.push({
3054
+ type: "text",
3055
+ text: `<task>${options.task}</task>
3056
+ <context>${options.context}</context>`
3057
+ });
3058
+ return this.#startTask(options.agentName, userContent);
3054
3059
  }
3055
3060
  async continueTask(userMessage) {
3056
3061
  if (!this.#agents.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/core",
3
- "version": "0.9.21",
3
+ "version": "0.9.23",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",