attach

package
v0.16.124 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 5 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 attach writes the places a message points at (wire.MessageRef: a design, a document, a board, a file of the project, a merge request, a task) into the words the agent gets: one block under the person's text, a line per place, each led by a tag the page reads back into a chip. The block is plain enough for the agent to read and stable enough for the page to strip: `<attached>`, a header, `<ref kind=".." id=".." title=".."/> line`, `</attached>`.

Index

Constants

View Source
const (
	// Open and Close bound the block.
	Open  = "<attached>"
	Close = "</attached>"
)
View Source
const RefUpload wire.RefKind = "upload"

RefUpload is the tag's kind of a file the person uploaded with the message: no place of the project (wire.RefKind), so no chip of a place; the page reads it back into the message's file.

Variables

This section is empty.

Functions

func Block

func Block(items []Item) string

Block is the places as the agent reads them; "" for none.

func LineOf

func LineOf(r wire.MessageRef) string

LineOf is the line of a place the runtime needs nothing more to describe: everything but a design.

func OneLine

func OneLine(s string) string

OneLine is s on one line, without control characters and without the block's own tags.

func Strip

func Strip(text string) string

Strip is the person's words without the block: what a title or a summary is made of.

func Tag

func Tag(r wire.MessageRef) string

Tag is the line's lead the page reads the chip from.

func With

func With(text, block string) string

With is the person's words with the block under them.

Types

type Item

type Item struct {
	Ref  wire.MessageRef
	Line string
	// Body is what the agent reads under the line, on lines of its own (another chat's excerpt); "" for none.
	Body string
}

Item is a place and the line the agent reads about it.

func UploadItem added in v0.16.86

func UploadItem(ref wire.AttachmentRef, path string) Item

UploadItem is a file the person attached that the agent cannot take pasted: it stays on the machine, the agent reads its name and its path. The name is the person's, the file on disk is named by its upload.

Jump to

Keyboard shortcuts

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