-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[codex] Add user-scoped skills settings UI #4527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c9a24ba
9f29097
40d62e1
eac465b
5b4108b
e8f23ca
db7d66a
2d11ce7
3118350
d528ac3
ae94fc8
d758786
14492cb
1680fe6
0eaf644
56c3d7f
8d4eecb
23ae721
3d81cbd
4083be2
cc5a1fb
11167ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -736,6 +736,80 @@ pub struct RebornExtensionListResponse { | |
| pub extensions: Vec<RebornExtensionInfo>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct RebornSkillListResponse { | ||
| pub skills: Vec<RebornSkillInfo>, | ||
| pub count: usize, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct RebornSkillContentResponse { | ||
| pub name: String, | ||
| pub content: String, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct RebornSkillSearchResponse { | ||
| #[serde(default)] | ||
| pub catalog: Vec<serde_json::Value>, | ||
| #[serde(default)] | ||
| pub installed: Vec<RebornSkillInfo>, | ||
| #[serde(default)] | ||
| pub registry_url: String, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub catalog_error: Option<String>, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct RebornSkillActionResponse { | ||
| pub success: bool, | ||
| pub message: String, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Medium — RebornSkillInfo.trust and RebornSkillInfo.source are stringly-typed wire fields for fixed enum sets. RebornSkillInfo carries trust: String and source: String. Both carry values from typed enums (SkillTrust, SkillSource). types.md requires enums for fixed small sets. Fix: Replace trust with RebornSkillTrustLevel enum and source with RebornSkillSourceKind or RebornSkillSourceDetail. |
||
| pub struct RebornSkillInfo { | ||
| pub name: String, | ||
| pub description: String, | ||
| pub version: String, | ||
| pub trust: RebornSkillTrustLevel, | ||
| pub source: RebornSkillSourceKind, | ||
| pub source_kind: RebornSkillSourceKind, | ||
| #[serde(default)] | ||
| pub keywords: Vec<String>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub usage_hint: Option<String>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub setup_hint: Option<String>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub bundle_path: Option<String>, | ||
| #[serde(default, skip_serializing_if = "Option::is_none")] | ||
| pub install_source_url: Option<String>, | ||
| #[serde(default)] | ||
| pub has_requirements: bool, | ||
| #[serde(default)] | ||
| pub has_scripts: bool, | ||
| #[serde(default)] | ||
| pub can_edit: bool, | ||
| #[serde(default)] | ||
| pub can_delete: bool, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[serde(rename_all = "snake_case")] | ||
| pub enum RebornSkillTrustLevel { | ||
| Trusted, | ||
| Installed, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[serde(rename_all = "snake_case")] | ||
| pub enum RebornSkillSourceKind { | ||
| User, | ||
| Installed, | ||
| Workspace, | ||
| System, | ||
| } | ||
|
|
||
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | ||
| pub struct RebornExtensionRegistryResponse { | ||
| pub entries: Vec<RebornExtensionRegistryEntry>, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit — UnsupportedSkillsProductFacade uses Default instead of new_static() like siblings.
Sibling UnsupportedAutomationProductFacade and UnsupportedLifecycleProductFacade expose pub fn new_static(). New UnsupportedSkillsProductFacade derives Default and uses ::default().
Fix: Add pub fn new_static() and update call site.