-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add ability to ask LLM questions about a report #75
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
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,10 +70,7 @@ <h3 class="chart-title"> | |
<span>Build</span> | ||
</h3> | ||
<div class="summary-card-item"> | ||
<stacked-bar-chart | ||
[data]="buildsAsGraphData(overview.stats.builds)" | ||
[compact]="true" | ||
/> | ||
<stacked-bar-chart [data]="buildsAsGraphData(overview.stats.builds)" [compact]="true" /> | ||
</div> | ||
</div> | ||
@if (overview.stats.runtime) { | ||
|
@@ -176,13 +173,15 @@ <h4>Repair System Prompt</h4> | |
</expansion-panel> | ||
|
||
@if (report.details.summary.aiSummary !== undefined) { | ||
<expansion-panel size="large" class="root-section"> | ||
<expansion-panel-header> | ||
<img src="gemini.webp" alt="Gemini Logo" height="30" width="30" /> | ||
AI Summary | ||
</expansion-panel-header> | ||
<div [innerHTML]="report.details.summary.aiSummary"></div> | ||
</expansion-panel> | ||
<button class="fab" (click)="isAiAssistantVisible.set(true)"> | ||
<span class="material-symbols-outlined">smart_toy</span> | ||
</button> | ||
|
||
<app-ai-assistant | ||
[class.hidden]="!isAiAssistantVisible()" | ||
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. Also a quick question: this assistant uses Gemini models atm, I'm wondering if we should have a check whether Gemini key is provided on the server and don't bring up the UI if not? For ex. via an API call like |
||
[reportGroupId]="reportGroupId()" | ||
(close)="isAiAssistantVisible.set(false)" | ||
/> | ||
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. This is the new code. The rest is apparently prettier formatting |
||
} | ||
|
||
@if (missingDeps().length > 0) { | ||
|
@@ -232,9 +231,7 @@ <h4>Logs</h4> | |
<h2>Generated applications</h2> | ||
@if (allFailedChecks().length > 0) { | ||
<details class="filter-dropdown" #dropdown> | ||
<summary> | ||
Filter by failed checks ({{ selectedChecks().size }} selected) | ||
</summary> | ||
<summary>Filter by failed checks ({{ selectedChecks().size }} selected)</summary> | ||
<div class="dropdown-content"> | ||
<failed-checks-filter | ||
[allFailedChecks]="allFailedChecks()" | ||
|
@@ -300,9 +297,7 @@ <h5> | |
@if (isSkippedAssessment(check)) { | ||
<span class="status">➖</span> | ||
<span class="name">{{ check.name }}</span> | ||
<span class="status-text points" | ||
>Skipped: {{ check.message }}</span | ||
> | ||
<span class="status-text points">Skipped: {{ check.message }}</span> | ||
} @else { | ||
@let isMax = check.successPercentage === 1; | ||
<span | ||
|
@@ -340,9 +335,11 @@ <h5> | |
[class.warn]="totalPercent < 90 && totalPercent >= 80" | ||
[class.error]="totalPercent < 80" | ||
> | ||
{{ result.score.totalPoints }} / | ||
{{ result.score.maxOverallPoints }} points ({{ | ||
{{ result.score.totalPoints }} / {{ result.score.maxOverallPoints }} points ({{ | ||
totalPercent | ||
|
||
|
||
|
||
}}%) | ||
</span> | ||
</div> | ||
|
@@ -352,10 +349,8 @@ <h5> | |
<h4>Additional info</h4> | ||
@for (attempt of result.attemptDetails; track attempt) { | ||
@let isBuilt = attempt.buildResult.status === 'success'; | ||
@let axeViolations = | ||
attempt.serveTestingResult?.axeViolations; | ||
@let hasAxeViolations = | ||
axeViolations && axeViolations.length > 0; | ||
@let axeViolations = attempt.serveTestingResult?.axeViolations; | ||
@let hasAxeViolations = axeViolations && axeViolations.length > 0; | ||
|
||
<expansion-panel #expansionPanel> | ||
<expansion-panel-header> | ||
|
@@ -385,9 +380,7 @@ <h4>Additional info</h4> | |
@if (expansionPanel.opened()) { | ||
@if (attempt.reasoning) { | ||
<details class="thoughts-button"> | ||
<summary class="neutral-button"> | ||
See LLM Thoughts | ||
</summary> | ||
<summary class="neutral-button">See LLM Thoughts</summary> | ||
<pre class="callout neutral code">{{ | ||
attempt.reasoning | ||
}}</pre> | ||
|
@@ -430,25 +423,16 @@ <h4>Generated Code</h4> | |
Format source code | ||
</button> | ||
</div> | ||
<app-code-viewer | ||
[code]="formatted().get(file) ?? file.code" | ||
/> | ||
<app-code-viewer [code]="formatted().get(file) ?? file.code" /> | ||
} | ||
} | ||
</expansion-panel> | ||
} | ||
|
||
@if ( | ||
result.userJourneys && result.userJourneys.result.length > 0 | ||
) { | ||
@if (result.userJourneys && result.userJourneys.result.length > 0) { | ||
<expansion-panel> | ||
<expansion-panel-header | ||
>User Journeys</expansion-panel-header | ||
> | ||
@for ( | ||
journey of result.userJourneys.result; | ||
track journey.name | ||
) { | ||
<expansion-panel-header>User Journeys</expansion-panel-header> | ||
@for (journey of result.userJourneys.result; track journey.name) { | ||
<h4>{{ journey.name }}</h4> | ||
|
||
<ol> | ||
|
@@ -467,7 +451,8 @@ <h4>Debugging Tools</h4> | |
<button | ||
class="neutral-button" | ||
title="Download a ZIP for debugging. You can upload the ZIP to AI Studio for further analysis of a specific app." | ||
(click)="downloadDebuggingZip(result)"> | ||
(click)="downloadDebuggingZip(result)" | ||
> | ||
Download ZIP for debugging | ||
</button> | ||
|
||
|
@@ -487,8 +472,7 @@ <h4>Debugging Tools</h4> | |
<details class="details mcp-log-entry"> | ||
@let name = log.request.name; | ||
<summary> | ||
Log Entry #{{ $index + 1 | ||
}}{{ name ? ' - ' + name : '' }} | ||
Log Entry #{{ $index + 1}}{{ name ? ' - ' + name : '' }} | ||
</summary> | ||
<div class="mcp-log-content"> | ||
<h5>Request</h5> | ||
|
@@ -512,8 +496,7 @@ <h5>Response</h5> | |
} | ||
</div> | ||
|
||
@let finalRuntimeErrors = | ||
finalAttempt.serveTestingResult?.runtimeErrors; | ||
@let finalRuntimeErrors = finalAttempt.serveTestingResult?.runtimeErrors; | ||
@if (finalRuntimeErrors) { | ||
<div class="app-details-section"> | ||
<h4>Runtime errors</h4> | ||
|
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.
We can use
@defer
here :) The amount of code is quite small atm, so it's not super important, but having a@defer
would allow us to have more code without affecting IPL time.