-
Notifications
You must be signed in to change notification settings - Fork 47
Update agent framework structure #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -603,6 +603,11 @@ grd_files_bundled_sources = [ | |
"front_end/panels/ai_assistance/ai_assistance.js", | ||
"front_end/panels/ai_chat/ui/AIChatPanel.js", | ||
"front_end/panels/ai_chat/ui/ChatView.js", | ||
"front_end/panels/ai_chat/ui/LiveAgentSessionComponent.js", | ||
"front_end/panels/ai_chat/ui/ToolCallComponent.js", | ||
"front_end/panels/ai_chat/ui/ToolResultComponent.js", | ||
"front_end/panels/ai_chat/ui/AgentSessionHeaderComponent.js", | ||
"front_end/panels/ai_chat/ui/ToolDescriptionFormatter.js", | ||
"front_end/panels/ai_chat/ui/chatView.css.js", | ||
"front_end/panels/ai_chat/ui/HelpDialog.js", | ||
"front_end/panels/ai_chat/ui/PromptEditDialog.js", | ||
|
@@ -634,7 +639,9 @@ grd_files_bundled_sources = [ | |
"front_end/panels/ai_chat/LLM/GroqProvider.js", | ||
"front_end/panels/ai_chat/LLM/OpenRouterProvider.js", | ||
"front_end/panels/ai_chat/LLM/LLMClient.js", | ||
"front_end/panels/ai_chat/LLM/MessageSanitizer.js", | ||
"front_end/panels/ai_chat/tools/Tools.js", | ||
"front_end/panels/ai_chat/tools/SequentialThinkingTool.js", | ||
"front_end/panels/ai_chat/tools/CombinedExtractionTool.js", | ||
"front_end/panels/ai_chat/tools/CritiqueTool.js", | ||
"front_end/panels/ai_chat/tools/FetcherTool.js", | ||
|
@@ -647,12 +654,27 @@ grd_files_bundled_sources = [ | |
"front_end/panels/ai_chat/tools/VectorDBClient.js", | ||
"front_end/panels/ai_chat/tools/BookmarkStoreTool.js", | ||
"front_end/panels/ai_chat/tools/DocumentSearchTool.js", | ||
"front_end/panels/ai_chat/tools/SequentialThinkingTool.js", | ||
"front_end/panels/ai_chat/tools/ThinkingTool.js", | ||
"front_end/panels/ai_chat/common/utils.js", | ||
"front_end/panels/ai_chat/common/log.js", | ||
"front_end/panels/ai_chat/common/context.js", | ||
"front_end/panels/ai_chat/common/page.js", | ||
"front_end/panels/ai_chat/core/structured_response.js", | ||
"front_end/panels/ai_chat/models/ChatTypes.js", | ||
"front_end/panels/ai_chat/ui/input/ChatInput.js", | ||
"front_end/panels/ai_chat/ui/input/InputBar.js", | ||
"front_end/panels/ai_chat/ui/markdown/MarkdownRenderers.js", | ||
"front_end/panels/ai_chat/ui/message/MessageList.js", | ||
"front_end/panels/ai_chat/ui/message/ModelMessage.js", | ||
"front_end/panels/ai_chat/ui/message/MessageCombiner.js", | ||
"front_end/panels/ai_chat/ui/message/StructuredResponseRender.js", | ||
"front_end/panels/ai_chat/ui/message/StructuredResponseController.js", | ||
"front_end/panels/ai_chat/ui/message/GlobalActionsRow.js", | ||
"front_end/panels/ai_chat/ui/message/ToolResultMessage.js", | ||
"front_end/panels/ai_chat/ui/message/UserMessage.js", | ||
"front_end/panels/ai_chat/ui/model_selector/ModelSelector.js", | ||
"front_end/panels/ai_chat/ui/oauth/OAuthConnectPanel.js", | ||
"front_end/panels/ai_chat/ui/version/VersionBanner.js", | ||
"front_end/panels/ai_chat/common/WebSocketRPCClient.js", | ||
Comment on lines
+662
to
678
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainBulk add of AI Chat core/models/ui files — sanity-check presence and typos. Large manifest updates are brittle. Quick presence check avoids GRD churn. 🏁 Script executed: #!/bin/bash
paths=(
front_end/panels/ai_chat/core/structured_response.js
front_end/panels/ai_chat/models/ChatTypes.js
front_end/panels/ai_chat/ui/input/ChatInput.js
front_end/panels/ai_chat/ui/input/InputBar.js
front_end/panels/ai_chat/ui/markdown/MarkdownRenderers.js
front_end/panels/ai_chat/ui/message/MessageList.js
front_end/panels/ai_chat/ui/message/ModelMessage.js
front_end/panels/ai_chat/ui/message/MessageCombiner.js
front_end/panels/ai_chat/ui/message/StructuredResponseRender.js
front_end/panels/ai_chat/ui/message/StructuredResponseController.js
front_end/panels/ai_chat/ui/message/GlobalActionsRow.js
front_end/panels/ai_chat/ui/message/ToolResultMessage.js
front_end/panels/ai_chat/ui/message/UserMessage.js
front_end/panels/ai_chat/ui/model_selector/ModelSelector.js
front_end/panels/ai_chat/ui/oauth/OAuthConnectPanel.js
front_end/panels/ai_chat/ui/version/VersionBanner.js
)
missing=0; for p in "${paths[@]}"; do [[ -f "$p" ]] || { echo "MISSING: $p"; missing=1; }; done; exit $missing Length of output: 4714 Manifest references nonexistent AI Chat files 🤖 Prompt for AI Agents
|
||
"front_end/panels/ai_chat/common/EvaluationConfig.js", | ||
"front_end/panels/ai_chat/evaluation/remote/EvaluationProtocol.js", | ||
|
@@ -666,6 +688,7 @@ grd_files_bundled_sources = [ | |
"front_end/panels/ai_chat/ai_chat.js", | ||
"front_end/panels/ai_chat/ai_chat_impl.js", | ||
"front_end/panels/ai_chat/agent_framework/AgentRunner.js", | ||
"front_end/panels/ai_chat/agent_framework/AgentRunnerEventBus.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAgentRunnerEventBus added — good; verify usage and existence. This aligns with the agent runtime changes. Confirm the file exists and at least one import references it. 🏁 Script executed: #!/bin/bash
# File existence
test -f front_end/panels/ai_chat/agent_framework/AgentRunnerEventBus.js || echo "MISSING: AgentRunnerEventBus.js"
# Referenced by AgentRunner or others
rg -n 'AgentRunnerEventBus' front_end/panels/ai_chat Length of output: 1716 🏁 Script executed: #!/bin/bash
# Verify TypeScript source exists
test -f front_end/panels/ai_chat/agent_framework/AgentRunnerEventBus.ts || echo "MISSING: AgentRunnerEventBus.ts" Length of output: 73 Fix missing AgentRunnerEventBus.js in devtools_grd_files.gni config/gni/devtools_grd_files.gni lists 🤖 Prompt for AI Agents
|
||
"front_end/panels/ai_chat/agent_framework/AgentSessionTypes.js", | ||
"front_end/panels/ai_chat/agent_framework/ConfigurableAgentTool.js", | ||
"front_end/panels/ai_chat/agent_framework/implementation/ConfiguredAgents.js", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ group("front_end") { | |
"entrypoints/shell", | ||
"entrypoints/wasmparser_worker:worker_entrypoint", | ||
"entrypoints/worker_app:entrypoint", | ||
"panels/ai_chat:ai_chat_release_js_metadata", | ||
"panels/ai_chat:ai_chat_release_css_metadata", | ||
Comment on lines
+32
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAdditions look correct; verify targets exist across build configs. The new ai_chat release metadata deps make sense for flowing GRD metadata. Please confirm these GN targets are defined (and not gated behind a condition that would make them unavailable in some configs), otherwise the root group will fail to resolve. Run to confirm target definitions and single inclusion: 🏁 Script executed: #!/bin/bash
# 1) Targets exist somewhere under front_end/**/BUILD.gn
rg -n 'ai_chat_release_(js|css)_metadata' front_end/**/BUILD.gn -C2
# 2) Only referenced once in front_end/BUILD.gn
rg -n 'panels/ai_chat:ai_chat_release_(js|css)_metadata' front_end/BUILD.gn Length of output: 352 Define missing GN targets or remove dependencies 🤖 Prompt for AI Agents
|
||
"third_party/vscode.web-custom-data:web_custom_data", | ||
] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright 2025 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* Utility to manage scroll pin-to-bottom behavior for a scrollable container. | ||
*/ | ||
export class ScrollPinHelper { | ||
#el: HTMLElement | null = null; | ||
#scrollTop?: number; | ||
#pinToBottom = true; | ||
#isProgrammatic = false; | ||
static readonly ROUNDING_OFFSET = 1; | ||
|
||
setElement(el: HTMLElement | undefined): void { | ||
if (el) { | ||
this.#el = el; | ||
} else { | ||
this.#el = null; | ||
this.#pinToBottom = true; | ||
} | ||
} | ||
|
||
handleResize(): void { | ||
if (!this.#el) return; | ||
if (this.#pinToBottom) { | ||
this.setScrollTop(this.#el.scrollHeight); | ||
} | ||
} | ||
|
||
handleScroll(target: HTMLElement): void { | ||
if (this.#isProgrammatic) { | ||
this.#isProgrammatic = false; | ||
return; | ||
} | ||
this.#scrollTop = target.scrollTop; | ||
this.#pinToBottom = target.scrollTop + target.clientHeight + ScrollPinHelper.ROUNDING_OFFSET > target.scrollHeight; | ||
} | ||
|
||
setScrollTop(value: number): void { | ||
if (!this.#el) return; | ||
this.#scrollTop = value; | ||
this.#isProgrammatic = true; | ||
this.#el.scrollTop = value; | ||
} | ||
|
||
scrollToBottom(): void { | ||
if (!this.#el) return; | ||
this.setScrollTop(this.#el.scrollHeight); | ||
} | ||
|
||
restoreLastPosition(): void { | ||
if (this.#scrollTop === undefined) { | ||
return; | ||
} | ||
this.setScrollTop(this.#scrollTop); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
New AI Chat UI files added to GRD manifest — ensure files exist.
Good additions. Please verify the files exist at these paths (case and subdir correctness), otherwise grd gen will break.
🏁 Script executed:
Length of output: 1412
Correct missing AI Chat UI component entries in
config/gni/devtools_grd_files.gni
.The manifest lists these files, but none exist at the given paths—update to the actual filenames (e.g.
.tsx
extensions) or remove the invalid entries:🤖 Prompt for AI Agents