Skip to content

Commit 0c02324

Browse files
committed
Undo data-context.ts changes, because after google#1179 the workaround is no longer needed
1 parent d35d90e commit 0c02324

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

renderers/web_core/src/v0_9/rendering/data-context.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,10 @@ export class DataContext {
360360
}
361361

362362
private resolvePath(path: string): string {
363-
// In A2UI v0.9, all paths generated by the prompt-first LLM must begin with a leading `/`
364-
// to satisfy RFC 6901 JSON Pointer validation.
365-
// Thus, paths like `/imageUrl` are effectively relative to this DataContext.
366-
const relPath = path.startsWith('/') ? path.substring(1) : path;
367-
368-
if (relPath === '' || relPath === '.') {
363+
if (path.startsWith('/')) {
364+
return path;
365+
}
366+
if (path === '' || path === '.') {
369367
return this.path;
370368
}
371369

@@ -375,6 +373,6 @@ export class DataContext {
375373
}
376374
if (base === '/') base = '';
377375

378-
return `${base}/${relPath}`;
376+
return `${base}/${path}`;
379377
}
380378
}

0 commit comments

Comments
 (0)