Add standalone preview for file suggestion control#3066
Draft
Add standalone preview for file suggestion control#3066
Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Deploying waveterm with
|
| Latest commit: |
185fb4a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f43dd40b.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
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.
This adds a dedicated
frontend/previewentry for the file typeahead used insuggestion.tsx, and removes the standalone-preview dependency onPreviewModelfor file suggestion fetching. The preview now uses the existing mock WaveEnv/mock filesystem, starts from~by default, and still supports absolute-path queries.Extract preview-safe file suggestion fetching
frontend/app/view/preview/previewsuggestions.ts.cwd/connection instead of readingPreviewModelstate directly.frontend/app/view/preview/preview.tsxnow uses the extracted helper, preserving existing behavior while making the fetcher reusable from standalone preview code.Back preview suggestions with the mock WaveEnv/filesystem
fetchsuggestionsimplementation in preview-only code.~Documents/foo//Add a standalone preview
frontend/preview/previews/suggestion.preview.tsx.BlockHeaderSuggestionControlin isolation, anchored to a mock block header, and shows the selected path so the control can be exercised without the full preview view model.Tighten the suggestion control plumbing
placeholderTextthroughSuggestionControlintoSuggestionControlInnerso standalone previews display the intended input placeholder.Add focused coverage
~anchoring withoutPreviewModelExample of the extracted helper usage:
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.