fix(fn-run): propagar stdout/stderr de bash functions library-style #1

Open
dataforge wants to merge 537 commits from auto/0077-fn-run-bash-mudo into master
2 changed files with 16 additions and 10 deletions
Showing only changes of commit 42957d10f6 - Show all commits
Binary file not shown.
+16 -10
View File
@@ -7,6 +7,7 @@
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace ed = ax::NodeEditor;
@@ -15,8 +16,9 @@ namespace fn::gfx {
static constexpr int MAX_NODES = 16;
static ed::EditorContext* s_ctx = nullptr;
static uint32_t s_next_uid = 1;
static ed::EditorContext* s_ctx = nullptr;
static uint32_t s_next_uid = 1;
static std::unordered_set<uint32_t> s_positioned;
// ── ID encoding ──────────────────────────────────────────────────────────────
// node id = editor_uid
@@ -213,6 +215,18 @@ bool dag_node_editor(std::vector<DagStep>& pipeline) {
ImVec4 col = kind_color(def->kind);
// Initial position only — after that, the editor owns the node's position
// and user drags must not be overwritten.
if (s_positioned.find(step.editor_uid) == s_positioned.end()) {
if (step.editor_pos_x == 0.0f && step.editor_pos_y == 0.0f) {
step.editor_pos_x = 50.0f + static_cast<float>(i) * 220.0f;
step.editor_pos_y = 100.0f;
}
ed::SetNodePosition(ed::NodeId(node_id(step.editor_uid)),
ImVec2(step.editor_pos_x, step.editor_pos_y));
s_positioned.insert(step.editor_uid);
}
ed::BeginNode(ed::NodeId(node_id(step.editor_uid)));
// Header
@@ -272,14 +286,6 @@ bool dag_node_editor(std::vector<DagStep>& pipeline) {
ed::EndPin();
ed::EndNode();
// Set initial position if not yet placed (both zero = first time)
if (step.editor_pos_x == 0.0f && step.editor_pos_y == 0.0f) {
step.editor_pos_x = 50.0f + static_cast<float>(i) * 220.0f;
step.editor_pos_y = 100.0f;
}
ed::SetNodePosition(ed::NodeId(node_id(step.editor_uid)),
ImVec2(step.editor_pos_x, step.editor_pos_y));
}
// ── Draw existing links ──────────────────────────────────────────────────