console

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Example demonstrating the module-level console API and how background tasks can access the shared TUI.

Index

Constants

View Source
const LibraryName = "scriptling.console"

Variables

This section is empty.

Functions

func ExampleBackgroundTask added in v0.5.0

func ExampleBackgroundTask()

ExampleBackgroundTask demonstrates how a background goroutine can access the shared console TUI and write to panels.

func ExampleModuleLevelAPI added in v0.5.0

func ExampleModuleLevelAPI()

ExampleModuleLevelAPI demonstrates the new module-level console API.

func NewLibrary

func NewLibrary() *object.Library

NewLibrary creates the scriptling.console library.

func Register

func Register(registrar interface{ RegisterLibrary(*object.Library) })

Register registers the console library with a scriptling instance.

func ResetConsole added in v0.5.0

func ResetConsole()

ResetConsole resets the singleton for testing.

func SetSubmit added in v0.3.0

func SetSubmit(fn func(ctx context.Context, text string))

SetSubmit wires an external submit handler into the singleton console.

func TUI added in v0.5.0

func TUI() *tui.TUI

TUI returns the shared singleton TUI instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL