Spaces:
Running
Running
Upload CHANGELOG.md
Browse files- CHANGELOG.md +20 -29
CHANGELOG.md
CHANGED
|
@@ -1,36 +1,27 @@
|
|
| 1 |
-
# VNEWS v5 -
|
| 2 |
|
| 3 |
## Changes
|
| 4 |
|
| 5 |
-
###
|
| 6 |
-
|
| 7 |
-
- Extract event type from SVG icons in `.event-type` (goal/redcard/yellowcard/substitution)
|
| 8 |
-
- Parse player names from `.players > div` elements
|
| 9 |
-
- For goals: extract scorer + assist names
|
| 10 |
-
- For substitutions: extract player_out → player_in
|
| 11 |
-
- For cards: extract player name
|
| 12 |
-
- Normalize time format: `45' +2` → `45+2'`
|
| 13 |
-
- Fetch H2H stats from `/api/fixtures/h2h-stats` API
|
| 14 |
-
- Parse prediction card, recent matches, H2H standings
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- ↔️ THAY ĐỔI — player_out → player_in
|
| 23 |
-
- Period grouping (H1, H2) with visual headers
|
| 24 |
-
- Team badges (HOME/AWAY) per event
|
| 25 |
-
- Color-coded event icons
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- Module cache clearing for fresh match_detail_v2 import on each API call
|
| 29 |
-
- Single clean import for both `/detail` and `/live` endpoints
|
| 30 |
-
- Removed duplicate inline scraping code
|
| 31 |
|
| 32 |
-
|
| 33 |
-
-
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
###
|
| 36 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# VNEWS v5.1 - Rewrite Fix
|
| 2 |
|
| 3 |
## Changes
|
| 4 |
|
| 5 |
+
### Critical Fix: Rewrite button not creating posts on Tường AI
|
| 6 |
+
**Root cause**: `_run.py` imports from `app_v2_entry.py`, but the `/api/rewrite_share` endpoint was only defined in `ai_runtime_patch_fast.py` (loaded through `app_entry.py` which is NOT used). The frontend called a non-existent endpoint → 404 → silent failure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
**Fix applied**:
|
| 9 |
+
1. **app_v2_entry.py** — Added 3 new endpoints:
|
| 10 |
+
- `POST /api/rewrite_slide` — Fast extractive summary (no AI needed), creates slides from article key points + images, saves to wall
|
| 11 |
+
- `POST /api/rewrite_share` — AI-powered rewrite with extractive fallback, saves to wall
|
| 12 |
+
- `POST /api/url_wall` — URL submission endpoint (alias for rewrite_share)
|
| 13 |
+
- All endpoints use the same `_load_wall_posts()` / `_save_wall_posts()` and `WALL_FILE` path as the existing `/api/wall` endpoint
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
2. **static/index_v2.html** — Added `<script src="/static/rewrite_fix_v2.js"></script>` to load the rewrite fix
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
3. **static/rewrite_fix_v2.js** — New file that overrides `rewriteArticle()` to:
|
| 18 |
+
- Call `/api/rewrite_slide` first (fast, no AI needed)
|
| 19 |
+
- Fallback to `/api/rewrite_share` if slide fails
|
| 20 |
+
- Show slide preview overlay after successful post
|
| 21 |
+
- Use `prependWallPost()` to add the new post to Tường AI
|
| 22 |
|
| 23 |
+
### Previous changes (v5)
|
| 24 |
+
- Rewrote match_detail_v2.py with correct event parsing
|
| 25 |
+
- 2-tab layout for match detail (stats + timeline)
|
| 26 |
+
- Fixed _run.py import
|
| 27 |
+
- Dockerfile cache busting
|