Skip to content

Commit

Permalink
Improve overview.
Browse files Browse the repository at this point in the history
  • Loading branch information
whilo committed Apr 15, 2024
1 parent 4be5c61 commit 41fc6c1
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions src/ie/simm/runtimes/assistance.clj
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@
[:p "Copyright © 2024 Christian Weilbach. All rights reserved."]]]]]]])

(defn list-notes [peer {{:keys [chat-id]} :path-params}]
;; list the notes in basic HTML
(let [conn (ensure-conn peer chat-id)
title (or (:chat/title (d/entity @conn [:chat/id (Long/parseLong chat-id)])) "Noname chat")]
(response
Expand All @@ -191,23 +190,28 @@
[:span title]]]]]
[:div.content "This chat has no description yet."]
[:div {:class "container"}
[:h3 {:class "title is-3 is-spaced" :id "bots"}
[:h2 {:class "title is-2 is-spaced" :id "bots"}
[:a {:class "" :href "bots"} "# "]
[:span {:class ""} "Bots"]]
[:span {:class ""} "Agents and Processes"]]
[:div {:class "content"}
[:p "Here be dragons."]]]
[:div {:class "container"}
[:h3 {:class "title is-3 is-spaced" :id "notes"}
[:a {:class "" :href "notes"} "# "]
[:span {:class ""} "Notes "]
[:a {:class "button" :href (str "/download/chat/" chat-id "/notes.zip")}
[:span {:class "icon is-small"} [:i {:class "bx bx-download"}]]]]
[:div {:class "content"}
[:ul
(->> (d/q '[:find ?t :where [?n :note/title ?t]] @conn)
(map first)
sort
(map (fn [f] [:li [:a {:href (str "/notes/" chat-id "/" f)} f]])))]]]]))))
[:p "Human-like agents are running in the background to assist you. They are able to answer questions, collaborate, provide summaries, and help you with your tasks. They are also able to learn from your interactions and improve over time. There are also simpler processes that can be triggered by certain keywords or commands."]]
[:div {:class "container"}
[:h3 {:class "title is-3 is-spaced" :id "note-taker"}
[:a {:class "" :href "note-taker"} "# "]
[:span {:class ""} "Note-taker"]]
[:p "The note-taker is a simple note-taking system that allows you to keep track of important information and conversations. You can create new notes, edit existing ones, and link them together. The note-taker will also automatically summarize conversations and create new notes for you."]
[:div.content
[:h4 {:class "title is-4 is-spaced" :id "notes"}
[:a {:class "" :href "notes"} "# "]
[:span {:class ""} "Notes"]]
[:p "These are all notes that have been created in this chat. You can click on a note to view its content, edit it, or delete it. You can also download all notes as a zip file."]
[:a {:class "button" :href (str "/download/chat/" chat-id "/notes.zip")} [:span {:class "icon is-small"} [:i {:class "bx bx-download"}]] [:span "Download"]]
[:div {:class "content"}
[:ul
(->> (d/q '[:find ?t :where [?n :note/title ?t]] @conn)
(map first)
sort
(map (fn [f] [:li [:a {:href (str "/notes/" chat-id "/" f)} f]])))]]]]]]))))

(defn view-note [peer {{:keys [chat-id note]} :path-params}]
(let [conn (ensure-conn peer chat-id)
Expand Down Expand Up @@ -268,12 +272,12 @@
[:div.content
[:h4 {:class "title is-4 is-spaced" :id (str i "-source")}
[:a {:class "" :href (str "#" i "-source")} "# "]
[:span {:class ""} (str i ". Source conversation")]]
[:span {:class ""} (str i ". Conversation")]]
(md-render s)]
[:div.content
[:h4 {:class "title is-4 is-spaced" :id "message-history"}
[:a {:class "" :href "#message-history"} "# "]
[:span {:class ""} "Message history"]]
[:h5 {:class "title is-5 is-spaced" :id (str i "-message-history")}
[:a {:class "" :href (str "#" i "-message-history")} "# "]
[:span {:class ""} "Messages"]]
[:ul (for [[d t n f l] (sort-by first ds)]
[:li [:div {:class "content"}
[:h6 (md-render (str "Message from [[" f " " l "]] (" n ") on " d))]
Expand Down

0 comments on commit 41fc6c1

Please sign in to comment.