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
Click to show internal directories.
Click to hide internal directories.