Commit 0c57e29
committed
refactor: refactor confirmation logic and remove unused dependencies
- Remove `github.com/charmbracelet/huh` dependency from `go.mod`.
- Remove `github.com/catppuccin/go` and `github.com/charmbracelet/x/exp/strings` dependencies from `go.mod`.
- Remove `github.com/mitchellh/hashstructure/v2` dependency from `go.mod`.
- Replace `github.com/erikgeiser/promptkit/confirmation` with a custom confirmation prompt in `commit.go`.
- Update confirmation logic in `commit.go` to use `console.WaitForUserConfirm` with a default value.
- Modify `diff_block_editor.go` to use `console.WaitForUserConfirm` with a default value for file creation and code application.
- Refactor `confirm.go` to use `github.com/erikgeiser/promptkit/confirmation` for user confirmation prompts.
- Remove redundant `WaitForUserConfirmApplyChanges` function from `confirm.go`.
Signed-off-by: codiing-hui <wecoding@yeah.net>1 parent 8f65485 commit 0c57e29
File tree
5 files changed
+12
-38
lines changed- internal
- cli/commit
- ui
- coders
- console
5 files changed
+12
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | 50 | | |
53 | 51 | | |
54 | | - | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
| |||
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | | - | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| |||
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
58 | | - | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
65 | | - | |
66 | | - | |
67 | 61 | | |
68 | 62 | | |
69 | 63 | | |
| |||
198 | 192 | | |
199 | 193 | | |
200 | 194 | | |
201 | | - | |
202 | | - | |
203 | 195 | | |
204 | 196 | | |
205 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 210 | + | |
217 | 211 | | |
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
221 | 215 | | |
222 | | - | |
223 | | - | |
| 216 | + | |
224 | 217 | | |
225 | 218 | | |
226 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 18 | + | |
26 | 19 | | |
0 commit comments