WP10, neue UI mit echtem manuellem Editor/Import
This commit is contained in:
1 parent
b153571933
commit
88e2cbf254
2 files changed
+91
-67
No files matched your search
+9
-18
@@ -23,7 +23,7 @@ timeout_setting = os.getenv("MINDNET_API_TIMEOUT") or os.getenv("MINDNET_LLM_TIM
|
||||
API_TIMEOUT = float(timeout_setting) if timeout_setting else 300.0
|
||||
|
||||
# --- PAGE SETUP ---
|
||||
st.set_page_config(page_title="mindnet v2.3.4", page_icon="🧠", layout="wide")
|
||||
st.set_page_config(page_title="mindnet v2.3.6", page_icon="🧠", layout="wide")
|
||||
|
||||
# --- CSS STYLING ---
|
||||
st.markdown("""
|
||||
@@ -225,7 +225,7 @@ def submit_feedback(query_id, node_id, score, comment=None):
|
||||
def render_sidebar():
|
||||
with st.sidebar:
|
||||
st.title("🧠 mindnet")
|
||||
st.caption("v2.3.4 | WP-10b (Intelligence)")
|
||||
st.caption("v2.3.6 | WP-10b (Full)")
|
||||
mode = st.radio("Modus", ["💬 Chat", "📝 Manueller Editor"], index=0)
|
||||
st.divider()
|
||||
st.subheader("⚙️ Settings")
|
||||
@@ -463,22 +463,13 @@ def render_chat_interface(top_k, explain):
|
||||
st.rerun()
|
||||
|
||||
def render_manual_editor():
|
||||
st.header("📝 Manueller Editor")
|
||||
c1, c2 = st.columns([1, 2])
|
||||
n_type = c1.selectbox("Typ", ["concept", "project", "decision", "experience", "value", "goal"])
|
||||
tags = c2.text_input("Tags")
|
||||
body = st.text_area("Inhalt", height=400, placeholder="# Titel\n\nText...")
|
||||
|
||||
if st.button("Speichern (Via API)"):
|
||||
meta = {"type": n_type, "status": "draft", "tags": [t.strip() for t in tags.split(",")]}
|
||||
doc = build_markdown_doc(meta, body)
|
||||
|
||||
# Test Call
|
||||
res = save_draft_to_vault(doc, filename=f"manual-{uuid.uuid4().hex[:6]}.md")
|
||||
if "error" in res:
|
||||
st.error(res["error"])
|
||||
else:
|
||||
st.success(f"Gespeichert: {res.get('file_path')}")
|
||||
# Wir nutzen eine Fake-Message, um die render_draft_editor Logik wiederzuverwenden
|
||||
# Aber mit leeren Defaults
|
||||
mock_msg = {
|
||||
"content": "---\ntype: default\nstatus: draft\ntitle: Neue Notiz\ntags: []\n---\n# Titel\n",
|
||||
"query_id": "manual_mode_v2" # Feste ID für manuellen Modus
|
||||
}
|
||||
render_draft_editor(mock_msg)
|
||||
|
||||
# --- MAIN ---
|
||||
mode, top_k, explain = render_sidebar()
|
||||
|
||||
Reference in new issue
Block a user