Add knowledge structuring feature with incremental LLM processing

- Add structured_content column and STRUCTURING pipeline step
- Split LLM structuring into TOC + per-section calls to avoid token limit
- Save intermediate results to DB for real-time frontend polling (3s)
- Add manual "정리하기" button with async processing
- Fix browser login modal by customizing authentication entry point
- Fix standalone build symlinks for server.js and static files
- Add troubleshooting guide

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 19:43:21 +00:00
parent afc9cdcde6
commit 9abb770e37
8 changed files with 547 additions and 31 deletions

View File

@@ -25,16 +25,33 @@ echo "=== [1/3] Next.js 빌드 ==="
npx next build
echo "=== [2/3] 심볼릭 링크 생성 ==="
STATIC_SRC="$SCRIPT_DIR/.next/static"
STATIC_DST="$SCRIPT_DIR/.next/standalone/.next/static"
STANDALONE_DIR="$SCRIPT_DIR/.next/standalone"
# static 링크
STATIC_SRC="$SCRIPT_DIR/.next/static"
STATIC_DST="$STANDALONE_DIR/.next/static"
mkdir -p "$STANDALONE_DIR/.next"
if [ -L "$STATIC_DST" ] || [ -e "$STATIC_DST" ]; then
rm -rf "$STATIC_DST"
fi
ln -s "$STATIC_SRC" "$STATIC_DST"
echo "링크 생성 완료: $STATIC_DST -> $STATIC_SRC"
# standalone output이 subdirectory에 생성되는 경우 대응
if [ -d "$STANDALONE_DIR/sundol-frontend" ]; then
# server.js 링크
if [ ! -f "$STANDALONE_DIR/server.js" ] && [ -f "$STANDALONE_DIR/sundol-frontend/server.js" ]; then
ln -sf "$STANDALONE_DIR/sundol-frontend/server.js" "$STANDALONE_DIR/server.js"
echo "server.js 링크 생성 완료"
fi
# nested static 링크
NESTED_STATIC="$STANDALONE_DIR/sundol-frontend/.next/static"
if [ ! -L "$NESTED_STATIC" ] && [ ! -e "$NESTED_STATIC" ]; then
ln -s "$STATIC_SRC" "$NESTED_STATIC"
echo "nested static 링크 생성 완료"
fi
fi
echo "=== [3/3] PM2 재시작 ==="
pm2 restart sundol-frontend