Linkify links in the markdown response from LLM [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Nikolay Vitkov (Gerrit)

unread,
8:54 AM (6 hours ago) 8:54 AM
to Jack Franklin, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Alex Rudenko and Jack Franklin

Nikolay Vitkov voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
  • Jack Franklin
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
Gerrit-Change-Number: 7614389
Gerrit-PatchSet: 6
Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
Gerrit-Comment-Date: Tue, 03 Mar 2026 13:54:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Nikolay Vitkov (Gerrit)

unread,
8:56 AM (6 hours ago) 8:56 AM
to Jack Franklin, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Alex Rudenko and Jack Franklin

Nikolay Vitkov added 1 comment

File front_end/models/ai_assistance/agents/ContextSelectionAgent.ts
Line 56, Patchset 6 (Latest):* Use type \`#req\` for network request and \`#file\` for source files. Only use ID inside the link, never ask about user selecting by ID.
Nikolay Vitkov . unresolved

Note here for some reason without the `#` in the types it start giving links like
[<text>](req-1). This seems to mitigate that.

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
  • Jack Franklin
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 6
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 13:56:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    9:00 AM (6 hours ago) 9:00 AM
    to Nikolay Vitkov, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Jack Franklin and Nikolay Vitkov

    Alex Rudenko voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jack Franklin
    • Nikolay Vitkov
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 9
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 14:00:24 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jack Franklin (Gerrit)

    unread,
    9:04 AM (6 hours ago) 9:04 AM
    to Nikolay Vitkov, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Nikolay Vitkov

    Jack Franklin voted and added 3 comments

    Votes added by Jack Franklin

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 9 (Latest):
    Jack Franklin . resolved

    lgtm with two notes, thanks!

    File front_end/models/ai_assistance/agents/ContextSelectionAgent.ts
    Line 56, Patchset 9 (Latest):* Use type \`#req\` for network request and \`#file\` for source files. Only use ID inside the link, never ask about user selecting by ID.
    Jack Franklin . unresolved

    this is quite unclearly phrased. do you mean to say never to ask the user to select an ID or tell it an ID?

    File front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts
    Line 28, Patchset 9 (Latest): #revealableLink(revealable: unknown, label: string): Lit.LitTemplate {
    Jack Franklin . unresolved

    should we update / add tests for this?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nikolay Vitkov
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 9
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 14:03:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nikolay Vitkov (Gerrit)

    unread,
    9:41 AM (5 hours ago) 9:41 AM
    to Jack Franklin, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Alex Rudenko and Jack Franklin

    Nikolay Vitkov voted and added 3 comments

    Votes added by Nikolay Vitkov

    Auto-Submit+1

    3 comments

    File front_end/models/ai_assistance/agents/ContextSelectionAgent.ts
    Line 56, Patchset 6:* Use type \`#req\` for network request and \`#file\` for source files. Only use ID inside the link, never ask about user selecting by ID.
    Nikolay Vitkov . resolved

    Note here for some reason without the `#` in the types it start giving links like
    [<text>](req-1). This seems to mitigate that.

    Nikolay Vitkov

    Done

    Line 56, Patchset 9:* Use type \`#req\` for network request and \`#file\` for source files. Only use ID inside the link, never ask about user selecting by ID.
    Jack Franklin . resolved

    this is quite unclearly phrased. do you mean to say never to ask the user to select an ID or tell it an ID?

    Nikolay Vitkov

    Acknowledged

    File front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts
    Line 28, Patchset 9: #revealableLink(revealable: unknown, label: string): Lit.LitTemplate {
    Jack Franklin . resolved

    should we update / add tests for this?

    Nikolay Vitkov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Jack Franklin
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 10
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 14:41:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Nikolay Vitkov <nvi...@chromium.org>
    Comment-In-Reply-To: Jack Franklin <jacktf...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jack Franklin (Gerrit)

    unread,
    10:11 AM (5 hours ago) 10:11 AM
    to Nikolay Vitkov, Alex Rudenko, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Alex Rudenko and Nikolay Vitkov

    Jack Franklin voted and added 1 comment

    Votes added by Jack Franklin

    Code-Review+1
    Commit-Queue+2

    1 comment

    Patchset-level comments
    Jack Franklin . resolved

    lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Nikolay Vitkov
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 10
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 15:11:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    12:09 PM (3 hours ago) 12:09 PM
    to Nikolay Vitkov, Jack Franklin, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Jack Franklin and Nikolay Vitkov

    Alex Rudenko voted

    Code-Review+1
    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jack Franklin
    • Nikolay Vitkov
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 11
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Reviewer: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Attention: Jack Franklin <jacktf...@chromium.org>
    Gerrit-Comment-Date: Tue, 03 Mar 2026 17:09:01 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Devtools-frontend LUCI CQ (Gerrit)

    unread,
    12:15 PM (2 hours ago) 12:15 PM
    to Nikolay Vitkov, Alex Rudenko, Jack Franklin, devtools-rev...@chromium.org

    Devtools-frontend LUCI CQ submitted the change

    Change information

    Commit message:
    Linkify links in the markdown response from LLM

    We provide a simple mechanism to link from the Markdown LLM,
    For network request we have uniqueId to use for that.
    For source files we have to create our own, currently
    kept around in the ContextSelectionAgent as a
    WeakMap between SourceFile and Number.

    If no resource is found the text is rendered as plain text.
    Fixed: 486780335
    Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Commit-Queue: Alex Rudenko <alexr...@chromium.org>
    Reviewed-by: Alex Rudenko <alexr...@chromium.org>
    Auto-Submit: Nikolay Vitkov <nvi...@chromium.org>
    Reviewed-by: Jack Franklin <jacktf...@chromium.org>
    Commit-Queue: Nikolay Vitkov <nvi...@chromium.org>
    Files:
    • M front_end/models/ai_assistance/AiConversation.test.ts
    • M front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt
    • M front_end/models/ai_assistance/agents/ContextSelectionAgent.test.ts
    • M front_end/models/ai_assistance/agents/ContextSelectionAgent.ts
    • M front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.test.ts
    • M front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts
    Change size: L
    Delta: 6 files changed, 237 insertions(+), 100 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Alex Rudenko, +1 by Jack Franklin
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: I02f46ee2c97aa3d92993b7e8c7a8df5794900172
    Gerrit-Change-Number: 7614389
    Gerrit-PatchSet: 12
    Gerrit-Owner: Nikolay Vitkov <nvi...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages