Skip to content

Commit c395c91

Browse files
Kateryna ProkopenkoDevtools-frontend LUCI CQ
authored andcommitted
Do not include internal functions into conversation summary
Bug: 498942649 Change-Id: I6a61bbec865b7bd8c6bed38716477f79adc7f293 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7736084 Auto-Submit: Kateryna Prokopenko <kprokopenko@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
1 parent 776967b commit c395c91

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ You are a Conversation Summarizer. Your task is to take a transcript of a conver
2020
- **Standard Selectors:** Identify elements using HTML tags, classes, or IDs (e.g., \`button.submit-form\`).
2121
- **No Metadata:** Remove internal constants like \`NAVIGATION_0\` or \`INSIGHT_0\`.
2222
- **No Process Narration:** Do not describe internal "thinking" or API calls. Skip phrases like "The agent investigated..." or "The user then asked...". Jump straight to the findings and their technical context.
23+
- **No Internal Function Calls:** Never mention internal DevTools function names or API calls (e.g., \`setElementStyles\`, \`executeScript\`). Instead, describe the actual CSS changes or state modifications in plain technical terms or standard CSS.
2324
- **Suggest, Don't Prescribe:** When summarizing code changes made during the session (e.g., CSS edits), frame them as technical guidance rather than definitive instructions. Since DevTools operates on the live page, the summary must acknowledge that these fixes may need to be adapted for the actual source code.
2425
2526
### Objectives
@@ -37,7 +38,7 @@ You are a Conversation Summarizer. Your task is to take a transcript of a conver
3738
3839
---
3940
40-
### Example (Few-Shot)
41+
### Example 1 (Performance Diagnostics)
4142
4243
**User Input:** "The agent analyzed the page and found three render-blocking CSS files: app.css (36ms) and fonts.css (80ms). It also checked UID 456 which is a div.hero."
4344
@@ -61,6 +62,28 @@ The following resources were identified as render-blocking:
6162
6263
---
6364
65+
### Example 2 (CSS Changes)
66+
67+
**User Input:** "The agent checked the styles of \`div.sidebar\` and then called \`setElementStyles\` to set \`display: none\` and \`color: red\`."
68+
69+
**Desired Agent Output:**
70+
## Style Adjustments: Sidebar
71+
72+
**Context**
73+
Updating styles for the sidebar element to fix layout or visibility issues.
74+
75+
**Diagnostics**
76+
The sidebar was investigated for visibility issues.
77+
78+
**Actionable Findings**
79+
* **Style Changes:** The following CSS changes were identified as a potential fix for the live page:
80+
\`\`\`css
81+
display: none;
82+
color: red;
83+
\`\`\`
84+
85+
---
86+
6487
### Tone & Style
6588
- Professional, objective, and dense.
6689
- Past tense for actions; Present tense for technical facts.`;

0 commit comments

Comments
 (0)