🖨️ A more flexible API to specify output target
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ocaml
- Domain
- api
Research direction
Start with src/tty/Tty.ml around the display function referenced in the issue, then read the linked Asai/Tty display API and Nottui's Ui_loop.run entry point. Determine how a caller could provide its own formatter without manually wiring an out_channel, and document the intended API and its behavior for displaying diagnostics in a Nottui application.
Written by the indexing model from the issue text.
Description
I am experimenting with Nottui and would like to display diagnostics in my application. I am aware that terminal rendering used to be handled with notty.
From looking at the code in Tty, maybe this can be achieved by just exposing function that is a bit more flexible than display?
I'd just like to pass my own formatter here:
https://github.com/RedPRL/asai/blob/563566f2696ce258784215ba35bdd4ff89341410/src/tty/Tty.ml#L207
What I tried so far:
My best guess is to write a function display : Message.t Diagnostic.t -> ui, where ui is a wrapper around the image type of Notty. I could use the optional output argument of display, but it is not obvious to me how to hook the out_channel into my application. The toplevel of the UI is started by Ui_loop.run... which takes a Notty_unix.Term.t... into which I can pass an out_channel... This seems messy.
- Dominant language
- OCaml
- Stars
- 55
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RedPRL/asai
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Configurable unicode Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·