builtin

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuiltInToolBundlesRootDir = "tools"
	BuiltInToolBundlesJSON    = "tools.bundles.json"

	BuiltInAssistantPresetBundlesRootDir = "assistantpresets"
	BuiltInAssistantPresetBundlesJSON    = "assistantpresets.bundles.json"
)
View Source
const (
	ProviderNameAnthropic       = string(modelpreset.ProviderAnthropic)
	ProviderNameLocalAI         = string(modelpreset.ProviderLocalAI)
	ProviderNameLMStudio        = string(modelpreset.ProviderLMStudio)
	ProviderNameGoogleGemini    = string(modelpreset.ProviderGoogleGemini)
	ProviderNameHuggingFace     = string(modelpreset.ProviderHuggingFace)
	ProviderNameLlamaCPP        = string(modelpreset.ProviderLlamaCPP)
	ProviderNameMistral         = string(modelpreset.ProviderMistral)
	ProviderNameOllama          = string(modelpreset.ProviderOllama)
	ProviderNameOpenAIChat      = string(modelpreset.ProviderOpenAIChat)
	ProviderNameOpenAIResponses = string(modelpreset.ProviderOpenAIResponses)
	ProviderNameOpenRouter      = string(modelpreset.ProviderOpenRouter)
	ProviderNameSGLang          = string(modelpreset.ProviderSGLang)
	ProviderNameVLLM            = string(modelpreset.ProviderVLLM)
	ProviderNameXAI             = string(modelpreset.ProviderXAI)
)
View Source
const (
	BuiltinBundleIDLLMToolsFS    = "018fe0f4-b8cd-7e55-82d5-9df0bd70e400"
	BuiltinBundleIDLLMToolsImage = "018fe0f4-b8cd-7e55-82d5-9df0bd70e401"
	BuiltinBundleIDLLMToolsExec  = "019c0415-40f7-70cb-9200-d804c9388a57"
	BuiltinBundleIDLLMToolsText  = "019c0da2-02d2-7e71-81d7-35f2e5a0bebf"
	BuiltinBundleIDLLMToolsGit   = "019f27b6-10ee-7858-8ad0-a20081c1a88d"
	BuiltinBundleIDLLMToolsWeb   = "019f27b6-bce1-742f-8ff9-d3a12ce4361c"
)

IMPORTANT: keep these stable (match tools.bundles.json).

Variables

View Source
var BuiltInAssistantPresetBundlesFS embed.FS
View Source
var BuiltInToolBundlesFS embed.FS

Functions

This section is empty.

Types

type AsyncRebuilder

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

AsyncRebuilder calls fn in a background goroutine when Trigger detects that the previous successful run is older than maxAge.

func NewAsyncRebuilder

func NewAsyncRebuilder(maxAge time.Duration, fn func() error) *AsyncRebuilder

NewAsyncRebuilder returns a ready-to-use AsyncRebuilder. If maxAge <= 0 the rebuilder will consider a snapshot stale immediately (i.e. every Trigger may start a rebuild).

func (*AsyncRebuilder) Close added in v0.0.79

func (r *AsyncRebuilder) Close()

Close prevents any new rebuilds from starting and waits for any running rebuild to finish. The Close action is performed only once (sync.Once); subsequent Close calls return immediately.

func (*AsyncRebuilder) Force

func (r *AsyncRebuilder) Force() error

Force executes fn synchronously and updates the timestamp on success. It is exported mainly for unit tests.

func (*AsyncRebuilder) IsDone

func (r *AsyncRebuilder) IsDone() <-chan struct{}

func (*AsyncRebuilder) MarkFresh

func (r *AsyncRebuilder) MarkFresh()

MarkFresh updates the last successful-run timestamp.

func (*AsyncRebuilder) Trigger

func (r *AsyncRebuilder) Trigger()

Trigger starts a rebuild in the background when the stored snapshot is considered stale. The call itself is cheap (non-blocking).

Jump to

Keyboard shortcuts

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