| 173 | } |
| 174 | |
| 175 | function getSessionTargetMeta(target: unknown): { label: string; description: string } { |
| 176 | switch (target) { |
| 177 | case "isolated": |
| 178 | return { |
| 179 | label: "Isolated session", |
| 180 | description: "Runs in a separate session without interrupting the current conversation.", |
| 181 | }; |
| 182 | case "current": |
| 183 | return { |
| 184 | label: "Current session", |
| 185 | description: "Runs directly within the current session.", |
| 186 | }; |
| 187 | case "shared": |
| 188 | return { |
| 189 | label: "Shared session", |
| 190 | description: "Multiple tasks may share the same session.", |
| 191 | }; |
| 192 | default: |
| 193 | return { |
| 194 | label: readString(target) || "Unspecified", |
| 195 | description: "No additional details.", |
| 196 | }; |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | function formatDeliverySummary(deliveryValue: unknown): string { |
| 201 | const delivery = asRecord(deliveryValue); |