tuna-agent 0.1.98 → 0.1.100

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.
@@ -353,7 +353,9 @@ export class ClaudeCodeAdapter {
353
353
  const finalText = turnAccumulatedText.trim() || result.result;
354
354
  if (finalText) {
355
355
  const simplified = simplifyMarkdown(finalText);
356
- if (!isSimilar(simplified, lastSentContent)) {
356
+ const simplifiedResult = simplifyMarkdown(result.result);
357
+ // Skip if similar to last sent content OR to task result (avoid duplicate in chat + session)
358
+ if (!isSimilar(simplified, lastSentContent) && !isSimilar(simplified, simplifiedResult)) {
357
359
  ws.sendPMMessage(task.id, {
358
360
  sender: 'pm',
359
361
  content: simplified,
@@ -362,7 +364,7 @@ export class ClaudeCodeAdapter {
362
364
  lastSentContent = simplified;
363
365
  }
364
366
  else {
365
- console.log(`[ClaudeCode] ⏭️ Skipping similar final message (${simplified.length} chars)`);
367
+ console.log(`[ClaudeCode] ⏭️ Skipping final message (duplicate of ${isSimilar(simplified, simplifiedResult) ? 'task result' : 'last sent'}, ${simplified.length} chars)`);
366
368
  }
367
369
  }
368
370
  // Last round → close
@@ -274,7 +274,8 @@ async function handleToolCall(config, toolName, args) {
274
274
  }
275
275
  case 'list_ideas': {
276
276
  const params = new URLSearchParams();
277
- params.set('agent_id', args.agent_id || config.agentId);
277
+ if (args.agent_id)
278
+ params.set('agent_id', args.agent_id);
278
279
  if (args.status)
279
280
  params.set('status', args.status);
280
281
  if (args.category)
@@ -284,13 +285,13 @@ async function handleToolCall(config, toolName, args) {
284
285
  if (args.page)
285
286
  params.set('page', args.page);
286
287
  if (args.limit)
287
- params.set('limit', args.limit);
288
+ params.set('limit', args.limit || '100');
288
289
  if (args.sort_by)
289
290
  params.set('sort_by', args.sort_by);
290
291
  if (args.sort_order)
291
292
  params.set('sort_order', args.sort_order);
292
293
  const data = await apiCall(config, 'GET', `/agent-idea?${params.toString()}`);
293
- const ideas = data.ideas || [];
294
+ const ideas = data.items || [];
294
295
  if (ideas.length === 0) {
295
296
  return { content: [{ type: 'text', text: 'No ideas found.' }] };
296
297
  }
@@ -318,7 +319,7 @@ async function handleToolCall(config, toolName, args) {
318
319
  if (args.limit)
319
320
  params.set('limit', args.limit);
320
321
  const data = await apiCall(config, 'GET', `/agent-idea/search?${params.toString()}`);
321
- const ideas = data.ideas || [];
322
+ const ideas = data.items || [];
322
323
  if (ideas.length === 0) {
323
324
  return { content: [{ type: 'text', text: `No ideas found matching "${args.query}".` }] };
324
325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuna-agent",
3
- "version": "0.1.98",
3
+ "version": "0.1.100",
4
4
  "description": "Tuna Agent - Run AI coding tasks on your machine",
5
5
  "bin": {
6
6
  "tuna-agent": "dist/cli/index.js"