Documentation
¶
Overview ¶
Package gemini drives the gemini CLI as a subprocess and parses its JSON output into a plain text reply.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
Command string
Timeout time.Duration
Env map[string]string
WorkspaceDir string
}
Runner executes the gemini CLI for a single request.
func (Runner) Run ¶
Run is a convenience wrapper that runs without thread resumption or progress callbacks.
func (Runner) RunWithThreadAndProgress ¶
func (r Runner) RunWithThreadAndProgress( ctx context.Context, threadID string, userText string, model string, env map[string]string, onProgress func(step string), ) (string, string, int64, int64, int64, error)
RunWithThreadAndProgress runs the gemini CLI and returns the final reply and next session ID.
- threadID: resume an existing session when non-empty.
- userText: the fully assembled prompt.
- model: overrides the CLI default when non-empty.
- env: merged over the process environment.
- onProgress: called with the final reply; may be nil.
Click to show internal directories.
Click to hide internal directories.