3 Commits

Author SHA1 Message Date
8bcf3257e2 v1.5.2
Some checks failed
Default (tags) / security (push) Successful in 33s
Default (tags) / test (push) Failing after 35s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2026-01-20 02:54:58 +00:00
6753553394 fix(): no changes in this diff; nothing to release 2026-01-20 02:54:58 +00:00
a46dbd0da6 fix(driveragent): enable streaming for native tool calling methods 2026-01-20 02:54:45 +00:00
4 changed files with 39 additions and 19 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 2026-01-20 - 1.5.2 - fix()
no changes in this diff; nothing to release
- No files changed; no release required
- No code or dependency changes detected
## 2026-01-20 - 1.5.1 - fix(smartagent)
bump patch version to 1.5.1 (no changes in diff)

View File

@@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartagent",
"version": "1.5.1",
"version": "1.5.2",
"private": false,
"description": "an agentic framework built on top of @push.rocks/smartai",
"main": "dist_ts/index.js",

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartagent',
version: '1.5.1',
version: '1.5.2',
description: 'an agentic framework built on top of @push.rocks/smartai'
}

View File

@@ -478,18 +478,25 @@ Your complete output here
// Check if provider supports native tool calling (Ollama)
const provider = this.provider as any;
if (typeof provider.chatWithOptions !== 'function') {
if (typeof provider.collectStreamResponse !== 'function') {
throw new Error('Provider does not support native tool calling. Use startTask() instead.');
}
// Call with tools
const response = await provider.chatWithOptions({
systemMessage: fullSystemMessage,
userMessage: userMessage,
messageHistory: [],
images: images,
tools: tools.length > 0 ? tools : undefined,
});
// Use collectStreamResponse for streaming support with tools
const response = await provider.collectStreamResponse(
{
systemMessage: fullSystemMessage,
userMessage: userMessage,
messageHistory: [],
images: images,
tools: tools.length > 0 ? tools : undefined,
},
// Pass onToken callback through onChunk for streaming
this.onToken ? (chunk: any) => {
if (chunk.thinking && this.onToken) this.onToken(chunk.thinking);
if (chunk.content && this.onToken) this.onToken(chunk.content);
} : undefined
);
// Add assistant response to history
const historyMessage: plugins.smartai.ChatMessage = {
@@ -555,17 +562,24 @@ Your complete output here
// Check if provider supports native tool calling
const provider = this.provider as any;
if (typeof provider.chatWithOptions !== 'function') {
if (typeof provider.collectStreamResponse !== 'function') {
throw new Error('Provider does not support native tool calling. Use continueWithMessage() instead.');
}
// Call with tools
const response = await provider.chatWithOptions({
systemMessage: fullSystemMessage,
userMessage: message,
messageHistory: historyForChat,
tools: tools.length > 0 ? tools : undefined,
});
// Use collectStreamResponse for streaming support with tools
const response = await provider.collectStreamResponse(
{
systemMessage: fullSystemMessage,
userMessage: message,
messageHistory: historyForChat,
tools: tools.length > 0 ? tools : undefined,
},
// Pass onToken callback through onChunk for streaming
this.onToken ? (chunk: any) => {
if (chunk.thinking && this.onToken) this.onToken(chunk.thinking);
if (chunk.content && this.onToken) this.onToken(chunk.content);
} : undefined
);
// Add assistant response to history
this.messageHistory.push({