Commit 780c276
authored
feat(tui): improve reasoning and agent activity rendering (#231)
* fix(core): preserve reasoning summary indices
* test(core): cover completed reasoning summaries
* fix(tui): render reasoning summary boundaries
* feat(tui): render agent-centric activity tree
* fix(tui): harden RunAgents activity rendering
* fix(tui): prioritize active agent rows
* fix(tui): avoid reset ghosts on posix resize
* test(tui): tighten pty resize regressions
* fix(core): retain encrypted reasoning boundaries
* fix(tui): normalize agent activity labels
* feat(tui): extend agent activity tree to single Agent calls
Route single `Agent` tool calls through the same payload-free semantic
activity tree previously used only for `RunAgents`, so a lone subagent
renders per-agent status rows (waiting/running/thinking + reading…/
searching…/running command…) instead of raw nested tool calls, args, or
streamed output. Derive the running description from the tool `description`
argument, suppress stale pre-result activity once the parent returns, and
render the completed result via the dedicated result renderer.
Update the block, nested-lifecycle, integration, and card tests to the new
semantic contract (raw payloads never leak; first-result-wins dedup and
ancestry roll-up preserved), and fix the stale `RunAgents(`->`Agents(`
label assertion in the action-spacer test.
* fix(core): keep encrypted reasoning on summary-less responses
Address CodeRabbit review findings on the branch:
- core: a non-streaming OpenAI Responses reasoning item can return
encrypted_content with an empty summary; the conversion loop dropped it
entirely, diverging from the streaming output_item.done path and making
the reasoning boundary non-replayable. Emit an encrypted ThinkPart in
that case, mirroring the streaming behavior, with focused coverage.
- tui: render "1 agent" (singular) instead of "1 agents" in the grouped
agents summary, and make the uniform-status check explicitly boolean.
The two other flagged reasoning findings (summary-index preservation and
cross-output merge collisions) were verified against the code and tests
and are non-issues: real deltas always carry valid indices, and encrypted
boundaries already block adjacent cross-output merges.
* fix(tui): annotate agent activity mutators
* fix(tui): keep background agent activity live
* test(tui): synchronize shell cancellation e2e
* fix(tui): preserve pending agent activity in cards
* fix(tui): preserve reasoning and cancellation boundaries1 parent f84091b commit 780c276
26 files changed
Lines changed: 3000 additions & 336 deletions
File tree
- packages/pythinker-core
- src/pythinker_core
- contrib/chat_provider
- tests
- src/pythinker_code
- subagents
- ui/shell
- tool_renderers
- visualize
- wire
- tests
- core
- e2e
- ui_and_conv
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
Lines changed: 55 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
478 | 490 | | |
479 | 491 | | |
480 | 492 | | |
| |||
535 | 547 | | |
536 | 548 | | |
537 | 549 | | |
538 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
539 | 554 | | |
540 | 555 | | |
541 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
542 | 567 | | |
543 | 568 | | |
544 | 569 | | |
545 | 570 | | |
546 | 571 | | |
547 | 572 | | |
| 573 | + | |
548 | 574 | | |
549 | 575 | | |
550 | 576 | | |
| |||
565 | 591 | | |
566 | 592 | | |
567 | 593 | | |
568 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
569 | 605 | | |
570 | 606 | | |
571 | 607 | | |
572 | 608 | | |
573 | 609 | | |
574 | 610 | | |
575 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
576 | 619 | | |
577 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
578 | 628 | | |
579 | 629 | | |
580 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
304 | 319 | | |
305 | 320 | | |
306 | 321 | | |
| |||
Lines changed: 66 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
367 | 432 | | |
368 | 433 | | |
369 | 434 | | |
| |||
0 commit comments