practicode
Advanced tools
@@ -29,2 +29,3 @@ { | ||
| "cmd_next": "Open the next problem", | ||
| "cmd_generate": "Generate a new problem now", | ||
| "cmd_prev": "Open the previous problem", | ||
@@ -31,0 +32,0 @@ "cmd_list": "Browse problems", |
@@ -29,2 +29,3 @@ { | ||
| "cmd_next": "Abrir el siguiente problema", | ||
| "cmd_generate": "Generar un problema nuevo ahora", | ||
| "cmd_prev": "Abrir el problema anterior", | ||
@@ -31,0 +32,0 @@ "cmd_list": "Abrir la lista de problemas", |
@@ -29,2 +29,3 @@ { | ||
| "cmd_next": "次の問題を開く", | ||
| "cmd_generate": "新しい問題を今すぐ生成", | ||
| "cmd_prev": "前の問題を開く", | ||
@@ -31,0 +32,0 @@ "cmd_list": "問題一覧を開く", |
@@ -29,2 +29,3 @@ { | ||
| "cmd_next": "다음 문제 열기", | ||
| "cmd_generate": "새 문제를 바로 생성", | ||
| "cmd_prev": "이전 문제 열기", | ||
@@ -31,0 +32,0 @@ "cmd_list": "문제 목록 열기", |
@@ -29,2 +29,3 @@ { | ||
| "cmd_next": "打开下一题", | ||
| "cmd_generate": "立即生成新题", | ||
| "cmd_prev": "打开上一题", | ||
@@ -31,0 +32,0 @@ "cmd_list": "打开题目列表", |
+241
-152
@@ -18,2 +18,17 @@ # This file is automatically @generated by Cargo. | ||
| [[package]] | ||
| name = "approx" | ||
| version = "0.5.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" | ||
| dependencies = [ | ||
| "num-traits", | ||
| ] | ||
| [[package]] | ||
| name = "autocfg" | ||
| version = "1.5.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" | ||
| [[package]] | ||
| name = "bitflags" | ||
@@ -25,6 +40,6 @@ version = "2.13.0" | ||
| [[package]] | ||
| name = "cassowary" | ||
| version = "0.3.0" | ||
| name = "by_address" | ||
| version = "1.2.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" | ||
| checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" | ||
@@ -48,5 +63,5 @@ [[package]] | ||
| name = "compact_str" | ||
| version = "0.8.2" | ||
| version = "0.9.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7fd622ebbb56a5b2ccb651b32b911cdeb2a9b4b11776b2473bf26a26a286244e" | ||
| checksum = "9dfdd1c2274d9aa354115b09dc9a901d6c5576818cdf70d14cae2bdb47df00ab" | ||
| dependencies = [ | ||
@@ -72,18 +87,2 @@ "castaway", | ||
| name = "crossterm" | ||
| version = "0.28.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" | ||
| dependencies = [ | ||
| "bitflags", | ||
| "crossterm_winapi", | ||
| "mio", | ||
| "parking_lot", | ||
| "rustix 0.38.44", | ||
| "signal-hook", | ||
| "signal-hook-mio", | ||
| "winapi", | ||
| ] | ||
| [[package]] | ||
| name = "crossterm" | ||
| version = "0.29.0" | ||
@@ -99,3 +98,3 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| "parking_lot", | ||
| "rustix 1.1.4", | ||
| "rustix", | ||
| "signal-hook", | ||
@@ -150,2 +149,8 @@ "signal-hook-mio", | ||
| [[package]] | ||
| name = "deranged" | ||
| version = "0.5.8" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" | ||
| [[package]] | ||
| name = "derive_more" | ||
@@ -200,16 +205,22 @@ version = "2.1.1" | ||
| "libc", | ||
| "windows-sys 0.61.2", | ||
| "windows-sys", | ||
| ] | ||
| [[package]] | ||
| name = "fast-srgb8" | ||
| version = "1.0.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" | ||
| [[package]] | ||
| name = "foldhash" | ||
| version = "0.1.5" | ||
| version = "0.2.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" | ||
| checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" | ||
| [[package]] | ||
| name = "hashbrown" | ||
| version = "0.15.5" | ||
| version = "0.16.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" | ||
| checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" | ||
| dependencies = [ | ||
@@ -222,2 +233,13 @@ "allocator-api2", | ||
| [[package]] | ||
| name = "hashbrown" | ||
| version = "0.17.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" | ||
| dependencies = [ | ||
| "allocator-api2", | ||
| "equivalent", | ||
| "foldhash", | ||
| ] | ||
| [[package]] | ||
| name = "heck" | ||
@@ -258,5 +280,5 @@ version = "0.5.0" | ||
| name = "itertools" | ||
| version = "0.13.0" | ||
| version = "0.14.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" | ||
| checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" | ||
| dependencies = [ | ||
@@ -273,2 +295,13 @@ "either", | ||
| [[package]] | ||
| name = "kasuari" | ||
| version = "0.4.12" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "bde5057d6143cc94e861d90f591b9303d6716c6b9602309150bd068853c10899" | ||
| dependencies = [ | ||
| "hashbrown 0.16.1", | ||
| "portable-atomic", | ||
| "thiserror", | ||
| ] | ||
| [[package]] | ||
| name = "libc" | ||
@@ -280,8 +313,17 @@ version = "0.2.186" | ||
| [[package]] | ||
| name = "linux-raw-sys" | ||
| version = "0.4.15" | ||
| name = "libm" | ||
| version = "0.2.16" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" | ||
| checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" | ||
| [[package]] | ||
| name = "line-clipping" | ||
| version = "0.3.7" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "3f50e8f47623268b5407192d26876c4d7f89d686ca130fdc53bced4814cd29f8" | ||
| dependencies = [ | ||
| "bitflags", | ||
| ] | ||
| [[package]] | ||
| name = "linux-raw-sys" | ||
@@ -315,7 +357,7 @@ version = "0.12.1" | ||
| name = "lru" | ||
| version = "0.12.5" | ||
| version = "0.18.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" | ||
| checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" | ||
| dependencies = [ | ||
| "hashbrown", | ||
| "hashbrown 0.17.1", | ||
| ] | ||
@@ -338,6 +380,54 @@ | ||
| "wasi", | ||
| "windows-sys 0.61.2", | ||
| "windows-sys", | ||
| ] | ||
| [[package]] | ||
| name = "num-conv" | ||
| version = "0.2.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" | ||
| [[package]] | ||
| name = "num-traits" | ||
| version = "0.2.19" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" | ||
| dependencies = [ | ||
| "autocfg", | ||
| ] | ||
| [[package]] | ||
| name = "num_threads" | ||
| version = "0.1.7" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" | ||
| dependencies = [ | ||
| "libc", | ||
| ] | ||
| [[package]] | ||
| name = "palette" | ||
| version = "0.7.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" | ||
| dependencies = [ | ||
| "approx", | ||
| "fast-srgb8", | ||
| "libm", | ||
| "palette_derive", | ||
| ] | ||
| [[package]] | ||
| name = "palette_derive" | ||
| version = "0.7.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" | ||
| dependencies = [ | ||
| "by_address", | ||
| "proc-macro2", | ||
| "quote", | ||
| "syn", | ||
| ] | ||
| [[package]] | ||
| name = "parking_lot" | ||
@@ -366,17 +456,23 @@ version = "0.12.5" | ||
| [[package]] | ||
| name = "paste" | ||
| version = "1.0.15" | ||
| name = "portable-atomic" | ||
| version = "1.13.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" | ||
| checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" | ||
| [[package]] | ||
| name = "powerfmt" | ||
| version = "0.2.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" | ||
| [[package]] | ||
| name = "practicode" | ||
| version = "0.1.6" | ||
| version = "0.1.7" | ||
| dependencies = [ | ||
| "anyhow", | ||
| "crossterm 0.29.0", | ||
| "crossterm", | ||
| "ratatui", | ||
| "serde", | ||
| "serde_json", | ||
| "unicode-width 0.2.0", | ||
| "unicode-width", | ||
| "wait-timeout", | ||
@@ -405,22 +501,67 @@ ] | ||
| name = "ratatui" | ||
| version = "0.29.0" | ||
| version = "0.30.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" | ||
| checksum = "3274ba0a2c5e1bcad2a2005d20f4dc59dad26b2eb0940fb094500dba4099d57d" | ||
| dependencies = [ | ||
| "instability", | ||
| "ratatui-core", | ||
| "ratatui-crossterm", | ||
| "ratatui-widgets", | ||
| "serde", | ||
| ] | ||
| [[package]] | ||
| name = "ratatui-core" | ||
| version = "0.1.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c" | ||
| dependencies = [ | ||
| "bitflags", | ||
| "cassowary", | ||
| "compact_str", | ||
| "crossterm 0.28.1", | ||
| "indoc", | ||
| "instability", | ||
| "hashbrown 0.17.1", | ||
| "itertools", | ||
| "kasuari", | ||
| "lru", | ||
| "paste", | ||
| "palette", | ||
| "serde", | ||
| "strum", | ||
| "thiserror", | ||
| "unicode-segmentation", | ||
| "unicode-truncate", | ||
| "unicode-width 0.2.0", | ||
| "unicode-width", | ||
| ] | ||
| [[package]] | ||
| name = "ratatui-crossterm" | ||
| version = "0.1.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0" | ||
| dependencies = [ | ||
| "cfg-if", | ||
| "crossterm", | ||
| "instability", | ||
| "ratatui-core", | ||
| ] | ||
| [[package]] | ||
| name = "ratatui-widgets" | ||
| version = "0.3.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1" | ||
| dependencies = [ | ||
| "bitflags", | ||
| "hashbrown 0.17.1", | ||
| "indoc", | ||
| "instability", | ||
| "itertools", | ||
| "line-clipping", | ||
| "ratatui-core", | ||
| "serde", | ||
| "strum", | ||
| "time", | ||
| "unicode-segmentation", | ||
| "unicode-width", | ||
| ] | ||
| [[package]] | ||
| name = "redox_syscall" | ||
@@ -445,15 +586,2 @@ version = "0.5.18" | ||
| name = "rustix" | ||
| version = "0.38.44" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" | ||
| dependencies = [ | ||
| "bitflags", | ||
| "errno", | ||
| "libc", | ||
| "linux-raw-sys 0.4.15", | ||
| "windows-sys 0.59.0", | ||
| ] | ||
| [[package]] | ||
| name = "rustix" | ||
| version = "1.1.4" | ||
@@ -466,4 +594,4 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| "libc", | ||
| "linux-raw-sys 0.12.1", | ||
| "windows-sys 0.61.2", | ||
| "linux-raw-sys", | ||
| "windows-sys", | ||
| ] | ||
@@ -589,5 +717,5 @@ | ||
| name = "strum" | ||
| version = "0.26.3" | ||
| version = "0.28.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" | ||
| checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" | ||
| dependencies = [ | ||
@@ -599,5 +727,5 @@ "strum_macros", | ||
| name = "strum_macros" | ||
| version = "0.26.4" | ||
| version = "0.28.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" | ||
| checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" | ||
| dependencies = [ | ||
@@ -607,3 +735,2 @@ "heck", | ||
| "quote", | ||
| "rustversion", | ||
| "syn", | ||
@@ -624,2 +751,43 @@ ] | ||
| [[package]] | ||
| name = "thiserror" | ||
| version = "2.0.18" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" | ||
| dependencies = [ | ||
| "thiserror-impl", | ||
| ] | ||
| [[package]] | ||
| name = "thiserror-impl" | ||
| version = "2.0.18" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" | ||
| dependencies = [ | ||
| "proc-macro2", | ||
| "quote", | ||
| "syn", | ||
| ] | ||
| [[package]] | ||
| name = "time" | ||
| version = "0.3.53" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" | ||
| dependencies = [ | ||
| "deranged", | ||
| "libc", | ||
| "num-conv", | ||
| "num_threads", | ||
| "powerfmt", | ||
| "serde_core", | ||
| "time-core", | ||
| ] | ||
| [[package]] | ||
| name = "time-core" | ||
| version = "0.1.9" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" | ||
| [[package]] | ||
| name = "unicode-ident" | ||
@@ -638,9 +806,9 @@ version = "1.0.24" | ||
| name = "unicode-truncate" | ||
| version = "1.1.0" | ||
| version = "2.0.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" | ||
| checksum = "16b380a1238663e5f8a691f9039c73e1cdae598a30e9855f541d29b08b53e9a5" | ||
| dependencies = [ | ||
| "itertools", | ||
| "unicode-segmentation", | ||
| "unicode-width 0.1.14", | ||
| "unicode-width", | ||
| ] | ||
@@ -650,8 +818,2 @@ | ||
| name = "unicode-width" | ||
| version = "0.1.14" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" | ||
| [[package]] | ||
| name = "unicode-width" | ||
| version = "0.2.0" | ||
@@ -706,11 +868,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows-sys" | ||
| version = "0.59.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" | ||
| dependencies = [ | ||
| "windows-targets", | ||
| ] | ||
| [[package]] | ||
| name = "windows-sys" | ||
| version = "0.61.2" | ||
@@ -724,66 +877,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| [[package]] | ||
| name = "windows-targets" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" | ||
| dependencies = [ | ||
| "windows_aarch64_gnullvm", | ||
| "windows_aarch64_msvc", | ||
| "windows_i686_gnu", | ||
| "windows_i686_gnullvm", | ||
| "windows_i686_msvc", | ||
| "windows_x86_64_gnu", | ||
| "windows_x86_64_gnullvm", | ||
| "windows_x86_64_msvc", | ||
| ] | ||
| [[package]] | ||
| name = "windows_aarch64_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" | ||
| [[package]] | ||
| name = "windows_aarch64_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" | ||
| [[package]] | ||
| name = "windows_i686_gnu" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" | ||
| [[package]] | ||
| name = "windows_i686_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" | ||
| [[package]] | ||
| name = "windows_i686_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" | ||
| [[package]] | ||
| name = "windows_x86_64_gnu" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" | ||
| [[package]] | ||
| name = "windows_x86_64_gnullvm" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" | ||
| [[package]] | ||
| name = "windows_x86_64_msvc" | ||
| version = "0.52.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" | ||
| [[package]] | ||
| name = "zmij" | ||
@@ -790,0 +879,0 @@ version = "1.0.21" |
+2
-2
| [package] | ||
| name = "practicode" | ||
| version = "0.1.6" | ||
| version = "0.1.7" | ||
| edition = "2024" | ||
@@ -16,3 +16,3 @@ description = "Local-first coding-test practice in a Rust terminal UI with optional AI help." | ||
| crossterm = "0.29" | ||
| ratatui = "0.29" | ||
| ratatui = { version = "0.30", default-features = false, features = ["crossterm"] } | ||
| serde = { version = "1", features = ["derive"] } | ||
@@ -19,0 +19,0 @@ serde_json = "1" |
+1
-1
| { | ||
| "name": "practicode", | ||
| "version": "0.1.6", | ||
| "version": "0.1.7", | ||
| "description": "Local-first coding-test practice in a Rust terminal UI with optional AI help.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+49
-11
@@ -15,4 +15,11 @@ # practicode | ||
| ## Start | ||
| ## What You Get | ||
| - Local stdin/stdout judging for Python, TypeScript, Java, and Rust. | ||
| - A two-pane terminal UI with problem text, editor, output, and command palette. | ||
| - Local-first problem history under ignored `.practicode/`, `problems/`, and `submissions/` paths. | ||
| - Optional Codex or Claude Code help for hints and generated next problems. | ||
| ## Install | ||
| ### Prerequisites | ||
@@ -47,2 +54,10 @@ | ||
| ### Check Install | ||
| ```bash | ||
| practicode --version | ||
| practicode --smoke | ||
| practicode --help | ||
| ``` | ||
| ## Daily Loop | ||
@@ -59,6 +74,14 @@ | ||
| Typing `/` outside the editor opens the command palette. Use `up/down` to move, `Enter` to run or complete the selected command, and `Esc` to cancel. | ||
| Typing `/` outside the editor opens the command palette. Use `up/down` to move, `Enter` to run or complete the selected command, and `Esc` to cancel. Press `?` for in-app help or `Ctrl+C` to quit. | ||
| Submissions are saved as you type under `submissions/<problem-id>/solution.<ext>`. | ||
| ## CLI Flags | ||
| | Flag | Action | | ||
| | --- | --- | | ||
| | `--help`, `-h` | Show non-interactive help | | ||
| | `--version`, `-V` | Print the installed version | | ||
| | `--smoke` | Print the current problem title and exit | | ||
| ## Commands | ||
@@ -70,4 +93,4 @@ | ||
| | `/code` | Return to the code editor | | ||
| | `/next` | Open the next local problem, or ask AI to create one | | ||
| | `/next easy string problem` | Ask AI for a custom next problem | | ||
| | `/next` | Open the next unsolved problem, or ask AI only when none remain | | ||
| | `/generate easy string problem` | Ask AI to create a new problem now | | ||
| | `/back` | Go back through problem history | | ||
@@ -97,10 +120,12 @@ | `/problems` | Browse problems with `up/down` or `j/k`, open with `Enter` | | ||
| ## AI Problems | ||
| ## Problem Flow | ||
| `/next <request>` passes your request into the selected AI problem generator. | ||
| `/next` is local-first: it opens the next unsolved local problem before generating anything. When no unsolved problem remains, it asks the selected AI provider to create one. | ||
| Use `/generate <request>` when you explicitly want to create a new problem now. | ||
| ```text | ||
| /next a slightly harder string problem | ||
| /next hashmap practice, easy | ||
| /next sorting problem, no graph yet | ||
| /generate a slightly harder string problem | ||
| /generate hashmap practice, easy | ||
| /generate sorting problem, no graph yet | ||
| ``` | ||
@@ -143,6 +168,19 @@ | ||
| ## Safety | ||
| ## Safety And Security | ||
| `/run` executes your local submission as a normal process. practicode runs it from `.practicode/build/<problem-id>/run`, but this is not an OS sandbox. Only run code you trust. | ||
| - `/run` executes your local submission as a normal process. practicode runs it from `.practicode/build/<problem-id>/run`, but this is not an OS sandbox. Only run code you trust. | ||
| - `/hint` sends the current problem and submission to the selected AI provider CLI. | ||
| - AI-backed `/next` can run a custom shell command from `settings.ai_next_command`; save only commands you trust. | ||
| - Local `.env`, `.npmrc`, `.practicode/`, `problems/`, and `submissions/` are ignored by git. Do not commit tokens, private prompts, or answer keys. | ||
| ## Development Checks | ||
| ```bash | ||
| cargo test | ||
| cargo run -- --smoke | ||
| cargo audit | ||
| ``` | ||
| This repo has no npm dependencies or lockfile today, so `npm audit` and `pnpm audit` are not applicable until a matching lockfile is added. | ||
| ## Contributing | ||
@@ -149,0 +187,0 @@ |
+44
-1
@@ -17,5 +17,35 @@ use anyhow::{Context, Result}; | ||
| pub fn cli_help_text() -> &'static str { | ||
| "practicode - local-first coding-test practice in your terminal | ||
| Usage: | ||
| practicode Open the TUI | ||
| practicode --smoke Print the current problem title and exit | ||
| practicode --version Print the installed version | ||
| practicode --help Show this help | ||
| Inside the TUI: | ||
| Esc then / Open the command palette | ||
| ? Open help | ||
| Ctrl+C Quit" | ||
| } | ||
| pub fn run_cli() -> Result<()> { | ||
| let root = env::current_dir().context("read current directory")?; | ||
| if env::args().any(|arg| arg == "--smoke") { | ||
| let args = env::args().skip(1).collect::<Vec<_>>(); | ||
| if args | ||
| .iter() | ||
| .any(|arg| matches!(arg.as_str(), "-h" | "--help")) | ||
| { | ||
| println!("{}", cli_help_text()); | ||
| return Ok(()); | ||
| } | ||
| if args | ||
| .iter() | ||
| .any(|arg| matches!(arg.as_str(), "-V" | "--version")) | ||
| { | ||
| println!("practicode {}", update::CURRENT_VERSION); | ||
| return Ok(()); | ||
| } | ||
| if args.iter().any(|arg| arg == "--smoke") { | ||
| let bank = core::load_bank(&root)?; | ||
@@ -43,1 +73,14 @@ let state = core::load_state(&root, &bank)?; | ||
| } | ||
| #[cfg(test)] | ||
| mod tests { | ||
| use super::cli_help_text; | ||
| #[test] | ||
| fn cli_help_lists_non_interactive_flags_and_tui_exit() { | ||
| let help = cli_help_text(); | ||
| assert!(help.contains("--smoke")); | ||
| assert!(help.contains("--version")); | ||
| assert!(help.contains("Ctrl+C")); | ||
| } | ||
| } |
@@ -33,2 +33,9 @@ #[derive(Clone, Copy)] | ||
| CommandHint { | ||
| insert: "generate ", | ||
| display: "/generate <request>", | ||
| desc_key: "cmd_generate", | ||
| keep_open: true, | ||
| help: true, | ||
| }, | ||
| CommandHint { | ||
| insert: "back", | ||
@@ -35,0 +42,0 @@ display: "/back", |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
194593
2.63%360
1.41%191
24.84%