Commit a3a1c97
authored
fix(outline): copy all headings when user queries hidden and level 0 (#659)
## Summary
Fixes the issue where copying the outline returns empty results when
user queries are hidden and expand level is set to 0, even though AI
response headings are visible in the panel.
## Problem
When `showUserQueries = false` and `expandLevel = 0`:
1. `getConversationCopyHeadingLevel(0, false)` returned `Math.max(1, 0)
= 1`
2. This set `maxHeadingLevel = 1`, filtering out H2+ headings in
`formatAssistantHeadings`
3. But the outline panel displays these H2+ headings when `expandLevel =
0`
4. Result: User sees headings in the panel but gets empty results when
copying
## Solution
When `expandLevel = 0` and user queries are hidden, set `maxHeadingLevel
= 6` to copy all heading levels (H1-H6), matching what's visible in the
panel.
## Changes
- Modified `getConversationCopyHeadingLevel()` to return 6 when
`!showUserQueries && expandLevel === 0`
- Updated CHANGELOG.md and CHANGELOG.zh-CN.md
## Test plan
- [ ] Set outline expand level to 0
- [ ] Disable "Show user queries"
- [ ] Verify AI response headings are visible in the outline panel
- [ ] Click "Copy outline" button
- [ ] Verify all visible headings are copied successfully1 parent b4c07be commit a3a1c97
3 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
198 | 204 | | |
199 | 205 | | |
200 | 206 | | |
| |||
0 commit comments