Commit 47c2da0
authored
🤖 fix: improve compaction prompt for better model compliance (#912)
## Summary
Improves the compaction prompt to help models better respect the word
count target and produce more useful summaries.
## Changes
The new prompt provides structured guidance:
**What to include:**
- User's overall goal and current task
- Key decisions and rationale
- Current state of work (what's done, what's in progress)
- Important technical details (file paths, function names,
configurations)
- Errors encountered and resolutions
- Unresolved issues/blockers
**What NOT to include:**
- Suggestions for next steps
- Conversational filler or pleasantries
- Redundant information
**Style:** Factual, dense writing where every sentence conveys essential
context.
## Implementation
- Extracted `buildCompactionPrompt()` into `src/common/constants/ui.ts`
as a shared function
- Updated desktop, mobile, and mock scenarios to use the shared function
- Removed tautological tests
_Generated with `mux`_1 parent 367fa4a commit 47c2da0
File tree
6 files changed
+42
-23
lines changed- mobile/src/utils
- src
- browser/utils
- common/constants
- node/services/mock/scenarios
6 files changed
+42
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | | - | |
12 | | - | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | | - | |
48 | | - | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 131 | | |
144 | 132 | | |
145 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
596 | | - | |
| 600 | + | |
597 | 601 | | |
598 | 602 | | |
599 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
43 | 68 | | |
44 | 69 | | |
45 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments