@polka-codes/core 0.9.30 → 0.9.31
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 +1 -1
- package/dist/index.js +2 -7
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ declare abstract class AgentBase {
|
|
|
24
24
|
get messages(): Readonly<ModelMessage[]>;
|
|
25
25
|
setMessages(messages: Readonly<ModelMessage[]>): void;
|
|
26
26
|
start(prompt: UserContent): Promise<ExitReason>;
|
|
27
|
-
step(
|
|
27
|
+
step(message: (UserModelMessage | ToolModelMessage)[]): Promise<AssistantMessageContent[]>;
|
|
28
28
|
handleStepResponse(response: AssistantMessageContent[]): Promise<{
|
|
29
29
|
type: "reply";
|
|
30
30
|
message: (UserModelMessage | ToolModelMessage)[];
|
package/dist/index.js
CHANGED
|
@@ -1962,16 +1962,11 @@ ${instance.prompt}`;
|
|
|
1962
1962
|
this.#callback({ kind: "StartTask" /* StartTask */, agent: this, systemPrompt: this.config.systemPrompt });
|
|
1963
1963
|
return await this.#processLoop(prompt5);
|
|
1964
1964
|
}
|
|
1965
|
-
async step(
|
|
1965
|
+
async step(message) {
|
|
1966
1966
|
if (this.#messages.length === 0) {
|
|
1967
1967
|
this.#callback({ kind: "StartTask" /* StartTask */, agent: this, systemPrompt: this.config.systemPrompt });
|
|
1968
1968
|
}
|
|
1969
|
-
return await this.#request(
|
|
1970
|
-
{
|
|
1971
|
-
role: "user",
|
|
1972
|
-
content: prompt5
|
|
1973
|
-
}
|
|
1974
|
-
]);
|
|
1969
|
+
return await this.#request(message);
|
|
1975
1970
|
}
|
|
1976
1971
|
async handleStepResponse(response) {
|
|
1977
1972
|
return this.#handleResponse(response);
|