params

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package params carries nekit chat settings through the widget's components. Hosts use it only through nekit.ChatFeature.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature uint8

Feature is a part of the chat UI that can be hidden; hosts use the constants nekit re-exports, such as nekit.ChatTokens, in Chat.Disable.

const (
	Tokens Feature = iota + 1
	Thinking
	Tools
	Tasks
	Edit
	Retry
	Attachments
	Files
	Sidebar
	ThreadEdit
	MessageSearch
	Greeting
	Dock
)

The features the nekit chat can hide; each is documented on its nekit constant.

type Params

type Params struct {
	MaxAttachmentSize int
	MaxAttachments    int
	AttachmentTimeout time.Duration
	AsideRight        bool
	Framed            bool
	ThemeDark         css.Theme
	ThemeLight        css.Theme
	Layout            css.Layout
	GreetingTitle     any
	GreetingBody      any
	ID                string
	// contains filtered or unexported fields
}

Params are the widget settings shared by the nekit chat components. The exported fields mirror the Chat fields of the same name; ID is a random per-widget id set by InitDefault.

func (*Params) Disable

func (p *Params) Disable(features []Feature)

Disable hides features.

func (*Params) InitDefault

func (p *Params) InitDefault()

InitDefault fills zero attachment limits and nil greeting parts with their defaults and assigns a fresh ID.

func (Params) Off

func (p Params) Off(f Feature) bool

Off reports whether f is hidden.

Jump to

Keyboard shortcuts

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