chore: format codebase with ktlint
This commit is contained in:
1 parent
4087ee0cac
commit
19d44c077b
4 files changed
+38
-15
No files matched your search
@@ -95,9 +95,7 @@ object AuthManager {
|
|||||||
requirePrefs().edit().putString(KEY_CONNECTION_PROFILES, json).apply()
|
requirePrefs().edit().putString(KEY_CONNECTION_PROFILES, json).apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getProfileToken(profileId: String): String? {
|
fun getProfileToken(profileId: String): String? = requirePrefs().getString("token_$profileId", null)
|
||||||
return requirePrefs().getString("token_$profileId", null)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setProfileToken(
|
fun setProfileToken(
|
||||||
profileId: String,
|
profileId: String,
|
||||||
|
|||||||
@@ -150,13 +150,33 @@ class ChatViewModel(
|
|||||||
|
|
||||||
is WsEvent.SessionInfo -> {}
|
is WsEvent.SessionInfo -> {}
|
||||||
|
|
||||||
is WsEvent.MessageStart -> handleMessageStart(event)
|
is WsEvent.MessageStart -> {
|
||||||
is WsEvent.MessageToken -> handleMessageToken(event)
|
handleMessageStart(event)
|
||||||
is WsEvent.ThinkingDelta -> handleThinkingDelta(event)
|
}
|
||||||
is WsEvent.MessageComplete -> handleMessageComplete(event)
|
|
||||||
is WsEvent.MessageDone -> handleMessageDone(event)
|
is WsEvent.MessageToken -> {
|
||||||
is WsEvent.ToolStart -> handleToolStart(event)
|
handleMessageToken(event)
|
||||||
is WsEvent.ToolComplete -> handleToolComplete(event)
|
}
|
||||||
|
|
||||||
|
is WsEvent.ThinkingDelta -> {
|
||||||
|
handleThinkingDelta(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
is WsEvent.MessageComplete -> {
|
||||||
|
handleMessageComplete(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
is WsEvent.MessageDone -> {
|
||||||
|
handleMessageDone(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
is WsEvent.ToolStart -> {
|
||||||
|
handleToolStart(event)
|
||||||
|
}
|
||||||
|
|
||||||
|
is WsEvent.ToolComplete -> {
|
||||||
|
handleToolComplete(event)
|
||||||
|
}
|
||||||
|
|
||||||
is WsEvent.ClarifyRequest -> {
|
is WsEvent.ClarifyRequest -> {
|
||||||
if (!isCurrentSession(event.sessionId)) return
|
if (!isCurrentSession(event.sessionId)) return
|
||||||
|
|||||||
@@ -58,10 +58,11 @@ class SettingsViewModel : ViewModel() {
|
|||||||
profiles = AuthManager.getConnectionProfiles(),
|
profiles = AuthManager.getConnectionProfiles(),
|
||||||
selectedProfileId = selectedId,
|
selectedProfileId = selectedId,
|
||||||
renameProfileName =
|
renameProfileName =
|
||||||
AuthManager.getConnectionProfiles().firstOrNull {
|
AuthManager
|
||||||
p ->
|
.getConnectionProfiles()
|
||||||
p.id == selectedId
|
.firstOrNull { p ->
|
||||||
}?.name ?: "",
|
p.id == selectedId
|
||||||
|
}?.name ?: "",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,11 @@ fun SkillsScreen(
|
|||||||
var selectedStatus by remember { mutableStateOf("All Statuses") }
|
var selectedStatus by remember { mutableStateOf("All Statuses") }
|
||||||
val categories =
|
val categories =
|
||||||
remember(state.skills) {
|
remember(state.skills) {
|
||||||
listOf("All") + state.skills.mapNotNull { it.category }.distinct().sorted()
|
listOf("All") +
|
||||||
|
state.skills
|
||||||
|
.mapNotNull { it.category }
|
||||||
|
.distinct()
|
||||||
|
.sorted()
|
||||||
}
|
}
|
||||||
var selectedCategory by remember { mutableStateOf("All") }
|
var selectedCategory by remember { mutableStateOf("All") }
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user