Trigger folder access prompts in permission checks; add lead welcome

This commit is contained in:
Ian Gulliver
2026-10-22 08:01:59 -07:00
parent e1eeaad925
commit a3d1852f45
13 changed files with 227 additions and 149 deletions
+28
View File
@@ -6,6 +6,26 @@ enum ChatKind: Equatable {
case task(String?)
}
#if os(macOS)
private let leadPlaces = "Tasks open on the right; [switch between them](byre-app://switcher) with ⌘K. Their questions, finished work and reviews wait for you there."
private let leadSettings = "pick the default model for new tasks, turn on notifications, and check this Mac's permissions so agents can see and control it and read your Desktop, Documents and Downloads. The [Server](byre-app://tab?name=server) tab checks the same for the server's agents."
#else
private let leadPlaces = "Tasks live in the Tasks tab, with the ones waiting on you marked; [find or start one](byre-app://switcher) any time."
private let leadSettings = "pick the default model for new tasks, turn on notifications, and choose this server's window color."
#endif
private let leadMore = "As you work, the lead keeps [Notes](byre-app://tab?name=notes) on how you like things done, [Workflows](byre-app://tab?name=workflows) run several agents on one job, such as a review, and [Status](byre-app://tab?name=status) shows the turns running now and how much of each vendor's limits you've used."
private let leadWelcome = """
**Welcome to byre.** This is your lead, the agent you talk to about all your work. Tell it what you want done and it starts tasks: each one is an agent working on its own branch of a project, which you merge when you're happy with it. Ask it to add a project first, giving the path of a git repository on the server.
\(leadPlaces)
\(leadMore)
Start in [Settings](byre-app://tab?name=settings): \(leadSettings)
"""
struct AttentionGroup: Identifiable {
let id: String
let label: String
@@ -157,6 +177,10 @@ final class ChatModel {
kind == .lead && store.leadHasOlder()
}
var welcome: Bool {
kind == .lead && !loading && !hasOlder && builder.root.rows.isEmpty && builder.pending.isEmpty
}
func start() {
if started {
return
@@ -790,6 +814,10 @@ private struct TranscriptScroll: View {
PendingView(pending: p, model: model)
.padding(.top, 12)
}
if model.welcome {
MarkdownView(blocks: parseMarkdown(leadWelcome))
.padding(.top, 12)
}
}
}
.scrollTargetLayout()