Use promkit-widgets v0.3.0 - #107
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the application to the promkit-widgets v0.3.0 API, including migrating widget state/config usage and aligning the project’s TOML configuration schema and documentation with the new upstream config types.
Changes:
- Refactor Listbox/Text/TextEditor/JsonStream state initialization to use the new
config-centric APIs inpromkit-widgetsv0.3.0. - Simplify
src/config.rsby embeddingpromkit_widgets::{text_editor,jsonstream,listbox}::Configdirectly and remove now-unneeded custom serde glue. - Update
default.tomland README configuration examples to the new table structure (e.g.,[editor.on_focus],[json.stream],[completion.listbox]).
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/search.rs |
Update listbox usage to new API (state.config.lines, Listbox::from). |
src/prompt.rs |
Migrate text::State styling to text::Config { style: Some(...) }. |
src/main.rs |
Wire listbox::Config, text_editor::Config, and jsonstream::Config from the loaded config into widget states/providers. |
src/json.rs |
Switch JSON stream formatting from RowFormatter to jsonstream::Config, and update text styling to config-based API. |
src/editor.rs |
Replace per-field theme application with swapping entire text_editor::Config; update word break / mode access. |
src/config/text_editor.rs |
Remove custom serde for editor mode (no longer needed). |
src/config.rs |
Restructure config types to directly use promkit-widgets config structs and keep keybind serde via event_set_serde. |
default.toml |
Update config schema to match new embedded config structs and termcfg notation examples. |
README.md |
Update documented config example to new schema and wrap settings in a <details> block. |
Cargo.toml |
Bump promkit-widgets to v0.3.0 (currently via local path override). |
Cargo.lock |
Lockfile updates reflecting the dependency change (currently consistent with path-based resolution). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.