gui/pkg/display
Snider 7976b579a4 feat(gui): pkg/chat + gui.chat.* IPC actions (MVP chat surface)
pkg/chat/service.go + messages.go implement the RFC §15.1–§15.8
chat service with the full IPC surface:
- gui.chat.send — streams assistant reply, returns message id
- gui.chat.history — []Message for a conversation
- gui.chat.models — []Model (name, size, status)
- gui.chat.selectModel — sets active model
- gui.chat.conversations.list/load/delete
- gui.chat.thinking.start/stop — explicit thinking-state tracking

MCP tool registrations in pkg/mcp/tools_chat.go mirror the IPC
surface (chat_send, chat_history, chat_models, etc). WS bridge in
pkg/display/display.go wires chat:conversations:load and
chat🤔stop, keeping legacy chat:conversations:get and
chat🤔end paths pointed at the new handlers for compat.

Good/Bad/Ugly tests per action in service_test.go + godoc example
in service_example_test.go. go vet + go test ./pkg/chat/... +
./pkg/... all clean.

Closes tasks.lthn.sh/view.php?id=14

Co-authored-by: Codex <noreply@openai.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-24 07:26:22 +01:00
..
.github/workflows feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
assets feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
docs feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
.gitignore feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
api.go Harden display API return semantics 2026-04-17 19:21:53 +01:00
api_test.go Add display API coverage 2026-04-17 19:42:52 +01:00
api_wrappers_test.go Add display wrapper coverage 2026-04-17 19:47:15 +01:00
background.go Implement display route hardening 2026-04-15 18:46:14 +01:00
background_test.go test: add missing GUI coverage 2026-04-15 20:59:45 +01:00
display.go feat(gui): pkg/chat + gui.chat.* IPC actions (MVP chat surface) 2026-04-24 07:26:22 +01:00
display_contextmenu_test.go Harden context menu websocket payloads 2026-04-17 18:25:49 +01:00
display_layout_wrappers_test.go Add display wrapper coverage 2026-04-17 19:47:15 +01:00
display_test.go feat(gui): webview devtools open/close MCP tools 2026-04-24 06:17:34 +01:00
events.go fix(display): race-safe WSEventManager.broadcaster eventBuffer read 2026-04-24 06:02:26 +01:00
events_test.go Harden websocket nil handling 2026-04-18 08:36:49 +01:00
FEATURES.md Implement dialog prompt flow 2026-04-15 14:26:13 +01:00
hlcrf.go Harden manifest path resolution 2026-04-17 20:42:37 +01:00
hlcrf_test.go Harden GUI storage and manifest paths 2026-04-15 20:43:48 +01:00
interfaces.go feat(gui): core:// scheme handler + 7 route dispatches 2026-04-24 06:17:33 +01:00
interfaces_test.go Add missing GUI unit coverage 2026-04-15 23:17:52 +01:00
LICENSE feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
manifest.go Harden manifest path resolution 2026-04-17 20:42:37 +01:00
manifest_test.go Harden manifest path resolution 2026-04-17 20:42:37 +01:00
marketplace.go Add marketplace display and MCP actions 2026-04-15 20:53:13 +01:00
marketplace_test.go Harden marketplace install inputs 2026-04-15 23:07:20 +01:00
messages.go Wire GUI app mode into display state 2026-04-15 21:40:09 +01:00
ml.go Harden display routing and window aliases 2026-04-15 23:03:11 +01:00
ml_test.go Add missing GUI unit tests 2026-04-15 17:27:40 +01:00
mocks_test.go refactor(display): remove extracted clipboard/dialog/notification/theme/screen code 2026-03-13 14:24:06 +00:00
network.go Add p2p peers to core network route 2026-04-15 19:16:45 +01:00
network_test.go test: cover gui manifest and marketplace hardening 2026-04-15 20:48:09 +01:00
p2p.go Harden p2p bridge cleanup 2026-04-17 20:12:18 +01:00
p2p_test.go fix(display): initialize p2p bridge after events 2026-04-17 20:27:05 +01:00
preload.go Harden preload origin trust 2026-04-17 20:50:24 +01:00
preload_test.go Harden preload origin trust 2026-04-17 20:50:24 +01:00
README.md feat: initial Wails v3 desktop framework 2026-01-30 08:44:23 +00:00
scheme.go Harden scheme request body parsing 2026-04-17 18:12:15 +01:00
scheme_handler.go feat(gui): core:// scheme handler + 7 route dispatches 2026-04-24 06:17:33 +01:00
scheme_handler_example_test.go feat(gui): core:// scheme handler + 7 route dispatches 2026-04-24 06:17:33 +01:00
scheme_handler_test.go feat(gui): core:// scheme handler + 7 route dispatches 2026-04-24 06:17:33 +01:00
scheme_test.go Harden scheme request body parsing 2026-04-17 18:12:15 +01:00
sidecar.go Harden sidecar auto-start fallback 2026-04-17 20:33:56 +01:00
sidecar_test.go Harden sidecar startup failure handling 2026-04-17 20:07:19 +01:00
storage.go Fix display storage error wrappers 2026-04-17 19:31:10 +01:00
storage_test.go fix(display): harden storage and websocket shutdown 2026-04-17 17:33:15 +01:00

Display

This repository is a display module for the core web3 framework. It includes a Go backend, an Angular custom element, and a full release cycle configuration.

Getting Started

  1. Clone the repository:

    git clone https://github.com/Snider/display.git
    
  2. Install the dependencies:

    cd display
    go mod tidy
    cd ui
    npm install
    
  3. Run the development server:

    go run ./cmd/demo-cli serve
    

    This will start the Go backend and serve the Angular custom element.

Building the Custom Element

To build the Angular custom element, run the following command:

cd ui
npm run build

This will create a single JavaScript file in the dist directory that you can use in any HTML page.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the EUPL-1.2 License - see the LICENSE file for details.