Context Object
The context object passed to every plugin's render() function.
The render() function receives a context object with information about the current rendering environment.
Widget context
render(context) {
context.mode // 'widget' | 'full'
context.transcriptSegments // array (if @events transcript:segment declared)
}| Field | Type | Description |
|---|---|---|
mode | 'widget' | 'full' | Whether rendering in the sidebar or full content panel |
transcriptSegments | Array | Live transcript data. Only present if @events transcript:segment is declared. |
Renderer context
Renderers receive two arguments — the file content as a string and a context object:
render(content, context) {
content // string — the raw file content
context.filePath // string — path of the file being rendered
context.fileContent // string — same as content (for convenience)
}| Field | Type | Description |
|---|---|---|
content (first argument) | string | The raw file content |
context.filePath | string | Path of the file being rendered |
context.fileContent | string | Same as the first content argument |
Agent context
Agent plugins receive a minimal context:
render(context) {
// context is currently empty for agent plugins
// Future: will include active file path, workspace state
}Transcript segments
Each segment in context.transcriptSegments has:
| Field | Type | Description |
|---|---|---|
text | string | The transcribed text |
speaker | string | Speaker identity (email) |
displayName | string | Speaker display name |
isFinal | boolean | Whether this is a final transcription (vs interim) |
timestamp | string | ISO timestamp |
Note
Only plugins with @events transcript:segment receive transcript data. This avoids serialization overhead for plugins that don't need it.