Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public final class PluginMessagingIngressAdapter: MessagingIngressAdapter, @unch
}
}

/// Channel history does not include nested replies. Slack also excludes the
/// Channel history does not include nested replies. Some vendors also exclude the
/// `oldest` cursor message unless `inclusive` is set, so stored `reply_count`
/// can stay stale after the first reply. Re-poll threaded parents, newest first.
private func replyParentsNeedingSync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public enum MessagingMessageDirection: String, Codable, Sendable, Hashable {
case outbound
}

/// Which messages to load for a conversation tab vs a nested Slack-style reply thread.
/// Which messages to load for a conversation tab vs a nested reply thread.
public enum MessagingMessageListFilter: Sendable, Hashable {
/// Channel/DM feed: messages that are not replies.
case channelRoots
/// Root vendor message plus its replies (Slack `thread_ts`).
/// Root vendor message plus its replies (`parentVendorMessageID`).
case replyThread(parentVendorMessageID: String)
}

Expand All @@ -86,9 +86,9 @@ public struct MessagingMessageDTO: Codable, Sendable, Hashable, Identifiable {
public let sender: String
public let body: String
public let createdAt: Date
/// Slack `thread_ts` when this row is a reply. Nil for channel-root messages.
/// Vendor parent id when this row is a reply. Nil for conversation-root messages.
public var parentVendorMessageID: String?
/// Vendor-reported reply count on a root message (Slack `reply_count`).
/// Vendor-reported reply count on a root message.
public var replyCount: Int

public init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

/// User-facing notification text for inbound connector messages.
public enum MessagingInboundNotificationCopy: Sendable {
/// Slack-style opaque actor IDs (member, bot, channel, group) are not human-readable.
/// Opaque vendor actor IDs (member, bot, channel, group) are not human-readable.
public static func isOpaqueVendorActorID(_ sender: String) -> Bool {
let trimmed = sender.trimmingCharacters(in: .whitespacesAndNewlines)
guard trimmed.count >= 8, let first = trimmed.first else { return false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Foundation
/// Resolves declared plugin secrets from Keychain, with a development `.env` escape hatch.
public enum PluginSecretResolver: Sendable {
/// Field ids the host and daemon accept as an HTTP call credential.
/// Create-time auth preference may store `api_token` when docs look OAuth-only;
/// Slack runtime historically looked only for `bot_token`.
/// Create-time auth preference may store `api_token` when docs look OAuth-only.
/// Older call sites looked only for `bot_token`.
public static let callCredentialFieldIDs: [String] = [
"bot_token",
"token",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public struct ConnectorMessagingResult: Sendable, Hashable {
}
}

/// Incremental poll cursors as unix seconds with Slack-style 6 fractional digits.
/// Incremental poll cursors as unix seconds with 6 fractional digits.
public enum ConnectorPollCursor: Sendable {
public static func unixSeconds(_ date: Date) -> String {
String(format: "%.6f", locale: Locale(identifier: "en_US_POSIX"), date.timeIntervalSince1970)
Expand Down
23 changes: 0 additions & 23 deletions ui/MCPService/MCPServiceToolHost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,29 +361,6 @@ actor MCPServiceToolHost {
return false
}

private func legacyExecutionContext(from request: MCPToolCallRequest) -> ExecutionContextWire? {
let active = request.pluginFactoryCreationActive
|| MCPServiceCallContext.shared.pluginFactoryCreationActive
|| TurnProcessContext.effectivePluginFactoryCreationActive
guard active else { return nil }
switch request.principal {
case .agent(let sessionID, let agentID):
return ExecutionContextWire(
sessionID: sessionID,
principal: request.principal,
agentID: agentID,
capabilities: [.syncWebCrawl, .hostReviewRetry]
)
default:
return ExecutionContextWire(
sessionID: "legacy-mcp",
principal: request.principal,
agentID: "legacy",
capabilities: [.syncWebCrawl, .hostReviewRetry]
)
}
}

private static func skillIndex(from repo: DBRepository) async throws -> [PluginSkillDisclosure.IndexEntry] {
let summaries = try await repo.listPluginFactoryReleaseSummaries()
var latestByPlugin: [String: PluginFactoryReleaseSummary] = [:]
Expand Down
25 changes: 0 additions & 25 deletions ui/ui/DebugLog/LogStore.swift

This file was deleted.

6 changes: 3 additions & 3 deletions ui/ui/Messaging/MessagingSessionStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class MessagingSessionStore: ObservableObject {
@Published private(set) var lastError: String?
@Published private(set) var isMessagingWorkspace = false

/// Local outbound rows shown before Slack ack / poll. Never persisted.
/// Local outbound rows shown before the connector acks the send. Never persisted.
private var pendingOutboundIDs: Set<String> = []
private var pendingOutboundByID: [String: MessagingMessageDTO] = [:]

Expand All @@ -60,7 +60,7 @@ final class MessagingSessionStore: ObservableObject {
return agentWorkInFlight.first { $0.parentVendorMessageID == parentID }?.statusLabel
}

/// Reply pane label. Never the Slack channel (`selectedThread.title`).
/// Reply pane label. Never the connector conversation title (`selectedThread.title`).
var replyThreadTitle: String {
guard let parentID = selectedReplyParentVendorMessageID else { return "Thread" }
let body = visibleReplyMessages.first(where: { $0.vendorMessageID == parentID })?.body
Expand Down Expand Up @@ -299,7 +299,7 @@ final class MessagingSessionStore: ObservableObject {
persisted.parentVendorMessageID == pending.parentVendorMessageID,
abs(persisted.createdAt.timeIntervalSince(pending.createdAt)) < 180
else { return false }
// DB pending rows use pending:<uuid> until Slack acks; still twins of UI optimistic rows.
// DB pending rows use pending:<uuid> until the connector acks; still twins of UI optimistic rows.
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum MessagingReplyThreadService {
publishPresence()
MessagingPollRefreshService.requestPoll()
guard let pluginID, let thread else { return }
// Paint from DB first; Slack poll catches peer replies without blocking the pane.
// Paint from DB first; the connector poll catches peer replies without blocking the pane.
Task {
do {
try await connectorRuntime.pollConversation(
Expand Down
2 changes: 1 addition & 1 deletion ui/ui/Session/ChatTabSurfacePolicy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enum ChatTabSurfacePolicy: Sendable {
case needsHumanChoice
}

/// Slice 1 fallback when no spec Present exists yet.
/// Bind from whether this tab is a messaging connector when no present tree exists yet.
static func bind(isMessagingConnector: Bool) -> Binding {
if isMessagingConnector {
return .decided(.thread)
Expand Down
24 changes: 0 additions & 24 deletions ui/ui/Views/DebugLogView.swift

This file was deleted.

2 changes: 0 additions & 2 deletions ui/ui/uiApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import DBRepository

@main
struct uiApp: App {
@StateObject private var logStore = LogStore()
@NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate

/// Captured at process start so Scene content cannot race AppDelegate.
Expand Down Expand Up @@ -46,7 +45,6 @@ struct uiApp: App {
.accessibilityHidden(true)
} else {
ContentView()
.environmentObject(logStore)
.preferredColorScheme(.light)
.background(DerrickMainWindowRegistrar())
}
Expand Down
Loading