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

Function node_style

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

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

(kind: &str)

Source from the content-addressed store, hash-verified

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

Callers 1

emit_dotFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected