MCPcopy Create free account
hub / github.com/driangle/taskmd / printContextFile

Function printContextFile

apps/cli/internal/cli/context.go:226–244  ·  view source on GitHub ↗
(w *os.File, f taskcontext.FileEntry, r *lipgloss.Renderer)

Source from the content-addressed store, hash-verified

224}
225
226func printContextFile(w *os.File, f taskcontext.FileEntry, r *lipgloss.Renderer) {
227 path := f.Path
228 if !f.Exists {
229 path += " " + formatWarning("(missing)", r)
230 } else if f.IsDir {
231 path += " " + formatDim("(dir)", r)
232 } else if f.Binary {
233 path += " " + formatDim("(binary)", r)
234 } else if f.Generated {
235 path += " " + formatDim("(generated)", r)
236 }
237 if f.Content != "" {
238 fmt.Fprintf(w, " %s (%d lines)\n", path, f.Lines)
239 separator := strings.Repeat("\u2500", 49)
240 fmt.Fprintf(w, " %s\n%s\n %s\n", separator, f.Content, separator)
241 } else {
242 fmt.Fprintf(w, " %s\n", path)
243 }
244}
245
246func printContextDeps(w *os.File, deps []taskcontext.DepEntry, r *lipgloss.Renderer) {
247 if len(deps) == 0 {

Callers 1

Calls 2

formatWarningFunction · 0.85
formatDimFunction · 0.85

Tested by

no test coverage detected