|
@@ -43,43 +43,68 @@ while [ $# -gt 0 ]; do
|
|
|
esac
|
|
esac
|
|
|
done
|
|
done
|
|
|
|
|
|
|
|
-# 内置随机内容池(摸鱼动作短语,运行时会随机抽取拼成“工作日志”)
|
|
|
|
|
|
|
+# 内置随机内容池:混搭 AI 动作、bash 命令与输出、工具调用返回(本会话就地取材)
|
|
|
POOL=(
|
|
POOL=(
|
|
|
- "🤖 Analyzing project structure..."
|
|
|
|
|
- "🧠 Evaluating deployment strategies..."
|
|
|
|
|
- "📊 Summarizing key decisions..."
|
|
|
|
|
- "✍️ Generating execution summary..."
|
|
|
|
|
- "🔍 Searching codebase knowledge graph..."
|
|
|
|
|
- "⚙️ Refactoring module boundary..."
|
|
|
|
|
- "📝 Drafting technical documentation..."
|
|
|
|
|
- "✅ Running unit tests..."
|
|
|
|
|
- "🔄 Syncing progress report..."
|
|
|
|
|
- "💬 Preparing next action items..."
|
|
|
|
|
- "🚀 Building release package..."
|
|
|
|
|
- "🌐 Deploying frontend static assets..."
|
|
|
|
|
- "🗄️ Migrating database schema..."
|
|
|
|
|
- "🔐 Validating security configuration..."
|
|
|
|
|
- "🧪 Executing smoke test..."
|
|
|
|
|
- "📈 Analyzing performance bottlenecks..."
|
|
|
|
|
- "🧩 Resolving dependency conflicts..."
|
|
|
|
|
- "🛠️ Fixing cross-compilation issue..."
|
|
|
|
|
- "📦 Packaging dist artifacts..."
|
|
|
|
|
- "🖥️ Restarting backend service..."
|
|
|
|
|
- "🔁 Iterating on review feedback..."
|
|
|
|
|
- "📚 Updating API documentation..."
|
|
|
|
|
- "🎯 Optimizing query performance..."
|
|
|
|
|
- "🧹 Cleaning up dead code..."
|
|
|
|
|
- "🔒 Hardening authentication flow..."
|
|
|
|
|
- "🌍 Localizing UI strings..."
|
|
|
|
|
- "⚡ Caching hot-path responses..."
|
|
|
|
|
- "📋 Verifying requirements coverage..."
|
|
|
|
|
- "🏗️ Scaffolding new module..."
|
|
|
|
|
- "🔔 Sending build notification..."
|
|
|
|
|
|
|
+ # ---- AI 动作(少量图标) ----
|
|
|
|
|
+ "🤖 analyzing dependency graph..."
|
|
|
|
|
+ "📊 summarizing key decisions..."
|
|
|
|
|
+ "✍️ drafting implementation plan..."
|
|
|
|
|
+ "🔍 tracing call chain..."
|
|
|
|
|
+ "🔒 reviewing security config..."
|
|
|
|
|
+ "💬 preparing next steps..."
|
|
|
|
|
+
|
|
|
|
|
+ # ---- bash 命令 ----
|
|
|
|
|
+ "$ make tt a=/workspace/shell-kit"
|
|
|
|
|
+ "$ go vet ./..."
|
|
|
|
|
+ "$ go test ./..."
|
|
|
|
|
+ "$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o admin_server ./cmd/server"
|
|
|
|
|
+ "$ pnpm typecheck"
|
|
|
|
|
+ "$ pnpm build"
|
|
|
|
|
+ "$ rsync -az --delete release/frontend/ root@18.220.34.224:/www/wwwroot/household/"
|
|
|
|
|
+ "$ ssh -p 10022 root@18.220.34.224 'systemctl restart backend-admin'"
|
|
|
|
|
+ "$ mysql -h127.0.0.1 -uhousehold -p**** household -e 'SHOW TABLES;'"
|
|
|
|
|
+ "$ curl -s -o /dev/null -w 'HTTP %{http_code}\\n' http://127.0.0.1:8081/"
|
|
|
|
|
+ "$ journalctl -u backend-admin -n 30 --no-pager"
|
|
|
|
|
+ "$ git log --oneline -5"
|
|
|
|
|
+ "$ docker compose ps"
|
|
|
|
|
+ "$ systemctl status backend-app"
|
|
|
|
|
+ "$ cat internal/config/config.yaml"
|
|
|
|
|
+
|
|
|
|
|
+ # ---- bash 输出 ----
|
|
|
|
|
+ "ok git.ooo.ink/household/app 0.532s"
|
|
|
|
|
+ "ok matrix/center 0.410s"
|
|
|
|
|
+ "PASS"
|
|
|
|
|
+ "✓ built in 26.39s"
|
|
|
|
|
+ "✓ 307 modules transformed."
|
|
|
|
|
+ "vite v7.3.6 building client environment for production..."
|
|
|
|
|
+ "dist/assets/index-*.js 95.77 kB │ gzip: 37.38 kB"
|
|
|
|
|
+ "[GIN-debug] Listening and serving HTTP on :8081"
|
|
|
|
|
+ "migrations completed successfully"
|
|
|
|
|
+ "systemd[1]: Started backend-admin.service - Household Backend Admin."
|
|
|
|
|
+ "Active: active (running)"
|
|
|
|
|
+ "HTTP 200"
|
|
|
|
|
+ "mysql_native_password"
|
|
|
|
|
+ "Tables_in_household: center_admins center_menus center_roles ..."
|
|
|
|
|
+ "schema_migrations: 20260828001 | dirty=0"
|
|
|
|
|
+ "ready for connections. Version: '8.0.46' socket: '/var/run/mysqld/mysqld.sock' port: 3306"
|
|
|
|
|
+
|
|
|
|
|
+ # ---- 工具调用返回 ----
|
|
|
|
|
+ "[read] docs/deploy-aaPanel.md 168 lines"
|
|
|
|
|
+ "[search] "migrations" → 3 results"
|
|
|
|
|
+ "[trace] RunMigrations → internal/pkg/database.RunMigrations"
|
|
|
|
|
+ "[snippet] buildDSN → user:pass@tcp(host:port)/db?parseTime=True"
|
|
|
|
|
+ "[build] release/backend/admin/admin_server (ELF, linux/amd64)"
|
|
|
|
|
+ "[deploy] backend-admin → active"
|
|
|
|
|
+ "[deploy] frontend-admin → HTTP 200"
|
|
|
|
|
+ "[check] SSH root@18.220.34.224:10022 → ok"
|
|
|
|
|
+ "[verify] curl admin.household.ooo.ink → 200 OK"
|
|
|
|
|
+ "[skip] no changes, up to date"
|
|
|
|
|
+ "[warn] config.yaml contains placeholder secret, leaving as-is on server"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
# 随机生成一段“工作日志”(无时间戳,行数与内容每次不同)
|
|
# 随机生成一段“工作日志”(无时间戳,行数与内容每次不同)
|
|
|
gen_random_content() {
|
|
gen_random_content() {
|
|
|
- local count=$((6 + RANDOM % 8)) # 6-13 行
|
|
|
|
|
|
|
+ local count=$((9 + RANDOM % 10)) # 9-18 行
|
|
|
LINES=()
|
|
LINES=()
|
|
|
local i
|
|
local i
|
|
|
for ((i=0; i<count; i++)); do
|
|
for ((i=0; i<count; i++)); do
|
|
@@ -107,16 +132,16 @@ rand_delay() {
|
|
|
|
|
|
|
|
# 假 AI 状态行(随机挑一个)
|
|
# 假 AI 状态行(随机挑一个)
|
|
|
STATUS=(
|
|
STATUS=(
|
|
|
- "🤖 Analyzing session context..."
|
|
|
|
|
- "🧠 Thinking..."
|
|
|
|
|
- "📊 Summarizing key decisions..."
|
|
|
|
|
- "✍️ Generating execution summary..."
|
|
|
|
|
- "🔍 Searching knowledge graph..."
|
|
|
|
|
- "⚙️ Optimizing implementation..."
|
|
|
|
|
- "📝 Writing technical docs..."
|
|
|
|
|
- "✅ Checking code quality..."
|
|
|
|
|
- "🔄 Syncing progress report..."
|
|
|
|
|
- "💬 Generating next steps..."
|
|
|
|
|
|
|
+ "analyzing..."
|
|
|
|
|
+ "thinking..."
|
|
|
|
|
+ "summarizing decisions..."
|
|
|
|
|
+ "generating summary..."
|
|
|
|
|
+ "searching graph..."
|
|
|
|
|
+ "optimizing implementation..."
|
|
|
|
|
+ "writing docs..."
|
|
|
|
|
+ "checking code quality..."
|
|
|
|
|
+ "syncing progress..."
|
|
|
|
|
+ "preparing next steps..."
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
run_once() {
|
|
run_once() {
|