@aigencydev/cli 0.3.1 → 0.3.2

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.
@@ -345,10 +345,23 @@ export const bashTool = async (params, ctx) => {
345
345
  duration: Date.now() - start,
346
346
  };
347
347
  }
348
+ let errorMsg;
349
+ if (result.exitCode !== 0) {
350
+ const stderrTrim = result.stderr.trim();
351
+ const stdoutTrim = result.stdout.trim();
352
+ const errorDetail = stderrTrim || stdoutTrim;
353
+ if (errorDetail) {
354
+ const tail = errorDetail.slice(-500);
355
+ errorMsg = `Komut başarısız (exit code ${result.exitCode}): ${tail}`;
356
+ }
357
+ else {
358
+ errorMsg = `Komut çıktı vermeden başarısız oldu (exit code ${result.exitCode}). Komut yanlış olabilir veya binary bulunamamış olabilir.`;
359
+ }
360
+ }
348
361
  return {
349
362
  success: result.exitCode === 0,
350
363
  output: output || "(çıktı yok)",
351
- error: result.exitCode !== 0 ? `Exit code ${result.exitCode}` : undefined,
364
+ error: errorMsg,
352
365
  metadata: {
353
366
  exit_code: result.exitCode,
354
367
  stdout_length: result.stdout.length,
package/dist/ui/App.js CHANGED
@@ -227,11 +227,20 @@ export function App({ session, initialMode, initialModel, cwd, projectRoot, init
227
227
  break;
228
228
  case "agent_tool_result": {
229
229
  const status = event.result.success ? "ok" : "error";
230
+ let displayContent;
231
+ if (event.result.success) {
232
+ displayContent = (event.result.output || "").slice(0, 500);
233
+ }
234
+ else {
235
+ const err = event.result.error || "Hata";
236
+ const out = (event.result.output || "").trim();
237
+ displayContent = out
238
+ ? `${err}\n\n${out.slice(0, 800)}`
239
+ : err;
240
+ }
230
241
  pushMessage({
231
242
  kind: "tool_result",
232
- content: event.result.success
233
- ? event.result.output.slice(0, 500)
234
- : event.result.error || "Hata",
243
+ content: displayContent,
235
244
  toolStatus: status,
236
245
  });
237
246
  void recorderRef.current.toolResult("unknown", event.result.success, event.result.output, event.result.error, event.stepId);
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
- export const CLI_VERSION = "0.3.1";
1
+ export const CLI_VERSION = "0.3.2";
2
2
  export const CLI_NAME = "aigency";
3
3
  export const CLI_DISPLAY_NAME = "AIGENCY CLI";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigencydev/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "AIGENCY CLI — terminalden yapay zeka destekli kod üretimi, dosya yönetimi ve proje otomasyonu.",
5
5
  "type": "module",
6
6
  "bin": {