chat

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMarkdown

func FormatMarkdown(text string) string

func FormatMarkdownImage

func FormatMarkdownImage(text string) string

func FormatText

func FormatText(text string) string

func ImageToAscii

func ImageToAscii(url string) (string, error)

Fonction pour convertir une image en ASCII art

Types

type ChatModel

type ChatModel struct {
	Messages          []Message
	Err               error
	Workspace         string
	ResType           string
	ResName           string
	Loading           bool
	Debug             bool
	Local             bool
	Headers           []string
	SendMessage       func(ctx context.Context, workspace string, resType string, resName string, message string, debug bool, local bool, headers []string) (string, error)
	SendMessageStream func(ctx context.Context, workspace string, resType string, resName string, message string, debug bool, local bool, headers []string, onChunk func(string)) error
	// contains filtered or unexported fields
}

func (*ChatModel) Init

func (m *ChatModel) Init() tea.Cmd

func (*ChatModel) Update

func (m *ChatModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ChatModel) View

func (m *ChatModel) View() string

type Message

type Message struct {
	Content   string
	Timestamp *time.Time
	IsUser    bool
}

Add new Message type

Jump to

Keyboard shortcuts

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