The open file in words, not as a JSON record: from "status":"ready" the model made up * a pull request status "ready" (K12).
(context: BrowserChatReaderContext)
| 102 | /** The open file in words, not as a JSON record: from "status":"ready" the model made up |
| 103 | * a pull request status "ready" (K12). */ |
| 104 | function readerMetadata(context: BrowserChatReaderContext): string { |
| 105 | const source = context.source; |
| 106 | const path = `\`${(context.path ?? source?.path ?? '').replace(/`/g, "'")}\``; |
| 107 | if (!source) return `Current file ${path}: source ${context.status === 'loading' ? 'still loading' : context.status === 'empty' ? 'not open' : 'unavailable'} (reader status: ${context.status}).`; |
| 108 | const range = source.kind === 'selection' ? `lines ${source.startLine}:${source.startColumn}-${source.endLine}:${source.endColumn}` : `lines ${source.startLine}-${source.endLine}`; |
| 109 | return `Current ${source.kind === 'selection' ? 'selection in' : 'file'} ${path}, ${range}, source version ${source.sourceVersion}.${source.partial ? ` ${source.partial}` : ''}`; |
| 110 | } |
| 111 | |
| 112 | function readerSystemContext(context: BrowserChatReaderContext): string { |
| 113 | const source = context.source; |
no outgoing calls
no test coverage detected