* feat(#441): add profile cloning and description editing * feat(#441): add profile builder wizard and API enhancements Introduce 5-step Profile Builder wizard into ProfilesScreen and add support for create/clone endpoints. * fix(#441): restore imports and add ProfileInfo constructor defaults * style: run ktlint format on codebase to fix styling errors * fix(#441): address PR review comments including provider slug bug, validation, and strings * fix(#441): remove unused McpServerConfigInput import --------- Co-authored-by: Hermes Agent <hermes@agent.local>
This commit is contained in:
1 parent
846a9380e2
commit
d181851670
37 files changed
+2299
-448
No files matched your search
@@ -9,9 +9,11 @@ import com.m57.hermescontrol.data.model.AgentPluginInstallBody
|
||||
import com.m57.hermescontrol.data.model.AuxiliaryModelsResponse
|
||||
import com.m57.hermescontrol.data.model.BulkDeleteRequest
|
||||
import com.m57.hermescontrol.data.model.CheckpointsResponse
|
||||
import com.m57.hermescontrol.data.model.CloneProfileRequest
|
||||
import com.m57.hermescontrol.data.model.ConfigSchemaResponse
|
||||
import com.m57.hermescontrol.data.model.ConfigUpdateRequest
|
||||
import com.m57.hermescontrol.data.model.CreateCronJobRequest
|
||||
import com.m57.hermescontrol.data.model.CreateProfileRequest
|
||||
import com.m57.hermescontrol.data.model.CreateTaskBody
|
||||
import com.m57.hermescontrol.data.model.CreateWebhookRequest
|
||||
import com.m57.hermescontrol.data.model.CredentialPoolResponse
|
||||
@@ -25,6 +27,7 @@ import com.m57.hermescontrol.data.model.EnvVarRevealRequest
|
||||
import com.m57.hermescontrol.data.model.EnvVarRevealResponse
|
||||
import com.m57.hermescontrol.data.model.EnvVarUpdate
|
||||
import com.m57.hermescontrol.data.model.HookResponse
|
||||
import com.m57.hermescontrol.data.model.HubSkill
|
||||
import com.m57.hermescontrol.data.model.KanbanBoardResponse
|
||||
import com.m57.hermescontrol.data.model.KanbanBoardsResponse
|
||||
import com.m57.hermescontrol.data.model.KanbanTask
|
||||
@@ -67,6 +70,7 @@ import com.m57.hermescontrol.data.model.Toolset
|
||||
import com.m57.hermescontrol.data.model.ToolsetToggleRequest
|
||||
import com.m57.hermescontrol.data.model.UpdateCheckResponse
|
||||
import com.m57.hermescontrol.data.model.UpdateCronJobRequest
|
||||
import com.m57.hermescontrol.data.model.UpdateProfileDescriptionRequest
|
||||
import com.m57.hermescontrol.data.model.UpdateProfileModelRequest
|
||||
import com.m57.hermescontrol.data.model.UpdateProfileSoulRequest
|
||||
import com.m57.hermescontrol.data.model.UpdateRawConfigRequest
|
||||
@@ -146,6 +150,11 @@ interface HermesApiService {
|
||||
@GET("api/skills")
|
||||
suspend fun getSkills(): Response<List<Skill>>
|
||||
|
||||
@POST("api/skills/hub/search")
|
||||
suspend fun searchSkillsHub(
|
||||
@Query("q") q: String,
|
||||
): Response<List<HubSkill>>
|
||||
|
||||
@PUT("api/skills/toggle")
|
||||
suspend fun toggleSkill(
|
||||
@Body body: ToggleSkillRequest,
|
||||
@@ -202,6 +211,11 @@ interface HermesApiService {
|
||||
@GET("api/profiles")
|
||||
suspend fun getProfiles(): Response<ProfilesResponse>
|
||||
|
||||
@POST("api/profiles")
|
||||
suspend fun createProfile(
|
||||
@Body body: CreateProfileRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@GET("api/profiles/active")
|
||||
suspend fun getActiveProfile(): Response<ActiveProfileResponse>
|
||||
|
||||
@@ -227,6 +241,18 @@ interface HermesApiService {
|
||||
@Body body: UpdateProfileModelRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@POST("api/profiles/{name}/clone")
|
||||
suspend fun cloneProfile(
|
||||
@Path("name") name: String,
|
||||
@Body body: CloneProfileRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@PUT("api/profiles/{name}/description")
|
||||
suspend fun updateProfileDescription(
|
||||
@Path("name") name: String,
|
||||
@Body body: UpdateProfileDescriptionRequest,
|
||||
): Response<Unit>
|
||||
|
||||
@GET("api/tools/toolsets")
|
||||
suspend fun getToolsets(): Response<List<Toolset>>
|
||||
|
||||
|
||||
@@ -49,7 +49,10 @@ fun mapHttpError(
|
||||
val detail =
|
||||
if (errorBody != null) {
|
||||
try {
|
||||
val parsed = com.google.gson.JsonParser.parseString(errorBody).asJsonObject
|
||||
val parsed =
|
||||
com.google.gson.JsonParser
|
||||
.parseString(errorBody)
|
||||
.asJsonObject
|
||||
parsed.get("detail")?.asString
|
||||
} catch (_: Exception) {
|
||||
null
|
||||
|
||||
Reference in new issue
Block a user