Skip to content

Commit ca5fb16

Browse files
authored
fix(frontend/library): Improve agent I/O rendering (#9656)
- Related to #8784 ### Changes 🏗️ - feat(frontend/library): Improve agent output styling & fix content overflow issue - fix(frontend/library): Fix overlap between content and inset button of expandable input fields (#9650) - fix(backend): Unbreak loading graph executions with missing inputs ![screenshot of restyled Output section](https://github.com/user-attachments/assets/97836158-5735-4d01-94dd-16e3fb6999c6) ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - Run an agent with at least one input *not* filled out; view this run in the Library - [x] -> page should load normally - [x] -> agent inputs should load and show normally - Run an agent that generates long output; view this run in the Library - [x] -> output should not overflow its container or stretch the page layout - [x] -> visually check that the output section looks slick
1 parent 6d36be6 commit ca5fb16

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

autogpt_platform/backend/backend/data/graph.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def from_db(_graph_exec: AgentGraphExecution):
223223
inputs = {
224224
**{
225225
# inputs from Agent Input Blocks
226-
exec.input_data["name"]: exec.input_data["value"]
226+
exec.input_data["name"]: exec.input_data.get("value")
227227
for exec in node_executions
228228
if exec.block_id == _INPUT_BLOCK_ID
229229
},
@@ -364,7 +364,6 @@ def _reassign_ids(
364364
user_id: str,
365365
graph_id_map: dict[str, str],
366366
):
367-
368367
# Reassign Graph ID
369368
if graph.id in graph_id_map:
370369
graph.id = graph_id_map[graph.id]

autogpt_platform/frontend/src/components/agents/agent-run-details-view.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ export default function AgentRunDetailsView({
185185
{title || key}
186186
</label>
187187
{values.map((value, i) => (
188-
<pre key={i}>{value}</pre>
188+
<p className="text-sm text-neutral-700" key={i}>
189+
{value}
190+
</p>
189191
))}
190192
{/* TODO: pretty type-dependent rendering */}
191193
</div>

autogpt_platform/frontend/src/components/agents/agent-run-draft-view.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default function AgentRunDraftView({
9898
"default" in inputSubSchema ? inputSubSchema.default : ""
9999
}
100100
value={inputValues[key] ?? undefined}
101-
className="rounded-full"
101+
className="rounded-full pr-8"
102102
onChange={(e) =>
103103
setInputValues((obj) => ({
104104
...obj,

0 commit comments

Comments
 (0)