runner

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Unix 下使用 syscall.Exec 替换当前进程,实现“当前终端接管”的体验。

Package runner 负责在选中目录内接管执行 codex/claude,并提供可测试的命令构建逻辑。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandForMode

func CommandForMode(mode Mode) (string, []string, error)

CommandForMode 保留向后兼容。

func Run

func Run(mode Mode, workDir string) error

Run 保留向后兼容,内部转调 RunCommand。

func RunCommand

func RunCommand(cmdName string, cmdArgs []string, workDir string) error

RunCommand 是新的主入口:直接接受命令名和参数列表。

Types

type Mode

type Mode int

Mode 保留向后兼容(内置模式枚举)。

const (
	ModeClaude Mode = iota
	ModeCodex
)

func (Mode) String

func (m Mode) String() string

Jump to

Keyboard shortcuts

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