@polka-codes/core 0.9.22 → 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.
- package/dist/_tsup-dts-rollup.d.ts +3 -1
- package/dist/index.js +7 -2
- package/package.json +1 -1
|
@@ -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:
|
|
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
|
-
|
|
3053
|
-
|
|
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) {
|