Repository navigation
Commit 15a3bbb
committed
Migrate prompt image storage to persistent storage using a generalized storage class
- revert all those lint fixes [Changes]
- In `apps/editor/src/utils/agentic-cli-invocation/invoke-agentic-cli.ts`, update the `params.isolate_in_temp_dir` branch to always create a fresh temp directory via `mkdtemp` in `os.tmpdir()` with a `'cwc-cli-'` prefix instead of reusing the `cwc-cli-ask` path in `globalStorageUri`.
- images pasted into prompt field should not be saved as base64 encoded text, but .png files
- we like the idea of saving 'prompt text' to extension's global storage, you should save pasted images there as well. use identical garbage collection mechanism for them as for pasted text. Don't need backward compatibility.
- merge `apps/editor/src/views/prompt/backend/utils/persistent-text-storage.ts` and `apps/editor/src/views/prompt/backend/utils/persistent-image-storage.ts` into persistent-prompt-storage.ts (steer behavior via params)
- move the threshold to `apps/editor/src/constants/values.ts`, shorten it to 6 months
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ ├── apply-response-command
│ │ │ ├── response-processor
│ │ │ │ └── response-processor.ts
│ │ │ └── utils
│ │ │ ├── file-operations
│ │ │ │ ├── prepare-rename-operation.ts
│ │ │ │ └── read-rename-source-file.ts
│ │ │ └── preview
│ │ │ ├── build-history-files.ts
│ │ │ ├── file-preparer.ts
│ │ │ └── vscode-ui.ts
│ │ ├── code-at-cursor-command
│ │ │ └── utils
│ │ │ └── perform-code-at-cursor.ts
│ │ ├── copy-merge-commit-details-command.ts
│ │ ├── generate-commit-message-commands
│ │ │ └── actions
│ │ │ └── run-generate-action.ts
│ │ ├── new-folder-command.ts
│ │ ├── search-files-commands
│ │ │ └── utils
│ │ │ └── get-target-folder-path.ts
│ │ └── select-files-of-commit-command.ts
│ ├── constants
│ │ └── values.ts
│ ├── features
│ │ ├── agentic-search
│ │ │ └── agentic-search.ts
│ │ └── search-files
│ │ ├── search-modes
│ │ │ └── perform-intelligent-search-mode.ts
│ │ └── utils
│ │ └── analyze-files.ts
│ ├── services
│ │ └── websocket-manager.ts
│ ├── utils
│ │ ├── agentic-cli-invocation
│ │ │ ├── agents
│ │ │ │ ├── antigravity.ts
│ │ │ │ ├── claude.ts
│ │ │ │ ├── codex.ts
│ │ │ │ ├── cursor.ts
│ │ │ │ ├── devin.ts
│ │ │ │ ├── grok.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── opencode.ts
│ │ │ ├── index.ts
│ │ │ ├── invoke-agentic-cli.ts
│ │ │ ├── types.ts
│ │ │ └── utils
│ │ │ ├── check-command-exists.ts
│ │ │ ├── format-duration.ts
│ │ │ ├── generate-diff-markdown.ts
│ │ │ └── get-progress-dots.ts
│ │ ├── build-user-content.ts
│ │ ├── git-repository-utils.ts
│ │ └── path-sanitizer.ts
│ └── views
│ ├── prompt
│ │ ├── backend
│ │ │ ├── message-handlers
│ │ │ │ ├── handle-open-prompt-image.ts
│ │ │ │ ├── handle-open-prompt-pasted-text.ts
│ │ │ │ ├── handle-open-website.ts
│ │ │ │ ├── handle-paste-url.ts
│ │ │ │ ├── handle-patch-repair.ts
│ │ │ │ ├── handle-preview-generated-code.ts
│ │ │ │ ├── handle-save-prompt-image.ts
│ │ │ │ ├── handle-save-prompt-pasted-text.ts
│ │ │ │ ├── handle-voice-input.ts
│ │ │ │ └── index.ts
│ │ │ ├── prompt-view-provider.ts
│ │ │ └── utils
│ │ │ ├── persistent-prompt-storage.ts
│ │ │ ├── preview-text-in-temp-file.ts
│ │ │ ├── symbols
│ │ │ │ ├── fragment
│ │ │ │ │ └── replace-fragment-symbol.ts
│ │ │ │ ├── image
│ │ │ │ │ └── replace-image-symbol.ts
│ │ │ │ ├── pasted-text
│ │ │ │ │ └── replace-pasted-text-symbol.ts
│ │ │ │ ├── replace-symbols.ts
│ │ │ │ └── website
│ │ │ │ └── replace-website-symbol.ts
│ │ │ └── website-fetcher.ts
│ │ ├── frontend
│ │ │ ├── Main
│ │ │ │ ├── Main.tsx
│ │ │ │ └── MainView
│ │ │ │ └── MainView.tsx
│ │ │ ├── Prompt.tsx
│ │ │ └── hooks
│ │ │ └── use-prompt
│ │ │ └── use-prompt.ts
│ │ └── types
│ │ └── messages.ts
│ └── settings
│ └── backend
│ └── message-handlers
│ ├── add-provider
│ │ └── pick-extended-provider.ts
│ ├── handle-open-allow-patterns-settings.ts
│ └── handle-open-ignore-patterns-settings.ts
└── packages
├── shared
│ └── src
│ └── utils
│ └── simplify-prompt-symbols
│ └── simplify-prompt-symbols.ts
└── ui
└── src
└── components
└── editor
└── common
└── prompts
├── PromptField
│ ├── PromptField.tsx
│ └── hooks
│ └── use-handlers
│ ├── handle-paste.ts
│ ├── types.ts
│ └── use-handlers.ts
└── shared
└── symbols
└── reconstruct-raw-value.ts1 parent 39c2aac commit 15a3bbb
15 files changed
Lines changed: 90 additions & 112 deletions
File tree
- apps/editor/src
- constants
- utils/agentic-cli-invocation
- views/prompt/backend
- message-handlers
- utils
- symbols
- image
- pasted-text
- website
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
385 | 373 | | |
386 | 374 | | |
387 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 29 | | |
46 | | - | |
| 30 | + | |
47 | 31 | | |
48 | 32 | | |
49 | 33 | | |
| |||
| 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 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 1 | | |
6 | 2 | | |
7 | 3 | | |
| 4 | + | |
8 | 5 | | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
13 | 10 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
23 | 16 | | |
24 | 17 | | |
25 | 18 | | |
| |||
| 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 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
| 767 | + | |
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
0 commit comments