TitleGenerator returns a title generator for automatic session title generation.
(ctx context.Context)
| 1239 | |
| 1240 | // TitleGenerator returns a title generator for automatic session title generation. |
| 1241 | func (r *LocalRuntime) TitleGenerator(ctx context.Context) *sessiontitle.Generator { |
| 1242 | a := r.CurrentAgent() |
| 1243 | if a == nil { |
| 1244 | return nil |
| 1245 | } |
| 1246 | models := a.TitleModels(ctx) |
| 1247 | if len(models) == 0 { |
| 1248 | return nil |
| 1249 | } |
| 1250 | return sessiontitle.New(models[0], models[1:]...) |
| 1251 | } |
| 1252 | |
| 1253 | // getAgentModelID returns the model ID for an agent. The zero ID is |
| 1254 | // returned when no model is configured. |
nothing calls this directly
no test coverage detected