Nucleic: Build A Claude “ultracode”-like System
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user