Commit df72776
authored
chore(workspace): fix bugs, remove dead code, improve performance (#193)
* Comprehensive codebase cleanup: fix bugs, remove dead code, fix performance issues
- Fix watcher tests: add serial_test to prevent race conditions in cortex-skills
- Fix unsafe arithmetic: use saturating_sub/floor_char_boundary in TUI rendering
to prevent panics on small terminal sizes
- Remove dead code in cortex-tui: delete unused functions (_save_provider_api_key,
_remove_mcp_server, _get_chat_area, _handle_backend_event, _handle_app_event,
_handle_subagent_event, _handle_subagent_completed, _handle_subagent_failed,
_get_remote_server_config, _render_tool_call, _render_subagent,
_render_chat_with_welcome, _generate_welcome_lines, _generate_message_lines,
_render_messages_only, calculate_messages_height, render_message,
render_text_content, render_streaming_content, render_motd_compact,
render_welcome_text, cmd_mcp_auth, cmd_mcp_logs, is_cjk_char,
allocate_remaining, remaining_height), remove dead variables
- Remove dead code in cortex-engine: move NoOpDelegate, ChannelDelegate,
CompositeDelegate, TruncateTransformer, StripAnsiTransformer, NonEmptyFilter,
TurnBuilder into #[cfg(test)] modules; delete unused ProfileSessionState
- Performance: replace unnecessary Vec clones in config_loader and template
iteration; replace format!("{}", x) with x.to_string() in 5 locations
- Remove 3 unnecessary clippy lint suppressions from cortex-engine lib.rs
* style: fix formatting issues — remove extra blank lines, fix import ordering
* style: fix remaining formatting issue in login.rs1 parent a936194 commit df72776
31 files changed
Lines changed: 307 additions & 1208 deletions
File tree
- cortex-tui-framework/crates/cortex-tui-text/src
- src
- cortex-compact/src/auto_compaction
- cortex-engine/src
- agent
- tools/handlers/subagent
- cortex-skills
- src
- cortex-tui/src
- commands/executor
- interactive
- builders
- modal
- mcp_manager
- runner/event_loop
- session
- views
- minimal_session
- widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 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 | 385 | | |
413 | 386 | | |
414 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments