bashtools

package
v1.4.4-alpha1010 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBashTools

func CreateBashTools(bashSessionContext *BashSessionContext) ([]*aitool.Tool, error)

CreateBashTools 创建bash相关的AI工具集合

Types

type BashSession

type BashSession struct {
	Name        string
	ShellType   string
	Cmd         *exec.Cmd
	Pty         *os.File       // PTY主端(仅在非Windows系统使用)
	WinPty      *winpty.WinPTY // Windows系统使用的winpty对象
	Stdin       io.WriteCloser // 标准输入(备用)
	Stdout      *bytes.Buffer
	Cancel      context.CancelFunc
	IsRunning   bool
	LastActive  time.Time
	LastCommand string // 记录最后发送的命令,用于过滤回显
	UsePty      bool   // 是否使用PTY模式
	// contains filtered or unexported fields
}

BashSession 表示一个bash会话

type BashSessionContext

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

func NewBashSessionContext

func NewBashSessionContext(ctx context.Context) *BashSessionContext

Jump to

Keyboard shortcuts

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