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 ¶
const ( // Open and Close bound the block. Open = "<attached>" Close = "</attached>" )
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 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 ¶
OneLine is s on one line, without control characters and without the block's own tags.
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.