Support configuring effort alongside model
This commit is contained in:
@@ -915,10 +915,12 @@ final class TranscriptBuilder {
|
||||
|
||||
case "session.created":
|
||||
let model = str(p, "model") ?? ""
|
||||
return note([.text("\(ev.actor) started a \(jsString(p["vendor"])) session\(model.isEmpty ? "" : " (\(model))")")])
|
||||
let effort = str(p, "effort") ?? ""
|
||||
let detail = [model, effort.isEmpty ? "" : effortLabel(effort)].filter { !$0.isEmpty }.joined(separator: ", ")
|
||||
return note([.text("\(ev.actor) started a \(jsString(p["vendor"])) session\(detail.isEmpty ? "" : " (\(detail))")")])
|
||||
|
||||
case "session.model":
|
||||
return note([.text("\(ev.actor) switched the model to \(jsString(p["model"]))")])
|
||||
return note([.text("\(ev.actor) switched the model to \(jsString(p["model"])) at \(effortLabel(str(p, "effort") ?? ""))")])
|
||||
|
||||
case "session.state":
|
||||
guard let error = str(p, "error"), !error.isEmpty else {
|
||||
|
||||
Reference in New Issue
Block a user