github / github/copilot-cli

deleted sessions still in /chronicle insights

未關閉
#3,811 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:sessions
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

I'm following the steps documented [here](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/chronicle#how-session-data-is-stored) to erase my Copilot CLI session history and get back to a pristine state.

After wiping `~/.copilot/session-*`, deleting all synced sessions from GitHub and reindexing, `/chronicle cost-tips` still pulls insights from the deleted sessions. And it is not the only subcommand that exhibits this behavior.

I've inspected the local Sqlite3 database (`~/.copilot/session-store.db`) and the `sessions` table still contained the deleted sessions (they are 11 days old as of today) after it was recreated.

I've tried to turn off the remote session sync features from both my organization's profile policies and from the Copilot CLI settings (`remoteExport` and `remoteSessions`) ― the deleted sessions are still in `/chronicle` insights!

I'm trying to get back to a pristine state because cost tips and other insights I'm getting relate to outdated habits and don't reflect the current ones.

### Affected version

GitHub Copilot CLI 1.0.62

### Steps to reproduce the behavior

The steps require a profile with remote session sync enabled and with some session data recorded within the past 1-2 weeks (I'm providing those numbers because they match my scenario).

1. Erase Copilot session data as documented [here](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/chronicle#how-session-data-is-stored) ― Run both local and remote cleanup
2. Run a `/chronicle` query against one of the deleted sessions, i.e. `/chronicle search Some cool session`

### Expected behavior

`/chronicle` should not include deleted sessions in the computed insights.

### Additional context

- Operating system: Ubuntu Server 24.04.4 LTS
- CPU architecture: x86_64
- Terminal emulator: tmux 3.4
- Shell: Bash 5.2.21

貢獻指南

開啟貢獻指南

研究方向

先重現 `/chronicle` 的清理與查詢步驟,然後檢查 `~/.copilot/session-store.db`,尤其是 `sessions` 資料表在重新建立索引前後的情況。追蹤 `/chronicle search` 和 `/chronicle cost-tips` 如何讀取工作階段資料;完成標準是,在本機和遠端清理後,已刪除的工作階段不再出現在計算出的洞察中。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell, sqlite
領域
cli, database
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。