Skip to content

Commit 3831760

Browse files
committed
Fix Build
1 parent a49fd00 commit 3831760

5 files changed

Lines changed: 83 additions & 3 deletions

File tree

app/src/main/java/com/dark/neuroverse/activities/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MainActivity : ComponentActivity() {
2222
setContent {
2323
NeuroVerseTheme {
2424
Scaffold(containerColor = MaterialTheme.colorScheme.surface) { it ->
25-
MainScreen(it)
25+
NeuronTreeScreen(it)
2626
}
2727
}
2828
}

userData/src/main/java/com/dark/userdata/neuron_tree/NeuronNode.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.dark.userdata.neuron_tree
22

3+
import com.dark.userdata.schema.NodeContentSchema
34
import kotlinx.serialization.Serializable
45
import java.util.UUID
56

@@ -24,7 +25,7 @@ open class NeuronNode(
2425

2526
@Serializable
2627
data class NodeData(
27-
val content: String,
28+
val content: NodeContentSchema,
2829
val type: NodeType
2930
)
3031

userData/src/main/java/com/dark/userdata/neuron_tree/NeuronTree.kt

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.dark.userdata.neuron_tree
22

3+
import com.dark.userdata.schema.ChildNodeSchema
4+
import com.dark.userdata.schema.NodeContentSchema
35
import kotlinx.serialization.Serializable
46

57
/**
@@ -137,6 +139,40 @@ class NeuronTree(internal val root: NeuronNode) {
137139
}
138140

139141
fun getDefaultBrainStructure(){
140-
val root = NeuronNode("root", NodeData("", NodeType.ROOT))
142+
val tools = generateOperatorNode("tools", OperatorNodesContent.TOOLS)
143+
val temp = generateOperatorNode("temp", OperatorNodesContent.TEMP)
144+
val main = generateOperatorNode("main", OperatorNodesContent.MAIN)
145+
val ai = generateOperatorNode("ai", OperatorNodesContent.AI)
146+
147+
val root = NeuronNode("root", NodeData(NodeContentSchema(
148+
name = "root",
149+
childNodes = listOf(
150+
ChildNodeSchema(tools.id, )
151+
)
152+
), NodeType.ROOT))
141153
val tree = NeuronTree(root)
142154
}
155+
156+
internal fun generateOperatorNode(id: String, content: NodeContentSchema = NodeContentSchema()): NeuronNode{
157+
return NeuronNode(id, NodeData(content, NodeType.OPERATOR))
158+
}
159+
160+
internal object OperatorNodesContent{
161+
val TOOLS = NodeContentSchema(
162+
name = "tool",
163+
164+
childNodes = mutableListOf(ChildNodeSchema())
165+
)
166+
val TEMP = NodeContentSchema(
167+
name = "temp",
168+
childNodes = mutableListOf(ChildNodeSchema())
169+
)
170+
val MAIN = NodeContentSchema(
171+
name = "main",
172+
childNodes = mutableListOf(ChildNodeSchema())
173+
)
174+
val AI = NodeContentSchema(
175+
name = "ai",
176+
childNodes = mutableListOf(ChildNodeSchema())
177+
)
178+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.dark.userdata.schema
2+
3+
import kotlinx.serialization.Serializable
4+
5+
@Serializable
6+
data class NodeContentSchema(
7+
val name: String = "",
8+
val content: String = "",
9+
val tags: List<NodeTags> = emptyList(),
10+
val childNodes: List<ChildNodeSchema> = emptyList(),
11+
)
12+
13+
@Serializable
14+
data class ChildNodeSchema(
15+
val childId: String = ""
16+
)
17+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.dark.userdata.schema
2+
3+
import kotlinx.serialization.Serializable
4+
5+
@Serializable
6+
enum class NodeTags(tagName: String, tagValue: String) {
7+
//NODES TAGS
8+
TOOL("Tool", "TAG REPRESENTS INTERNAL MCP TOOLS THAT ARE DESCRIBE FOR AI"),
9+
TEMP("Temp", "TAG IS USE TO INDICATE THAT THIS NODE HAS TEMPORARY DATA, AND THE DATA IS REMOVABLE"),
10+
MAIN("Main", "TAG IS USE TO INDICATE THAT THIS NODE HAS THE PERMANENT DATA AND THE DATA IS NOT REMOVABLE UNLESS THE MEMORY IS FULL"),
11+
AI("AI", "TAG IS USED FOR AI RELATED DATA"),
12+
13+
//COMMON
14+
MESSAGE("MSG", "TAG IS USED FOR RESPONSES/PROMPTS"),
15+
CONVERSATION("CONV", "TAG IS USED FOR CONVERSATION"),
16+
ASSISTANT("ASSIST", "TAG IS USED FOR ASSISTANT RELATED CONTENT LIKE ASSISTANT RESPONSE"),
17+
USER("USER", "TAG IS USED FOR USER RELATED CONTENT LIKE USER PROMPT"),
18+
19+
//TOOLS
20+
APP_OPERATOR("APP_OPT", "TAG IS USED FOR APPLICATION OPERATOR TOOL"),
21+
22+
//PRIORITY TAGS
23+
PR_LOW("PRIORITY-LOW", "THIS TAG REPRESENTS THAT THIS PARTICULAR DATA IS NOT MUCH OF A PRIORITY CAN BE BE REMOVED WHEN NEEDED"),
24+
PR_MEDIUM("PRIORITY-MEDIUM", "THIS TAG REPRESENTS THAT THIS PARTICULAR DATA IS OF A MEDIUM PRIORITY AND SHOULD ONLY BE REMOVED IF LOW-PRIORITY DATA IS COMPLETELY REMOVED"),
25+
PR_HIGH("PRIORITY-HIGH", "THIS TAG REPRESENTS THAT THIS PARTICULAR DATA IS OF A HIGH PRIORITY CAN ONLY BE REMOVED WHEN LOW-PRIORITY AND MEDIUM-PRIORITY DATA IS COMPLETELY REMOVED"),
26+
}

0 commit comments

Comments
 (0)