mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +00:00
feat(ios): expand session creation and chat status surfaces
- Fetch Claude models from the machine catalog, expose the full grouped picker with per-model efforts, and remember launch defaults. - Add directory quick-create, known-directory suggestions, live machine CPU/memory in filters, and the DeepSeek agent icon. - Add the collapsible session status card (goal, tasks, subagents, terminals, team), context-usage meter, and compaction/background/fast/collaboration composer chips without the redundant inline model controls. - Add code block line numbers, wrapping and collapse; per-message share and rewind; a floating session search that does not push the list; and move sign out to the bottom of Settings. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ struct UserTextBlockView: View {
|
||||
@Environment(\.hapiTypography) private var typography
|
||||
@Environment(\.hapiTheme) private var theme
|
||||
@Environment(\.openChatMessage) private var openMessage
|
||||
@State private var confirmRewind = false
|
||||
|
||||
init(block: UserTextBlock) {
|
||||
self.block = block
|
||||
@@ -111,8 +112,39 @@ struct UserTextBlockView: View {
|
||||
metadata: nil,
|
||||
alignment: .trailing
|
||||
)
|
||||
if let interactions, let localId = block.localId {
|
||||
let actions = interactions.historyActions(forMessageLocalId: localId)
|
||||
// Forking the whole conversation already lives in the
|
||||
// toolbar menu; per-message history only needs rewind.
|
||||
if actions.rewind {
|
||||
Button {
|
||||
confirmRewind = true
|
||||
} label: {
|
||||
Image(systemName: "clock.arrow.circlepath")
|
||||
.frame(width: 28, height: 28)
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.disabled(interactions.historyActionPending)
|
||||
.accessibilityLabel(Text("Rewind to here"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.confirmationDialog(
|
||||
"Rewind to this message?",
|
||||
isPresented: $confirmRewind,
|
||||
titleVisibility: .visible
|
||||
) {
|
||||
Button("Rewind", role: .destructive) {
|
||||
if let localId = block.localId {
|
||||
interactions?.rewindConversation(toMessageLocalId: localId)
|
||||
}
|
||||
}
|
||||
Button("Cancel", role: .cancel) {}
|
||||
} message: {
|
||||
Text("Later messages will be removed from the active conversation.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user