fimtool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fimtool exposes Fill-in-the-Middle code completion as a Seshat tool.

Index

Constants

View Source
const (
	ToolName        = "code_complete"
	ToolDescription = `` /* 596-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

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

Tool implements the code_complete built-in tool.

func New

func New(completer fim.Completer) *Tool

New creates a code_complete Tool. When completer is nil, IsEnabled returns false and the tool is not surfaced to the LLM.

func (*Tool) BackfillInput

func (t *Tool) BackfillInput(_ context.Context, input map[string]any) map[string]any

BackfillInput implements tool.Tool.

func (*Tool) Call

Call implements tool.Tool.

func (*Tool) CheckPermissions

func (t *Tool) CheckPermissions(_ context.Context, _ map[string]any, _ tool.ToolUseContext) types.PermissionResult

CheckPermissions implements tool.Tool — FIM calls are read-only, always allowed.

func (*Tool) Definition

func (t *Tool) Definition() tool.Definition

Definition implements tool.Tool.

func (*Tool) Description

func (t *Tool) Description(_ context.Context) (string, error)

Description implements tool.Tool.

func (*Tool) FormatResult

func (t *Tool) FormatResult(data any) string

FormatResult implements tool.Tool.

func (*Tool) IsConcurrencySafe

func (t *Tool) IsConcurrencySafe(_ map[string]any) bool

IsConcurrencySafe implements tool.Tool — FIM calls are stateless HTTP requests.

func (*Tool) IsEnabled

func (t *Tool) IsEnabled() bool

IsEnabled implements tool.Tool.

func (*Tool) IsReadOnly

func (t *Tool) IsReadOnly(_ map[string]any) bool

IsReadOnly implements tool.Tool — FIM only reads code, it never writes files.

func (*Tool) ValidateInput

func (t *Tool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

ValidateInput implements tool.Tool.

Jump to

Keyboard shortcuts

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