forked from WHC/Hermit
Usability pass: tool registry, TUI polish, saved keys and settings
Tools - Table-driven tool registry with permission classes and default/minimal profiles; new tools: edit_file, list_dir, glob, grep, delete_file, move_file, todo_write, web_fetch, ask_user (plus read_file paging). - Built-in Myers diff; write tools return unified diffs. - Persistent permission rules (.agent/permissions.json), per-turn undo snapshots (.agent/undo), AGENTS.md project notes, auto-compact at 80% of the model context, cancellable run_shell with process-group kill. TUI - Table-driven slash commands: /provider /key /effort /status /tools /permissions /yolo /undo /retry /diff /export /copy /rename /delete /init /max-steps /todo, with / and @ completion. - Permission modal with diff and prefix rules, ask_user modal, todo panel, header with model/effort/context, bracketed paste, line editing, wide-char cursor, NO_COLOR and ASCII fallback; Esc never quits. Startup and configuration - API keys are entered in the TUI (hidden) and saved per provider in <config>/credentials (0600); env variables are only a fallback. - Last provider, per-provider model and reasoning effort are remembered in <config>/settings.json; --effort/-e and /effort send reasoning_effort (low|medium|high|max) to models that accept it. - DeepSeek preset uses deepseek-flash / deepseek-v4-pro. - Session flags --new/--continue/--resume/--list-sessions, --yolo, --confirm. Compatibility and tests - ncurses detection, macOS/Homebrew support, make install, XDG config dir, POSIX cleanups; Gitea CI (gcc/clang/asan/musl/macOS). - Unit tests for diff, fs tools, registry, undo/perms and config; e2e fixtures multi_file_refactor and ask_or_todo; vendored cJSON.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# 任务:为 hello 项目写 Makefile
|
||||
|
||||
工作区里只有 `hello.c` 和 `tests/expect.txt`,还没有 Makefile。请:
|
||||
|
||||
1. 新建 `Makefile`(注意:命令行必须用 TAB 缩进),包含以下目标:
|
||||
- `all`(默认目标):用 `cc -std=c11 -Wall -Wextra -O2 -o hello hello.c` 编译出 `hello`;
|
||||
- `test`:依赖 `hello`,运行 `./hello > tests/actual.txt`,再用 `diff -u tests/expect.txt tests/actual.txt` 比较;
|
||||
- `clean`:删除 `hello` 和 `tests/actual.txt`;
|
||||
- 把 `all test clean` 声明为 `.PHONY`。
|
||||
2. 运行 `make clean && make test`,确认通过。
|
||||
3. 用一句话说明结果。
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Pass iff the agent wrote a working Makefile (recipes need real TABs).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
test -f Makefile
|
||||
grep -q "$(printf '^\t')" Makefile
|
||||
make clean >/dev/null
|
||||
make test
|
||||
make clean >/dev/null
|
||||
test ! -e hello
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("hello, cst\n");
|
||||
printf("tab\there\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
hello, cst
|
||||
tab here
|
||||
Reference in New Issue
Block a user