Add standalone file suggestion preview and fix PreviewEnv service narrowing#3066
Draft
Add standalone file suggestion preview and fix PreviewEnv service narrowing#3066
Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Deploying waveterm with
|
| Latest commit: |
5f0870a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0eee7b5e.waveterm.pages.dev |
| Branch Preview URL: | https://copilot-add-typeahead-previe.waveterm.pages.dev |
Copilot
AI
changed the title
[WIP] Add typeahead control to frontend preview
Add standalone preview for file suggestion control
Mar 15, 2026
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot
AI
changed the title
Add standalone preview for file suggestion control
Add standalone file suggestion preview and fix PreviewEnv service narrowing
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The file suggestion control in
suggestion.tsxdid not have a standalonefrontend/previewentry, and its fetch path was coupled toPreviewModelfor cwd resolution. The preview work also exposed a regression in the real app:PreviewEnvnarrowedserviceswith the wrong key shape (ObjectServiceinstead ofobject), which brokeonSelectwhenPreviewModelupdated block metadata.Standalone file suggestion preview
frontend/preview/previews/suggestion.preview.tsxfor the typeahead file picker.~, while preserving absolute-path queries starting with/.Extracted reusable file suggestion fetcher
frontend/app/view/preview/previewsuggestions.ts.preview.tsxand into a helper that accepts explicitcwd/connection inputs.PreviewModel.statFile.Preview mock suggestion support
DefaultMockFilesystem.~Documents/foo/Users/mike/DocFix PreviewEnv service contract
services.ObjectServiceservices.objectPreviewModelcall sites to usethis.env.services.object.UpdateObjectMeta(...), which matches the actual WaveEnv service map and restoresonSelectbehavior in the non-mock path.Minor suggestion control plumbing
placeholderTextthroughSuggestionControlintoSuggestionControlInnerso the standalone preview renders the intended input placeholder.Example of the extracted fetch path:
Corrected service usage in
PreviewModel:📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.