From 91864b2992d84d464c8e8408fba2c8304acdcbce Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 5 Oct 2025 12:40:23 -0400 Subject: [PATCH] fix(ci): type check --- README.md | 6 +++--- lua/cp/commands/init.lua | 2 +- lua/cp/ui/panel.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bf9032d..58efb20 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ https://github.com/user-attachments/assets/50b19481-8e6d-47b4-bebc-15e16c61a9c9 - **Multi-platform support**: AtCoder, Codeforces, CSES with consistent interface - **Automatic problem setup**: Scrape test cases and metadata in seconds -- **Rich test output**: ANSI color support for compiler errors and program output -- **Language agnostic**: Works with any compiled language -- **Diff viewer**: Compare expected vs actual output with precision +- **Rich test output**: 256 color ANSI support for compiler errors and program output +- **Language agnostic**: Works with any language +- **Diff viewer**: Compare expected vs actual output with 3 diff modes ## Optional Dependencies diff --git a/lua/cp/commands/init.lua b/lua/cp/commands/init.lua index 1e0906c..2b58be3 100644 --- a/lua/cp/commands/init.lua +++ b/lua/cp/commands/init.lua @@ -102,7 +102,7 @@ function M.handle_command(opts) if cmd.action == 'interact' then ui.toggle_interactive() elseif cmd.action == 'run' then - ui.toggle_run_panel({ debug = false }) + ui.toggle_run_panel() elseif cmd.action == 'debug' then ui.toggle_run_panel({ debug = true }) elseif cmd.action == 'next' then diff --git a/lua/cp/ui/panel.lua b/lua/cp/ui/panel.lua index 5acaf2d..949d503 100644 --- a/lua/cp/ui/panel.lua +++ b/lua/cp/ui/panel.lua @@ -115,7 +115,7 @@ function M.toggle_interactive() state.set_active_panel('interactive') end ----@param run_opts RunOpts +---@param run_opts? RunOpts function M.toggle_run_panel(run_opts) if state.get_active_panel() == 'run' then if current_diff_layout then @@ -274,7 +274,7 @@ function M.toggle_run_panel(run_opts) config.hooks.before_run(state) end) end - if run_opts.debug and config.hooks and config.hooks.before_debug then + if run_opts and run_opts.debug and config.hooks and config.hooks.before_debug then vim.schedule_wrap(function() config.hooks.before_debug(state) end)