imagecard

package
v0.16.521 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package imagecard reads what the feed's picture card needs out of the text an agent's picture tool left in a transcript: the report of generate_images / wait_images (see imagegen.Report) and the names of the tools.

Index

Constants

View Source
const (
	Drawing = "drawing"
	Done    = "done"
	Failed  = "failed"
)

States of a picture call.

Variables

This section is empty.

Functions

func IsGenerate

func IsGenerate(tool string) bool

IsGenerate and IsWait say whether a tool name (bare, or mcp__<server>__<tool>) is the harnessly picture tool or its video twin (generate_video, wait_video): a clip is a card of the same kind, its file a video.

func IsWait

func IsWait(tool string) bool

Types

type Report

type Report struct {
	JobID string
	State string
	Paths []string
	Error string
}

Report is the parsed answer of a picture tool.

func ParseReport

func ParseReport(text string) (r Report, ok bool)

ParseReport reads the text of a generate_images / wait_images answer: «job_id: <id>», then «Done: …», «Still drawing: …» or «Failed: <why>», then «<n>. <path>» lines. ok is false for any other text.

Jump to

Keyboard shortcuts

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