From d54d6bcaaff47cee61b14b3e0d31813f18e53ea1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 16:07:15 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=AE=A1=E6=9F=A5=E5=8F=8D=E9=A6=88=20=E2=80=94=20SUBMIT=5FCON?= =?UTF-8?q?TENT=E4=BC=A0=E5=86=85=E5=AE=B9=E3=80=81syslog=5Fraw=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E3=80=81=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- .github/workflows/push-broadcast-feishu.yml | 2 +- .github/workflows/syslog-pipeline.yml | 14 ++++++++++++-- scripts/write-notion-syslog.js | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push-broadcast-feishu.yml b/.github/workflows/push-broadcast-feishu.yml index e375f0a9..98ed9d20 100644 --- a/.github/workflows/push-broadcast-feishu.yml +++ b/.github/workflows/push-broadcast-feishu.yml @@ -76,7 +76,7 @@ jobs: '{chat_id: $chat_id, sender_open_id: $sender_open_id, broadcast_title: $broadcast_title, broadcast_content: $broadcast_content, broadcast_url: $broadcast_url}')") echo " HTTP 响应: $HTTP_CODE" - cat /tmp/push-response.txt + cat /tmp/push-response.txt 2>/dev/null || true echo "" if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then diff --git a/.github/workflows/syslog-pipeline.yml b/.github/workflows/syslog-pipeline.yml index 2be9e738..f9771437 100644 --- a/.github/workflows/syslog-pipeline.yml +++ b/.github/workflows/syslog-pipeline.yml @@ -131,7 +131,7 @@ jobs: PORTRAIT_DB_ID: ${{ secrets.PORTRAIT_DB_ID }} FINGERPRINT_DB_ID: ${{ secrets.FINGERPRINT_DB_ID }} SUBMIT_TYPE: syslog - SUBMIT_CONTENT: ${{ needs.pipeline-a-syslog.outputs.syslog_file }} + SYSLOG_FILE: ${{ needs.pipeline-a-syslog.outputs.syslog_file }} AUTHOR: ${{ needs.pipeline-a-syslog.outputs.sender_name }} run: | if [ -z "$LLM_API_KEY" ] || [ -z "$LLM_BASE_URL" ]; then @@ -140,7 +140,17 @@ jobs: echo "broadcast_url=" >> "$GITHUB_OUTPUT" exit 0 fi - node scripts/wake-persona.js || true + + # 读取 SYSLOG 文件内容传递给 wake-persona.js + if [ -f "$SYSLOG_FILE" ]; then + export SUBMIT_CONTENT=$(cat "$SYSLOG_FILE") + fi + + if node scripts/wake-persona.js; then + echo "✅ 人格体唤醒成功" + else + echo "⚠️ 人格体唤醒失败(exit code: $?),继续后续步骤" + fi # 读取人格体输出的广播信息(如果有) if [ -f /tmp/broadcast-result.json ]; then diff --git a/scripts/write-notion-syslog.js b/scripts/write-notion-syslog.js index 03275eb5..ffa94f98 100644 --- a/scripts/write-notion-syslog.js +++ b/scripts/write-notion-syslog.js @@ -125,7 +125,7 @@ async function main() { } const filename = path.basename(filePath); - const syslogText = entry.syslog || entry.content || ''; + const syslogText = entry.syslog_raw || entry.syslog || entry.content || ''; const source = entry.source || 'unknown'; const senderName = entry.sender_name || ''; const senderOpenId = entry.sender_open_id || '';