module documentation
Picoware Agent - LLM-powered assistant with chat GUI.
| Function | run |
Main frame handler, delegates to current state. |
| Function | start |
Build main menu. Return True on success. |
| Function | stop |
Tear down widgets and agent, reset state. |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Constant | STATE |
Undocumented |
| Function | _back |
Clean up the Choice sub-view and return to the settings menu. |
| Function | _chat |
Return layout metrics derived from screen size and default font. |
| Function | _draw |
Draw a rounded-rect bubble clipped to screen bounds. |
| Function | _get |
Return a list of models for the specified LLM provider. |
| Function | _get |
Return a list of available LLM providers. |
| Function | _open |
Open a Choice sub-view for selecting the LLM model. |
| Function | _open |
Open a Choice sub-view for selecting the LLM provider. |
| Function | _render |
Draw conversation as chat bubbles with scroll and prompt bar. |
| Function | _save |
Persist the current agent settings to storage. |
| Function | _set |
Load or create the agent settings. |
| Function | _show |
Clear screen and display a centred thinking indicator. |
| Function | _start |
Show the agent settings menu. |
| Function | _wrap |
Wrap text to max_chars per line, preserving words. |
| Variable | _agent |
Undocumented |
| Variable | _agent |
Undocumented |
| Variable | _choice |
Undocumented |
| Variable | _conversation |
Undocumented |
| Variable | _max |
Undocumented |
| Variable | _menu |
Undocumented |
| Variable | _mode |
Undocumented |
| Variable | _scroll |
Undocumented |
| Variable | _settings |
Undocumented |
| Variable | _settings |
Undocumented |
Main frame handler, delegates to current state.
| Parameters | |
viewViewManager | The view manager context. |
Build main menu. Return True on success.
| Parameters | |
viewViewManager | The view manager context. |
| Returns | |
bool | True on success. |
Tear down widgets and agent, reset state.
| Parameters | |
viewViewManager | The view manager context. |
Clean up the Choice sub-view and return to the settings menu.
| Parameters | |
viewViewManager | The view manager context. |
Return layout metrics derived from screen size and default font.
| Parameters | |
viewViewManager | The view manager context. |
| Returns | |
tuple | Header/prompt/chat geometry and font metrics. |
@micropython.native
def _draw_bubble(draw, x, y, w, text_lines, font, bg_color, text_color, pad, clip_top=0):
¶
Draw a rounded-rect bubble clipped to screen bounds.
| Parameters | |
draw:Draw | The drawing context. |
x:int | Left position of the bubble. |
y:int | Top position of the bubble. |
w:int | Width of the bubble. |
textlist | Lines of text to draw. |
font:Font | The font to use. |
bgint | Bubble background color. |
textint | Text color. |
pad:int | Inner padding in pixels. |
clipint | Y position to clip lines above. Defaults to 0. |
| Returns | |
int | The next Y position after the bubble. |
Return a list of models for the specified LLM provider.
| Parameters | |
viewViewManager | The view manager context. |
llmint | The provider ID. |
| Returns | |
list | Available model names. |
Open a Choice sub-view for selecting the LLM model.
| Parameters | |
viewViewManager | The view manager context. |
Open a Choice sub-view for selecting the LLM provider.
| Parameters | |
viewViewManager | The view manager context. |
Draw conversation as chat bubbles with scroll and prompt bar.
| Parameters | |
viewViewManager | The view manager context. |
Persist the current agent settings to storage.
| Parameters | |
viewViewManager | The view manager context. |
| Returns | |
bool | True on success. |
Clear screen and display a centred thinking indicator.
| Parameters | |
viewViewManager | The view manager context. |
Wrap text to max_chars per line, preserving words.
| Parameters | |
text:str | The text to wrap. |
maxint | Maximum characters per line. |
| Returns | |
list | Wrapped lines of text. |