fix(#284): remove dead code across API, models, WS client, and docs (#299)

Remove six dead-code findings from the automated review:
- CODE-01: updateProfileDescription endpoint + UpdateProfileDescriptionRequest DTO (uncalled)
- CODE-02: getConfig() endpoint (app uses getRawConfig())
- CODE-03: TogglePluginRequest DTO (unreferenced)
- CODE-05: mark isConnected with @VisibleForTesting (test-only usage)
- CODE-06: fix KDoc createdAt -> timestamp to match actual field name

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-06-22 14:05:31 +03:00
1 parent 2acfaabfcb
commit b81a84f801
5 files changed
+3 -19

No files matched your search

@@ -9,7 +9,7 @@ import androidx.room.PrimaryKey
* UI model but is stored independently so it survives process death.
*
* Messages are scoped by [sessionId] so switching sessions loads the right
* thread. The [createdAt] field preserves original ordering even if Room
* thread. The [timestamp] field preserves original ordering even if Room
* reorders internally.
*/
@Entity(tableName = "chat_messages")
@@ -28,10 +28,6 @@ data class PluginsHubResponse(
val plugins: List<PluginInfo>,
)
data class TogglePluginRequest(
val enabled: Boolean,
)
data class AgentPluginInstallBody(
val identifier: String,
val force: Boolean = false,
@@ -37,7 +37,3 @@ data class UpdateProfileModelRequest(
val provider: String,
val model: String,
)
data class UpdateProfileDescriptionRequest(
val description: String,
)
@@ -37,7 +37,6 @@ import com.m57.hermescontrol.data.model.SystemStatsResponse
import com.m57.hermescontrol.data.model.ToggleSkillRequest
import com.m57.hermescontrol.data.model.Toolset
import com.m57.hermescontrol.data.model.ToolsetToggleRequest
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
@@ -78,9 +77,6 @@ interface HermesApiService {
@GET("api/system/stats")
suspend fun getSystemStats(): Response<SystemStatsResponse>
@GET("api/config")
suspend fun getConfig(): Response<Map<String, Any?>>
@GET("api/skills")
suspend fun getSkills(): Response<List<Skill>>
@@ -149,12 +145,6 @@ interface HermesApiService {
@Body body: UpdateProfileModelRequest,
): 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>>
@@ -1,6 +1,7 @@
package com.m57.hermescontrol.data.ws
import android.util.Log
import androidx.annotation.VisibleForTesting
import com.google.gson.Gson
import com.m57.hermescontrol.BuildConfig
import com.m57.hermescontrol.data.local.AuthManager
@@ -95,6 +96,7 @@ object HermesWsClient {
// ── Connection helpers ────────────────────────────────────────────────
@VisibleForTesting
val isConnected: Boolean get() = connected.get()
/** Open a WebSocket connection using settings from [AuthManager]. */