@userscripts/gemini-export-markdown/ 發現現在又有bug https://share.gemini.google/xFqBFEbomIzW…
Share
Download ▾
@userscripts/gemini-export-markdown/ 發現現在又有bug
https://share.gemini.google/xFqBFEbomIzW
@/Users/[user]/Downloads/gemini-3D列印非平面切片技術解析---Google-Gemini-20261117-2001.json @/Users/[user]/Downloads/gemini-3D列印非平面切片技術解析---Google-Gemini-20261117-1959.md
多輪對話只能fetch到最後一輪 幫忙修正一下
[tool: Bash — Tool use: Bash]
[tool: Read — Tool use: Read]
[tool: Read — Tool use: Read]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
[tool: Write — Tool use: Write]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
已 commit 為 fa7006e,在 main 上,還沒 push。
這次 commit 包含:
- 修正後的腳本(
gemini-export-markdown.user.js,版本 0.2.1)
- 子資料夾 README 的說明
- 新增的測試
tests/gemini-export-markdown.test.mjs
package.json 新增的 test:gemini-export
- 根目錄 README 的腳本清單(只有版本號變了)
這幾個沒放進去:.specstory/ 的聊天紀錄與統計,以及 .claude/plans/ 的計畫檔。以前的 .specstory 都是另外用 chore: backup chat history commit。
要 push 的話跟我說。
[tool: ToolSearch — Tool use: ToolSearch]
[tool: ExitPlanMode — Tool use: ExitPlanMode]
Implement the script changes first.
[tool: Edit — Tool use: Edit]
[tool: Bash — Tool use: Bash]
[tool: Read — Tool use: Read]
[tool: Read — Tool use: Read]
[tool: Edit — Tool use: Edit]
[tool: Edit — Tool use: Edit]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
正在補回歸測試:用合成的 app/share payload,在 Chromium 與 Firefox 驗證排序與合併。
[tool: Write — Tool use: Write]
[tool: Bash — Tool use: Bash]
Now confirm the tests actually catch the old bug, by running them against the pre-fix script.
[tool: Bash — Tool use: Bash]
The tests reproduce both bugs on the old script: wrong order, and only the last round. Now run the full checks and the real share preview.
[tool: Bash — Tool use: Bash]
Share 頁輸出的順序是對的。不過 index:check 回報根目錄 README 的索引過期了,先確認這是不是我造成的:
[tool: Bash — Tool use: Bash]
[tool: Bash — Tool use: Bash]
已修好,版本升到 0.2.1。新測試在 Chromium 和 Firefox 都通過,npm run verify 也過了。一般對話頁(/app/...)要登入,我沒辦法實測,需要你裝上新版確認一次。
- 順序倒過來:在
/app/... 頁面,Gemini 載入歷史時是最新一輪排在最前面,腳本照原樣輸出。你附的 .md 其實三輪都在,只是最後一輪排在最上面。
- 真的只剩最後一輪:匯出時腳本只用最新攔到的那一筆資料。你在對話頁送出新訊息後,網站可能再抓一次只含最新一輪的資料,把完整歷史蓋掉。
改了什麼(userscripts/gemini-export-markdown/gemini-export-markdown.user.js):
- 同一段對話攔到的資料全部合併,重複的那輪以較新的為準。
Download .json 還是輸出最完整的那份原始資料。
- 每一輪都記著上一輪是誰,照這個重新排成由舊到新;接不起來的部分再用時間戳排。share 頁原本就是正序,排完不變。
- 對話建立時間、conversation id、模型改從排好後的第一輪拿。以前一般對話頁拿到的是最後一輪的時間。
- 子資料夾的 README 補上說明;根目錄 README 的腳本清單用
npm run index 重新產生(只有版本號變了)。
測試:新增 tests/gemini-export-markdown.test.mjs,用 npm run test:gemini-export 執行,資料全是假的,不含你的對話內容。測了三種情況:倒序載入、先載完整歷史再收到只有最新一輪、share 頁正序。我也拿舊版腳本跑過,前兩種都會失敗,第二種就是「只剩最後一輪」。
另外用你給的 share 連結實際匯出一次,順序是 YouTube 總結 → 連結 → Docker,正確。
請你確認:裝上 0.2.1 後打開 /app/eeef8fc40249e0b1 匯出一次,再送一則新訊息後重新匯出,確認兩次都是完整三輪、由舊到新。
Dataset releases
Not yet included in a published release.