mirror of
https://github.com/wu736139669/hapi.git
synced 2026-12-04 06:57:55 +00:00
feat(ios): add outline, plan quotas, and pull-request awareness
Three H5 parity pieces for the chat surface: - Conversation outline: a sheet lists the user prompts loaded in the transcript, filters them by text, and scrolls/flashes the chosen prompt through the same tokenized transcript target as pending requests. - Plan quotas: a compact 5h/7d used-percent readout in the composer strip, fed by the runner's agent-quotas RPC through a new machine endpoint client. Hidden unless the machine advertises the capability and the active agent reports an OK account; refreshes every two minutes. - PR awareness: session metadata now decodes external refs (tolerantly for unknown kinds), the list row shows the primary GitHub PR number with a forge-state tint, and the row context menu opens the PR in Safari. Adds pure tests for outline filtering/truncation, quota selection and countdown formatting, and PR badge precedence plus wire decoding. 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:
@@ -151,6 +151,8 @@ public struct SessionMetadata: Codable, Equatable, Sendable {
|
||||
public var piSelectedModel: PiModelReference?
|
||||
/// User-message `localId`s with a native fork/rewind point.
|
||||
public var conversationHistoryPoints: [String: Bool]?
|
||||
/// Structured contribution links (GitHub PRs, …).
|
||||
public var externalRefs: [ExternalRef]?
|
||||
|
||||
public init(
|
||||
path: String,
|
||||
@@ -182,7 +184,8 @@ public struct SessionMetadata: Codable, Equatable, Sendable {
|
||||
piSessionId: String? = nil,
|
||||
dshSessionId: String? = nil,
|
||||
piSelectedModel: PiModelReference? = nil,
|
||||
conversationHistoryPoints: [String: Bool]? = nil
|
||||
conversationHistoryPoints: [String: Bool]? = nil,
|
||||
externalRefs: [ExternalRef]? = nil
|
||||
) {
|
||||
self.path = path
|
||||
self.host = host
|
||||
@@ -214,5 +217,6 @@ public struct SessionMetadata: Codable, Equatable, Sendable {
|
||||
self.dshSessionId = dshSessionId
|
||||
self.piSelectedModel = piSelectedModel
|
||||
self.conversationHistoryPoints = conversationHistoryPoints
|
||||
self.externalRefs = externalRefs
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user