(input: {
patch?: FooterPatch
subagent?: FooterSubagentState
current: FooterView
previous: FooterView
})
| 309 | } |
| 310 | |
| 311 | function composeFooter(input: { |
| 312 | patch?: FooterPatch |
| 313 | subagent?: FooterSubagentState |
| 314 | current: FooterView |
| 315 | previous: FooterView |
| 316 | }) { |
| 317 | let footer: FooterOutput | undefined |
| 318 | |
| 319 | if (input.subagent) { |
| 320 | footer = { |
| 321 | ...footer, |
| 322 | subagent: input.subagent, |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | if (!sameView(input.previous, input.current)) { |
| 327 | footer = { |
| 328 | ...footer, |
| 329 | view: input.current, |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | if (input.current.type !== "prompt") { |
| 334 | footer = { |
| 335 | ...footer, |
| 336 | patch: { |
| 337 | ...input.patch, |
| 338 | status: blockerStatus(input.current), |
| 339 | }, |
| 340 | } |
| 341 | return footer |
| 342 | } |
| 343 | |
| 344 | if (input.patch) { |
| 345 | footer = { |
| 346 | ...footer, |
| 347 | patch: input.patch, |
| 348 | } |
| 349 | return footer |
| 350 | } |
| 351 | |
| 352 | if (input.previous.type !== "prompt") { |
| 353 | footer = { |
| 354 | ...footer, |
| 355 | patch: { |
| 356 | status: "", |
| 357 | }, |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | return footer |
| 362 | } |
| 363 | |
| 364 | function traceTabs(trace: Trace | undefined, prev: FooterSubagentTab[], next: FooterSubagentTab[]) { |
| 365 | const before = new Map(prev.map((item) => [item.sessionID, item])) |
no test coverage detected