(context: BrowserChatContext)
| 36 | } |
| 37 | |
| 38 | function architectureTarget(context: BrowserChatContext): SourceTarget | undefined { |
| 39 | let parsed: Record<string, unknown> | undefined; |
| 40 | try { parsed = record(record(JSON.parse(context.text))?.evidence); } catch { return undefined; } |
| 41 | return parsed?.kind === 'current-selection-evidence' ? architectureFacts(parsed)?.target : undefined; |
| 42 | } |
| 43 | |
| 44 | /** The symbol an explanation is about, whether its source is read or already carried. */ |
| 45 | export function selectionSubject(context: BrowserChatContext | undefined): { name: string; kind?: string } | undefined { |
no test coverage detected