Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1```mermaid2sequenceDiagram3 participant Store as 🗄️ Stores4 participant DbSvc as ⚙️ DatabaseService5 participant Dexie as 📦 Dexie ORM6 participant IDB as 💾 IndexedDB7 8 Note over DbSvc: Stateless service - all methods static<br/>Database: "LlamacppWebui"9 10 %% ═══════════════════════════════════════════════════════════════════════════11 Note over Store,IDB: 📊 SCHEMA12 %% ═══════════════════════════════════════════════════════════════════════════13 14 rect rgb(240, 248, 255)15 Note over IDB: conversations table:<br/>id (PK), lastModified, currNode, name16 end17 18 rect rgb(255, 248, 240)19 Note over IDB: messages table:<br/>id (PK), convId (FK), type, role, timestamp,<br/>parent, children[], content, thinking,<br/>toolCalls, extra[], model, timings20 end21 22 %% ═══════════════════════════════════════════════════════════════════════════23 Note over Store,IDB: 💬 CONVERSATIONS CRUD24 %% ═══════════════════════════════════════════════════════════════════════════25 26 Store->>DbSvc: createConversation(name)27 activate DbSvc28 DbSvc->>DbSvc: Generate UUID29 DbSvc->>Dexie: db.conversations.add({id, name, lastModified, currNode: ""})30 Dexie->>IDB: INSERT31 IDB-->>Dexie: success32 DbSvc-->>Store: DatabaseConversation33 deactivate DbSvc34 35 Store->>DbSvc: getConversation(convId)36 DbSvc->>Dexie: db.conversations.get(convId)37 Dexie->>IDB: SELECT WHERE id = ?38 IDB-->>DbSvc: DatabaseConversation39 40 Store->>DbSvc: getAllConversations()41 DbSvc->>Dexie: db.conversations.orderBy('lastModified').reverse().toArray()42 Dexie->>IDB: SELECT ORDER BY lastModified DESC43 IDB-->>DbSvc: DatabaseConversation[]44 45 Store->>DbSvc: updateConversation(convId, updates)46 DbSvc->>Dexie: db.conversations.update(convId, {...updates, lastModified})47 Dexie->>IDB: UPDATE48 49 Store->>DbSvc: deleteConversation(convId)50 activate DbSvc51 DbSvc->>Dexie: db.conversations.delete(convId)52 Dexie->>IDB: DELETE FROM conversations53 DbSvc->>Dexie: db.messages.where('convId').equals(convId).delete()54 Dexie->>IDB: DELETE FROM messages WHERE convId = ?55 deactivate DbSvc56 57 %% ═══════════════════════════════════════════════════════════════════════════58 Note over Store,IDB: 📝 MESSAGES CRUD59 %% ═══════════════════════════════════════════════════════════════════════════60 61 Store->>DbSvc: createRootMessage(convId)62 activate DbSvc63 DbSvc->>DbSvc: Create root message {type: "root", parent: null}64 DbSvc->>Dexie: db.messages.add(rootMsg)65 Dexie->>IDB: INSERT66 DbSvc-->>Store: rootMessageId67 deactivate DbSvc68 69 Store->>DbSvc: createSystemMessage(convId, content, parentId)70 activate DbSvc71 DbSvc->>DbSvc: Create message {role: "system", parent: parentId}72 DbSvc->>Dexie: db.messages.add(systemMsg)73 Dexie->>IDB: INSERT74 DbSvc-->>Store: DatabaseMessage75 deactivate DbSvc76 77 Store->>DbSvc: createMessageBranch(message, parentId)78 activate DbSvc79 DbSvc->>DbSvc: Generate UUID for new message80 DbSvc->>Dexie: db.messages.add({...message, id, parent: parentId})81 Dexie->>IDB: INSERT message82 83 alt parentId exists84 DbSvc->>Dexie: db.messages.get(parentId)85 Dexie->>IDB: SELECT parent86 DbSvc->>DbSvc: parent.children.push(newId)87 DbSvc->>Dexie: db.messages.update(parentId, {children})88 Dexie->>IDB: UPDATE parent.children89 end90 91 DbSvc->>Dexie: db.conversations.update(convId, {currNode: newId})92 Dexie->>IDB: UPDATE conversation.currNode93 DbSvc-->>Store: DatabaseMessage94 deactivate DbSvc95 96 Store->>DbSvc: getConversationMessages(convId)97 DbSvc->>Dexie: db.messages.where('convId').equals(convId).toArray()98 Dexie->>IDB: SELECT WHERE convId = ?99 IDB-->>DbSvc: DatabaseMessage[]100 101 Store->>DbSvc: updateMessage(msgId, updates)102 DbSvc->>Dexie: db.messages.update(msgId, updates)103 Dexie->>IDB: UPDATE104 105 Store->>DbSvc: deleteMessage(msgId)106 DbSvc->>Dexie: db.messages.delete(msgId)107 Dexie->>IDB: DELETE108 109 %% ═══════════════════════════════════════════════════════════════════════════110 Note over Store,IDB: 🌳 BRANCHING OPERATIONS111 %% ═══════════════════════════════════════════════════════════════════════════112 113 Store->>DbSvc: updateCurrentNode(convId, nodeId)114 DbSvc->>Dexie: db.conversations.update(convId, {currNode: nodeId, lastModified})115 Dexie->>IDB: UPDATE116 117 Store->>DbSvc: deleteMessageCascading(msgId)118 activate DbSvc119 DbSvc->>DbSvc: findDescendantMessages(msgId, allMessages)120 Note right of DbSvc: Recursively find all children121 loop each descendant122 DbSvc->>Dexie: db.messages.delete(descendantId)123 Dexie->>IDB: DELETE124 end125 DbSvc->>Dexie: db.messages.delete(msgId)126 Dexie->>IDB: DELETE target message127 128 alt target message has a parent129 DbSvc->>Dexie: db.messages.get(parentId)130 DbSvc->>DbSvc: parent.children.filter(id !== msgId)131 DbSvc->>Dexie: db.messages.update(parentId, {children})132 Note right of DbSvc: Remove deleted message from parent's children[]133 end134 deactivate DbSvc135 136 %% ═══════════════════════════════════════════════════════════════════════════137 Note over Store,IDB: 📥 IMPORT138 %% ═══════════════════════════════════════════════════════════════════════════139 140 Store->>DbSvc: importConversations(data)141 activate DbSvc142 loop each conversation in data143 DbSvc->>Dexie: db.conversations.get(conv.id)144 alt conversation already exists145 Note right of DbSvc: Skip duplicate (keep existing)146 else conversation is new147 DbSvc->>Dexie: db.conversations.add(conversation)148 Dexie->>IDB: INSERT conversation149 loop each message150 DbSvc->>Dexie: db.messages.add(message)151 Dexie->>IDB: INSERT message152 end153 end154 end155 deactivate DbSvc156 157 %% ═══════════════════════════════════════════════════════════════════════════158 Note over Store,IDB: 🔗 MESSAGE TREE UTILITIES159 %% ═══════════════════════════════════════════════════════════════════════════160 161 Note over DbSvc: Used by stores (imported from utils):162 163 rect rgb(240, 255, 240)164 Note over DbSvc: filterByLeafNodeId(messages, leafId)<br/>→ Returns path from root to leaf<br/>→ Used to display current branch165 end166 167 rect rgb(240, 255, 240)168 Note over DbSvc: findLeafNode(startId, messages)<br/>→ Traverse to deepest child<br/>→ Used for branch navigation169 end170 171 rect rgb(240, 255, 240)172 Note over DbSvc: findDescendantMessages(msgId, messages)<br/>→ Find all children recursively<br/>→ Used for cascading deletes173 end174```175 