Skip to content

Commit eff0629

Browse files
DMP '25 Week04 Update by Harshit Verma (#254)
* DMP '25 Week04 Update by Harshit Verma * upadate blog week * update slug and add space before 'Watch' * Fix grammar and terminology - Corrected plural form from "childrens" to "children". - Spelled out "VTE" as "Virtual Terminal Emulator". - Capitalization of "LLM".
1 parent 1c53dcf commit eff0629

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed
164 KB
Loading
298 KB
Loading
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: "DMP ’25 Week 04 Update by Harshit Verma"
3+
excerpt: "Developed a working prototype."
4+
category: "DEVELOPER NEWS"
5+
date: "2025-06-29"
6+
slug: "2025-06-29-dmp-25-therealharshit-week04"
7+
author: "@/constants/MarkdownFiles/authors/harshit-verma.md"
8+
tags: "dmp25,sugarlabs,week04,therealharshit"
9+
image: "assets/Images/c4gt_DMP.png"
10+
---
11+
12+
<!-- markdownlint-disable -->
13+
14+
# Week 04 Progress Report by Harshit Verma
15+
16+
**Project:** [LLM-powered Debugger for Pippy](https://github.com/sugarlabs/Pippy/issues/95)
17+
**Mentors:** [Walter Bender](https://github.com/walterbender), [Ibiam Chihurumnaya](https://github.com/chimosky), [Kshitij Shah](https://github.com/kshitijdshah99)
18+
**Assisting Mentors:** [Devin Ulibarri](https://github.com/pikurasa)
19+
**Reporting Period:** 2025-06-23 - 2025-06-29
20+
21+
---
22+
23+
## Goals for This Week
24+
25+
- **Goal 1:** Design a UI mockup for the debugging terminal.
26+
- **Goal 2:** Develop the debugging terminal in Pippy.
27+
- **Goal 3:** Connected the debugger LLM server with Pippy.
28+
- **Goal 4:** Feed LLM responses into the debugging terminal.
29+
30+
---
31+
32+
## This Week’s Achievements
33+
34+
1. **Design a UI mockup for the debugging terminal**
35+
- Plan the layout and user experience for how debug tips should appear inside Pippy.
36+
- Design the UI of the debugging terminal, prioritized clarity and accessibility, especially for children.
37+
38+
2. **Develop the debugging terminal in Pippy**
39+
- Added a new Virtual Terminal Emulator (VTE) widget to Pippy using GTK.
40+
- Integrated the terminal into the existing layout with proper toggling between output and debug views.
41+
![Pippy UI: Output Terminal](assets/Images/pippy_output-terminal.png)
42+
![Pippy UI: Debug Terminal](assets/Images/pippy_debug-terminal.png)
43+
44+
3. **Connected the debugger LLM server with Pippy**
45+
- Wired up Pippy to make API calls to the FastAPI server.
46+
- Verified complete flow: `code is extracted → sent to /debug → response displayed in the debug terminal`.
47+
48+
4. **Feed LLM responses into the debugging terminal**
49+
- Successfully passed LLM-generated debug suggestions into the terminal.
50+
- Added simple formatting: newline, spacing, removed markdown syntax elements.
51+
---
52+
53+
### Complete Demo: &nbsp; [Watch here](https://drive.google.com/file/d/1Dzomam9dc3U4tHjHhYFGjRbs7-cwJHmM/view?usp=drive_link)
54+
55+
---
56+
57+
## Challenges & How I Overcame Them
58+
59+
- **Challenge:** GTK app crashing on API call.
60+
**Solution:** The crash was due to API response handling on the main GTK thread. I fixed it by offloading the network request to a separate thread using Python’s `threading` module and updating the UI safely with `GLib.idle_add()` to avoid blocking or GTK context violations.
61+
62+
- **Challenge:** Rendering formatted output inside the terminal widget.
63+
**Solution:** GTK doesn’t support Markdown, so I simulated structure using spacing, and removed marksown syntax elements to enhance readability.
64+
65+
---
66+
67+
## Key Learnings
68+
69+
- Gained hands-on experience with Python threading to perform non-blocking API calls and prevent UI freezes or crashes.
70+
- Learned how to work with GTK widgets and using CSS in GTK, especially Gtk.Stack, Gtk.Box, and VTE terminal building responsive interfaces.
71+
72+
---
73+
74+
## Next Week’s Roadmap
75+
76+
- Format the LLM response to be more child friendly.
77+
- Develop a custom mardown parser for GTK.
78+
- Begin working on model selection logic and performance optimization.
79+
80+
---
81+
82+
## Resources & References
83+
84+
**Repository**
85+
- [Pippy](https://github.com/therealharshit/Pippy/tree/DMP2025/Pippy-Debugger) : I have pushed my code for Pippy here.
86+
- [pippy-debugger-server](https://github.com/therealharshit/pippy-debugger-server) : The FastAPI server which I am using as of now.
87+
88+
---
89+
90+
## Acknowledgments
91+
92+
Thank you to my mentors, the Sugar Labs community, and fellow contributors for your continued guidance and support!
93+
94+
---

0 commit comments

Comments
 (0)