279
private tryToParseDynamicVariable(message: string, offset: number, position: IPosition, references: ReadonlyArray<IDynamicVariable>): ChatRequestDynamicVariablePart | undefined {
280
const refAtThisPosition = references.find(r =>
282
r.range.startColumn === position.column);
283
if (refAtThisPosition) {
284
>
const length = refAtThisPosition.range.endColumn - refAtThisPosition.range.startColumn;
chatRequestParser.ts
285
>
const text = message.substring(0, length);
286
>
const range = new OffsetRange(offset, offset + length);
287
>
return new ChatRequestDynamicVariablePart(range, refAtThisPosition.range, text, refAtThisPosition.id, refAtThisPosition.modelDescription, refAtThisPosition.data, refAtThisPosition.fullName, refAtThisPosition.icon, refAtThisPosition.isFile, refAtThisPosition.isDirectory, refAtThisPosition._meta, refAtThisPosition.isAttachmentReference);
288
>
}
289
290
return;