chore(chat): refactor chat init into separate quota and history actors
Split `chatInitActor` into `loadQuotaActor` (guest quota fetch) and `loadHistoryActor` (local → network → save sync), and add `quotaLoaded` / `historyLoaded` state flags so the UI can display loading status during the new local-first history hydration flow. Also drop the now-unused `ChatInit` event and pipe Next.js stdout/stderr to a persistent log file in the post-receive hook for easier troubleshooting.
This commit is contained in:
@@ -116,8 +116,10 @@ stop_existing_next() {
|
||||
# 6. launch_next —— 后**台**启 `pnpm run start`,捕 PID
|
||||
# ============================================================
|
||||
launch_next() {
|
||||
# next stdout/stderr 接**到** logs/next-server.log(**追**加**模式**,**保**留**历**史** log **用**于排**查**)
|
||||
NEXT_LOG_FILE="$REPO_TOPLEVEL/logs/next-server.log"
|
||||
echo "=== start LAUNCH @ $(date -u +%Y-%m-%dT%H:%M:%SZ) ===" >> "$LOG_FILE"
|
||||
nohup pnpm run start > /dev/null 2>&1 &
|
||||
nohup pnpm run start >> "$NEXT_LOG_FILE" 2>&1 &
|
||||
START_PID=$!
|
||||
echo "=== start PID=$START_PID @ $(date -u +%Y-%m-%dT%H:%M:%SZ) ===" >> "$LOG_FILE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user