@@ -136,6 +136,34 @@ pub struct AttestationReport {
136136 pub model_attestations : Option < Vec < ModelAttestation > > ,
137137}
138138
139+ /// Appearance preference
140+ #[ derive( Debug , Serialize , Deserialize , ToSchema ) ]
141+ pub enum Appearance {
142+ Light ,
143+ Dark ,
144+ System ,
145+ }
146+
147+ impl From < services:: user:: ports:: Appearance > for Appearance {
148+ fn from ( appearance : services:: user:: ports:: Appearance ) -> Self {
149+ match appearance {
150+ services:: user:: ports:: Appearance :: Light => Appearance :: Light ,
151+ services:: user:: ports:: Appearance :: Dark => Appearance :: Dark ,
152+ services:: user:: ports:: Appearance :: System => Appearance :: System ,
153+ }
154+ }
155+ }
156+
157+ impl From < Appearance > for services:: user:: ports:: Appearance {
158+ fn from ( appearance : Appearance ) -> Self {
159+ match appearance {
160+ Appearance :: Light => services:: user:: ports:: Appearance :: Light ,
161+ Appearance :: Dark => services:: user:: ports:: Appearance :: Dark ,
162+ Appearance :: System => services:: user:: ports:: Appearance :: System ,
163+ }
164+ }
165+ }
166+
139167/// User settings content for API responses
140168#[ derive( Debug , Serialize , Deserialize , ToSchema ) ]
141169pub struct UserSettingsContent {
@@ -144,13 +172,19 @@ pub struct UserSettingsContent {
144172 /// System prompt
145173 #[ serde( skip_serializing_if = "Option::is_none" ) ]
146174 pub system_prompt : Option < String > ,
175+ /// Web search preference
176+ pub web_search : bool ,
177+ /// Appearance preference
178+ pub appearance : Appearance ,
147179}
148180
149181impl From < services:: user:: ports:: UserSettingsContent > for UserSettingsContent {
150182 fn from ( content : services:: user:: ports:: UserSettingsContent ) -> Self {
151183 Self {
152184 notification : content. notification ,
153185 system_prompt : content. system_prompt ,
186+ web_search : content. web_search ,
187+ appearance : content. appearance . into ( ) ,
154188 }
155189 }
156190}
@@ -172,6 +206,10 @@ pub struct UpdateUserSettingsRequest {
172206 pub notification : bool ,
173207 /// System prompt
174208 pub system_prompt : Option < String > ,
209+ /// Web search preference
210+ pub web_search : bool ,
211+ /// Appearance preference
212+ pub appearance : Appearance ,
175213}
176214
177215impl UpdateUserSettingsRequest {
@@ -193,6 +231,10 @@ pub struct UpdateUserSettingsPartiallyRequest {
193231 pub notification : Option < bool > ,
194232 /// System prompt
195233 pub system_prompt : Option < String > ,
234+ /// Web search preference
235+ pub web_search : Option < bool > ,
236+ /// Appearance preference
237+ pub appearance : Option < Appearance > ,
196238}
197239
198240impl UpdateUserSettingsPartiallyRequest {
0 commit comments