This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Commit e989015
authored
Adds cache to cli-chat commands (#738)
* Adds cache to cli-chat commands
Closes: #732
Copilot sends at least 2 requests with the same `last_user_message`.
Hence we execute the same command 2 times and reply to the last one.
The last behaviour will cause that if we create a Workspace with
Copilot the cli will respond that the workspace already exists.
This PR implements a workaround to cache the commands and it's outputs.
That way we can reply the same to subsequent requests sent by Copilot
* Updated cache to use cachetools.TTLCache
* updated lock file1 parent 2f60c6d commit e989015
File tree
3 files changed
+60
-4
lines changed- src/codegate/pipeline/cli
3 files changed
+60
-4
lines changedSome 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 | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
34 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
35 | 72 | | |
36 | 73 | | |
37 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
38 | 80 | | |
39 | 81 | | |
40 | 82 | | |
| |||
0 commit comments