MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / node_style

Function node_style

atomic-cli/src/commands/query/mod.rs:536–549  ·  view source on GitHub ↗

Returns `(fillcolor, shape)` for a given node kind.

(kind: &str)

Source from the content-addressed store, hash-verified

534
535/// Returns `(fillcolor, shape)` for a given node kind.
536fn node_style(kind: &str) -> (&'static str, &'static str) {
537 match kind.to_lowercase().as_str() {
538 "module" => ("#d4e6f1", "folder"),
539 "file" => ("#d5f5e3", "box"),
540 "entity" => ("#fdebd0", "ellipse"),
541 "change" => ("#fadbd8", "note"),
542 "view" => ("#e8daef", "pentagon"),
543 "identity" => ("#fef9e7", "box"),
544 "goal" => ("#d1f2eb", "hexagon"),
545 "intent" => ("#d1f2eb", "hexagon"),
546 "memory" => ("#fef9e7", "box"),
547 _ => ("#f2f3f4", "box"),
548 }
549}
550
551/// Build a human-readable label for a node in DOT output.
552fn node_label(node: &KgNode) -> String {

Callers 1

emit_dotFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected