startup

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPromptFile added in v0.7.6

func LoadPromptFile(path string) (string, error)

LoadPromptFile 读取文件作为初始创作要求。

func PrepareQuick

func PrepareQuick(rawPrompt string) (string, error)

PrepareQuick 整理快速启动提示词。

Types

type CoCreateSession

type CoCreateSession struct {
	// contains filtered or unexported fields
}

CoCreateSession 承载共创模式的非 UI 状态。

func NewCoCreateSession

func NewCoCreateSession(initial string) *CoCreateSession

func (*CoCreateSession) AppendUser

func (s *CoCreateSession) AppendUser(text string)

func (*CoCreateSession) ApplyDelta

func (s *CoCreateSession) ApplyDelta(kind, text string)

ApplyDelta 接收流式累积;kind="thinking" 写入推理流,"reply" 写入回复预览。 两路分别累积,UI 可分块染色显示,让用户在 thinking 阶段也看到 LLM 在工作。

func (*CoCreateSession) ApplyReply

func (s *CoCreateSession) ApplyReply(reply host.CoCreateReply)

func (*CoCreateSession) BuildPrompt added in v0.7.6

func (s *CoCreateSession) BuildPrompt() (string, error)

func (*CoCreateSession) CanStart

func (s *CoCreateSession) CanStart() bool

func (*CoCreateSession) DraftPrompt

func (s *CoCreateSession) DraftPrompt() string

func (*CoCreateSession) History

func (s *CoCreateSession) History() []host.CoCreateMessage

func (*CoCreateSession) InitialInput

func (s *CoCreateSession) InitialInput() string

func (*CoCreateSession) Ready

func (s *CoCreateSession) Ready() bool

func (*CoCreateSession) StreamReply

func (s *CoCreateSession) StreamReply() string

func (*CoCreateSession) StreamThinking added in v0.3.1

func (s *CoCreateSession) StreamThinking() string

func (*CoCreateSession) Suggestions added in v0.3.1

func (s *CoCreateSession) Suggestions() []string

Jump to

Keyboard shortcuts

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