Nucleic: Build A Claude “ultracode”-like System

This commit is contained in:
Nucleic
2026-06-20 17:02:48 -07:00
parent 49aaf8ca89
commit f90ba73f0b
3 changed files with 99 additions and 9 deletions
@@ -47,6 +47,7 @@ struct ProjectDetailView: View {
@EnvironmentObject var store: RemoteStore
let project: WireProject
@State private var draft = ""
@State private var effort = MobileEfforts.fallback
private var sessions: [WireSessionSummary] {
store.liveSessions
@@ -57,14 +58,21 @@ struct ProjectDetailView: View {
var body: some View {
List {
Section {
HStack(alignment: .bottom, spacing: 8) {
TextField("Start a chat in \(project.name)…", text: $draft, axis: .vertical)
.textFieldStyle(.roundedBorder).lineLimit(1...4)
Button {
store.startChat(in: project.id, message: draft)
draft = ""
} label: { Image(systemName: "arrow.up.circle.fill").font(.title2) }
.disabled(draft.trimmingCharacters(in: .whitespaces).isEmpty || !store.canControl)
VStack(alignment: .leading, spacing: 8) {
HStack {
EffortMenu(effort: $effort)
Spacer()
}
HStack(alignment: .bottom, spacing: 8) {
TextField("Start a chat in \(project.name)…", text: $draft, axis: .vertical)
.textFieldStyle(.roundedBorder).lineLimit(1...4)
.ultracodeGlow(active: MobileEfforts.isUltracode(effort))
Button {
store.startChat(in: project.id, message: draft, effort: effort)
draft = ""
} label: { Image(systemName: "arrow.up.circle.fill").font(.title2) }
.disabled(draft.trimmingCharacters(in: .whitespaces).isEmpty || !store.canControl)
}
}
}
Section("Sessions") {