Commit 1fd698a
Inline Assist - Parse chunks individually (#2012)
* feat: wip improve inline assistant performance
* feat: improve search
* Update src/services/ghost/GhostStrategy.ts
Co-authored-by: Copilot <[email protected]>
* Update src/services/ghost/GhostStrategy.ts
Co-authored-by: Copilot <[email protected]>
* Update src/services/ghost/GhostProvider.ts
Co-authored-by: Copilot <[email protected]>
* refactor: add changeset
* refactor: improve prompt
* refactor: improve prompt for non llama models
* refactor: improve cursor position
* refactor: select the closest cursor suggestion
* refactor: divide groups
* refactor: inline assist sequential suggestion
* refactor: fix tests
* refactor: fix display special characters
* refactor: fix display special characters
* refactor: improve visual of the popups
* Update .changeset/beige-sheep-post.md
Co-authored-by: Copilot <[email protected]>
* refactor: wip stream parser
* refactor: update refactored tests
* refactor: update test cases responses to xml format
* refactor: improve prompt to focus on the cursor and optimize the response for small chunks
* feat: Default codestar model for Inline Assitant
* feat: Improve Inline assist prompt
* feat: Improve malformed xml response
* feat: Improve changes out of the document
* feat: Improve search with cursor
* feat: Improve suggestion order on the response
* refactor: add missing translations
* refactor: update constructor to accept options object
* refactor: adjust ghost decoration content join
The `GhostDecorations` class now joins content with a space to ensure the first character doesn't get stripped when the CSS content is processed
* refactor: adjust provider sorting logic based on PR comment
* fix(ghost): Sanitize malformed CDATA sections in streaming parser
Addresses a critical bug identified from user logs where malformed CDATA sections in the Ghost streaming parser caused parsing failures. The fix specifically targets and replaces `</![CDATA[` with `]]>` to correctly close CDATA blocks, ensuring proper XML sanitization and successful processing of streaming data.
This change includes a new test case that precisely reproduces the reported malformed CDATA issue, verifying the fix.
* refactor(ghost): Rename cost tracking variables for clarity
Renamed `totalCost`, `totalInputTokens`, `totalOutputTokens`, `totalCacheWriteTokens`, and `totalCacheReadTokens` to `cost`, `inputTokens`, `outputTokens`, `cacheWriteTokens`, and `cacheReadTokens` respectively. This improves readability and conciseness of the variable names.
* refactor(ghost): Extract CURSOR_MARKER to ghostConstants
Moves the CURSOR_MARKER constant from GhostStreamingParser and BasePromptStrategy into a new dedicated file, `ghostConstants.ts`. This centralizes the definition of the marker used for autocomplete positions, improving maintainability and reducing redundancy across Ghost-related services and strategies.
The change also updates all references to use the newly exported constant.
* test(chat): Improve focus grabbing test for follow-up questions
Fix flakey test
* Update changeset
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Chris Hasson <[email protected]>
Co-authored-by: Chris Hasson <[email protected]>1 parent b8c2b99 commit 1fd698a
File tree
69 files changed
+6015
-1400
lines changed- .changeset
- packages/types/src
- src/services
- ghost
- __tests__
- __test_cases__
- complex-multi-group
- function-rename-var-to-const
- line-deletions
- mixed-addition-deletion
- multiple-line-additions
- partial-mixed-operations
- random-mixed-operations
- sequential-mixed-operations
- simple-addition
- strategies
- types
- mocking/__tests__
- webview-ui/src
- components
- chat/__tests__
- kilocode/settings
- i18n/locales
- ar
- ca
- cs
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- th
- tr
- uk
- vi
- zh-CN
- zh-TW
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+6015
-1400
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 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 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
0 commit comments