byterover-cli 1.0.5 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/commands/hook-prompt-submit.d.ts +27 -0
- package/dist/commands/hook-prompt-submit.js +39 -0
- package/dist/commands/status.js +8 -3
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/core/domain/cipher/tools/constants.d.ts +1 -0
- package/dist/core/domain/cipher/tools/constants.js +1 -0
- package/dist/core/domain/entities/agent.d.ts +16 -0
- package/dist/core/domain/entities/agent.js +24 -0
- package/dist/core/domain/entities/connector-type.d.ts +9 -0
- package/dist/core/domain/entities/connector-type.js +8 -0
- package/dist/core/domain/entities/event.d.ts +1 -1
- package/dist/core/domain/entities/event.js +2 -0
- package/dist/core/domain/errors/task-error.d.ts +4 -0
- package/dist/core/domain/errors/task-error.js +7 -0
- package/dist/core/domain/transport/schemas.d.ts +40 -0
- package/dist/core/domain/transport/schemas.js +28 -0
- package/dist/core/interfaces/connectors/connector-types.d.ts +57 -0
- package/dist/core/interfaces/connectors/i-connector-manager.d.ts +72 -0
- package/dist/core/interfaces/connectors/i-connector-manager.js +1 -0
- package/dist/core/interfaces/connectors/i-connector.d.ts +54 -0
- package/dist/core/interfaces/connectors/i-connector.js +1 -0
- package/dist/core/interfaces/i-file-service.d.ts +7 -0
- package/dist/core/interfaces/usecase/i-connectors-use-case.d.ts +3 -0
- package/dist/core/interfaces/usecase/i-connectors-use-case.js +1 -0
- package/dist/hooks/init/update-notifier.d.ts +1 -0
- package/dist/hooks/init/update-notifier.js +10 -1
- package/dist/infra/cipher/file-system/binary-utils.d.ts +7 -12
- package/dist/infra/cipher/file-system/binary-utils.js +46 -31
- package/dist/infra/cipher/llm/context/context-manager.d.ts +2 -2
- package/dist/infra/cipher/llm/context/context-manager.js +23 -2
- package/dist/infra/cipher/llm/formatters/gemini-formatter.js +48 -9
- package/dist/infra/cipher/llm/internal-llm-service.js +2 -2
- package/dist/infra/cipher/system-prompt/contributors/context-tree-structure-contributor.d.ts +6 -7
- package/dist/infra/cipher/system-prompt/contributors/context-tree-structure-contributor.js +57 -18
- package/dist/infra/cipher/tools/implementations/curate-tool.js +20 -2
- package/dist/infra/cipher/tools/implementations/read-file-tool.js +38 -17
- package/dist/infra/cipher/tools/implementations/search-knowledge-tool.d.ts +7 -0
- package/dist/infra/cipher/tools/implementations/search-knowledge-tool.js +303 -0
- package/dist/infra/cipher/tools/index.d.ts +1 -0
- package/dist/infra/cipher/tools/index.js +1 -0
- package/dist/infra/cipher/tools/tool-manager.js +1 -0
- package/dist/infra/cipher/tools/tool-registry.js +7 -0
- package/dist/infra/connectors/connector-manager.d.ts +32 -0
- package/dist/infra/connectors/connector-manager.js +156 -0
- package/dist/infra/connectors/hook/hook-connector-config.d.ts +52 -0
- package/dist/infra/connectors/hook/hook-connector-config.js +41 -0
- package/dist/infra/connectors/hook/hook-connector.d.ts +46 -0
- package/dist/infra/connectors/hook/hook-connector.js +231 -0
- package/dist/infra/{rule → connectors/rules}/legacy-rule-detector.d.ts +2 -2
- package/dist/infra/{rule → connectors/rules}/legacy-rule-detector.js +1 -1
- package/dist/infra/connectors/rules/rules-connector-config.d.ts +95 -0
- package/dist/infra/{rule/agent-rule-config.js → connectors/rules/rules-connector-config.js} +10 -10
- package/dist/infra/connectors/rules/rules-connector.d.ts +41 -0
- package/dist/infra/connectors/rules/rules-connector.js +204 -0
- package/dist/infra/{rule/rule-template-service.d.ts → connectors/shared/template-service.d.ts} +3 -3
- package/dist/infra/{rule/rule-template-service.js → connectors/shared/template-service.js} +1 -1
- package/dist/infra/context-tree/file-context-tree-writer-service.d.ts +5 -2
- package/dist/infra/context-tree/file-context-tree-writer-service.js +20 -5
- package/dist/infra/core/executors/curate-executor.d.ts +2 -2
- package/dist/infra/core/executors/curate-executor.js +7 -7
- package/dist/infra/core/executors/query-executor.d.ts +12 -0
- package/dist/infra/core/executors/query-executor.js +62 -1
- package/dist/infra/file/fs-file-service.d.ts +7 -0
- package/dist/infra/file/fs-file-service.js +15 -1
- package/dist/infra/process/agent-worker.d.ts +2 -2
- package/dist/infra/process/agent-worker.js +626 -142
- package/dist/infra/process/constants.d.ts +1 -1
- package/dist/infra/process/constants.js +1 -1
- package/dist/infra/process/ipc-types.d.ts +17 -4
- package/dist/infra/process/ipc-types.js +3 -3
- package/dist/infra/process/parent-heartbeat.d.ts +47 -0
- package/dist/infra/process/parent-heartbeat.js +118 -0
- package/dist/infra/process/process-manager.d.ts +79 -0
- package/dist/infra/process/process-manager.js +277 -3
- package/dist/infra/process/task-queue-manager.d.ts +13 -0
- package/dist/infra/process/task-queue-manager.js +19 -0
- package/dist/infra/process/transport-handlers.d.ts +3 -0
- package/dist/infra/process/transport-handlers.js +51 -5
- package/dist/infra/process/transport-worker.js +9 -69
- package/dist/infra/repl/commands/connectors-command.d.ts +8 -0
- package/dist/infra/repl/commands/{gen-rules-command.js → connectors-command.js} +21 -10
- package/dist/infra/repl/commands/index.js +3 -2
- package/dist/infra/repl/commands/init-command.js +11 -7
- package/dist/infra/repl/commands/query-command.js +22 -2
- package/dist/infra/repl/commands/reset-command.js +1 -1
- package/dist/infra/transport/socket-io-transport-client.d.ts +68 -0
- package/dist/infra/transport/socket-io-transport-client.js +283 -7
- package/dist/infra/usecase/connectors-use-case.d.ts +59 -0
- package/dist/infra/usecase/connectors-use-case.js +203 -0
- package/dist/infra/usecase/init-use-case.d.ts +8 -43
- package/dist/infra/usecase/init-use-case.js +27 -251
- package/dist/infra/usecase/logout-use-case.js +1 -1
- package/dist/infra/usecase/pull-use-case.js +5 -5
- package/dist/infra/usecase/push-use-case.js +4 -4
- package/dist/infra/usecase/reset-use-case.js +3 -4
- package/dist/infra/usecase/space-list-use-case.js +3 -3
- package/dist/infra/usecase/space-switch-use-case.js +3 -3
- package/dist/resources/prompts/curate.yml +7 -0
- package/dist/resources/prompts/explore.yml +34 -0
- package/dist/resources/prompts/query-orchestrator.yml +112 -0
- package/dist/resources/prompts/system-prompt.yml +12 -2
- package/dist/resources/tools/search_knowledge.txt +32 -0
- package/dist/templates/sections/brv-instructions.md +98 -0
- package/dist/tui/components/onboarding/onboarding-flow.js +14 -11
- package/dist/tui/components/onboarding/welcome-box.js +1 -1
- package/dist/tui/contexts/onboarding-context.d.ts +4 -0
- package/dist/tui/contexts/onboarding-context.js +14 -2
- package/dist/tui/views/command-view.js +4 -0
- package/dist/utils/file-validator.d.ts +1 -1
- package/dist/utils/file-validator.js +25 -28
- package/dist/utils/type-guards.d.ts +5 -0
- package/dist/utils/type-guards.js +7 -0
- package/oclif.manifest.json +30 -4
- package/package.json +4 -1
- package/dist/core/interfaces/usecase/i-generate-rules-use-case.d.ts +0 -3
- package/dist/infra/repl/commands/gen-rules-command.d.ts +0 -7
- package/dist/infra/rule/agent-rule-config.d.ts +0 -19
- package/dist/infra/usecase/generate-rules-use-case.d.ts +0 -61
- package/dist/infra/usecase/generate-rules-use-case.js +0 -285
- /package/dist/core/interfaces/{usecase/i-generate-rules-use-case.js → connectors/connector-types.js} +0 -0
- /package/dist/infra/{rule → connectors/shared}/constants.d.ts +0 -0
- /package/dist/infra/{rule → connectors/shared}/constants.js +0 -0
|
@@ -23,7 +23,7 @@ export class PullUseCase {
|
|
|
23
23
|
async checkProjectInit() {
|
|
24
24
|
const projectConfig = await this.projectConfigStore.read();
|
|
25
25
|
if (projectConfig === undefined) {
|
|
26
|
-
throw new WorkspaceNotInitializedError('Project not initialized. Please run "
|
|
26
|
+
throw new WorkspaceNotInitializedError('Project not initialized. Please run "/init" to select your team and workspace.', '.brv');
|
|
27
27
|
}
|
|
28
28
|
return projectConfig;
|
|
29
29
|
}
|
|
@@ -39,7 +39,7 @@ export class PullUseCase {
|
|
|
39
39
|
const hasLocalChanges = await this.checkLocalChanges();
|
|
40
40
|
this.terminal.actionStop();
|
|
41
41
|
if (hasLocalChanges) {
|
|
42
|
-
this.terminal.log('You have local changes that have not been pushed. Run "
|
|
42
|
+
this.terminal.log('You have local changes that have not been pushed. Run "/push" first.');
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
// Pull from CoGit
|
|
@@ -67,7 +67,7 @@ export class PullUseCase {
|
|
|
67
67
|
// Stop action if it's in progress
|
|
68
68
|
this.terminal.actionStop();
|
|
69
69
|
if (error instanceof WorkspaceNotInitializedError) {
|
|
70
|
-
this.terminal.log('Project not initialized. Please run "
|
|
70
|
+
this.terminal.log('Project not initialized. Please run "/init" to select your team and workspace.');
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
const message = error instanceof Error ? error.message : 'Pull failed';
|
|
@@ -77,11 +77,11 @@ export class PullUseCase {
|
|
|
77
77
|
async validateAuth() {
|
|
78
78
|
const token = await this.tokenStore.load();
|
|
79
79
|
if (token === undefined) {
|
|
80
|
-
this.terminal.error('Not authenticated. Run "
|
|
80
|
+
this.terminal.error('Not authenticated. Run "/login" first.');
|
|
81
81
|
return undefined;
|
|
82
82
|
}
|
|
83
83
|
if (!token.isValid()) {
|
|
84
|
-
this.terminal.error('Authentication token expired. Run "
|
|
84
|
+
this.terminal.error('Authentication token expired. Run "/login" again.');
|
|
85
85
|
return undefined;
|
|
86
86
|
}
|
|
87
87
|
return token;
|
|
@@ -82,7 +82,7 @@ export class PushUseCase {
|
|
|
82
82
|
// Stop action if it's in progress
|
|
83
83
|
this.terminal.actionStop();
|
|
84
84
|
if (error instanceof WorkspaceNotInitializedError) {
|
|
85
|
-
this.terminal.log('Project not initialized. Please run "
|
|
85
|
+
this.terminal.log('Project not initialized. Please run "/init" to select your team and workspace.');
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
// For other errors, to properly display error before exit
|
|
@@ -96,7 +96,7 @@ export class PushUseCase {
|
|
|
96
96
|
async checkProjectInit() {
|
|
97
97
|
const projectConfig = await this.projectConfigStore.read();
|
|
98
98
|
if (projectConfig === undefined) {
|
|
99
|
-
throw new WorkspaceNotInitializedError('Project not initialized. Please run "
|
|
99
|
+
throw new WorkspaceNotInitializedError('Project not initialized. Please run "/init" to select your team and workspace.', '.brv');
|
|
100
100
|
}
|
|
101
101
|
return projectConfig;
|
|
102
102
|
}
|
|
@@ -112,11 +112,11 @@ export class PushUseCase {
|
|
|
112
112
|
async validateAuth() {
|
|
113
113
|
const token = await this.tokenStore.load();
|
|
114
114
|
if (token === undefined) {
|
|
115
|
-
this.terminal.error('Not authenticated. Run "
|
|
115
|
+
this.terminal.error('Not authenticated. Run "/login" first.');
|
|
116
116
|
return undefined;
|
|
117
117
|
}
|
|
118
118
|
if (!token.isValid()) {
|
|
119
|
-
this.terminal.error('Authentication token expired. Run "
|
|
119
|
+
this.terminal.error('Authentication token expired. Run "/login" again.');
|
|
120
120
|
return undefined;
|
|
121
121
|
}
|
|
122
122
|
return token;
|
|
@@ -14,7 +14,7 @@ export class ResetUseCase {
|
|
|
14
14
|
async confirmReset() {
|
|
15
15
|
return this.terminal.confirm({
|
|
16
16
|
default: false,
|
|
17
|
-
message: 'Are you sure you want to reset the context tree? This will remove all existing context
|
|
17
|
+
message: 'Are you sure you want to reset the context tree? This will remove all existing context. Your context tree will be empty.',
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
async run(options) {
|
|
@@ -37,12 +37,11 @@ export class ResetUseCase {
|
|
|
37
37
|
const baseDir = options.directory ?? process.cwd();
|
|
38
38
|
const contextTreeDir = join(baseDir, BRV_DIR, CONTEXT_TREE_DIR);
|
|
39
39
|
await rm(contextTreeDir, { force: true, recursive: true });
|
|
40
|
-
// Re-initialize context tree
|
|
40
|
+
// Re-initialize empty context tree
|
|
41
41
|
await this.contextTreeService.initialize(options.directory);
|
|
42
42
|
// Re-initialize empty snapshot
|
|
43
43
|
await this.contextTreeSnapshotService.initEmptySnapshot(options.directory);
|
|
44
|
-
this.terminal.log('✓ Context tree reset successfully.');
|
|
45
|
-
this.terminal.log(' 6 default domains restored: code_style, design, structure, compliance, testing, bug_fixes');
|
|
44
|
+
this.terminal.log('✓ Context tree reset successfully. Your context tree is now empty.');
|
|
46
45
|
}
|
|
47
46
|
catch (error) {
|
|
48
47
|
// Handle user cancelling the prompt (Ctrl+C or closing stdin)
|
|
@@ -15,16 +15,16 @@ export class SpaceListUseCase {
|
|
|
15
15
|
// Check project initialization
|
|
16
16
|
const projectConfig = await this.projectConfigStore.read();
|
|
17
17
|
if (!projectConfig) {
|
|
18
|
-
this.terminal.error('Project not initialized. Please run "
|
|
18
|
+
this.terminal.error('Project not initialized. Please run "/init" first.');
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
const token = await this.tokenStore.load();
|
|
22
22
|
if (!token) {
|
|
23
|
-
this.terminal.error('Not authenticated. Please run "
|
|
23
|
+
this.terminal.error('Not authenticated. Please run "/login" first.');
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
if (!token.isValid()) {
|
|
27
|
-
this.terminal.error('Authentication token expired. Please run "
|
|
27
|
+
this.terminal.error('Authentication token expired. Please run "/login" again.');
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
// Fetch spaces for the team from project config
|
|
@@ -74,7 +74,7 @@ export class SpaceSwitchUseCase {
|
|
|
74
74
|
// Check project initialization (MUST exist for switch)
|
|
75
75
|
const currentConfig = await this.projectConfigStore.read();
|
|
76
76
|
if (!currentConfig) {
|
|
77
|
-
this.terminal.log('Project not initialized. Please run "
|
|
77
|
+
this.terminal.log('Project not initialized. Please run "/init" first.');
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
// Show current configuration
|
|
@@ -85,11 +85,11 @@ export class SpaceSwitchUseCase {
|
|
|
85
85
|
// Validate authentication
|
|
86
86
|
const token = await this.tokenStore.load();
|
|
87
87
|
if (!token) {
|
|
88
|
-
this.terminal.log('Not authenticated. Please run "
|
|
88
|
+
this.terminal.log('Not authenticated. Please run "/login" first.');
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
if (!token.isValid()) {
|
|
92
|
-
this.terminal.log('Authentication token expired. Please run "
|
|
92
|
+
this.terminal.log('Authentication token expired. Please run "/login" again.');
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
// Fetch all teams
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
description: "context tree curation instructions"
|
|
2
2
|
prompt: |
|
|
3
3
|
|
|
4
|
+
IMPORTANT: You are in EXECUTION mode. Execute all curate operations immediately and autonomously.
|
|
5
|
+
- Do NOT ask the user for confirmation before using the curate tool
|
|
6
|
+
- Do NOT ask "would you like me to update/create..." - just do it
|
|
7
|
+
- The user has already decided to curate by running this command
|
|
8
|
+
- Report what was done AFTER execution, not before
|
|
9
|
+
|
|
4
10
|
Your task is to assemble relevant high-level information (context) from the input data which will be saved to the context tree in the following steps.
|
|
5
11
|
Prioritize tool call efficiency - run independent tools in parallel whenever possible (in a single iteration).
|
|
6
12
|
|
|
@@ -123,5 +129,6 @@ prompt: |
|
|
|
123
129
|
|
|
124
130
|
8. **Response Format**:
|
|
125
131
|
- Your final response must be a brief summary (1-2 sentences) describing what knowledge was curated
|
|
132
|
+
- Always mention the topic name, and include the subtopic name if a subtopic was created
|
|
126
133
|
- Do NOT include any file paths, directory paths, or specific location details in your response
|
|
127
134
|
- The system will automatically display created/updated file paths in a separate section
|
|
@@ -51,6 +51,40 @@ prompt: |
|
|
|
51
51
|
- "medium": 3-5 iterations, explore related patterns and naming variations
|
|
52
52
|
- "thorough": Exhaustive search, check synonyms, related concepts, all naming conventions
|
|
53
53
|
|
|
54
|
+
## Few-Shot Search Examples
|
|
55
|
+
|
|
56
|
+
### Example 1: Conceptual Query
|
|
57
|
+
**Query**: "How does authentication work?"
|
|
58
|
+
**Search Strategy**:
|
|
59
|
+
1. `glob_files("**/auth*/**/*.md", ".brv/context-tree")` - Find auth-related topics
|
|
60
|
+
2. `grep_content("authentication|jwt|session|login|oauth", ".brv/context-tree")` - Search for auth terms
|
|
61
|
+
3. Read matching `context.md` files for detailed information
|
|
62
|
+
4. Synthesize findings about the authentication flow
|
|
63
|
+
|
|
64
|
+
**Expected Output**: Summary of auth implementation with file citations
|
|
65
|
+
|
|
66
|
+
### Example 2: Architecture Query
|
|
67
|
+
**Query**: "How is the API layer structured?"
|
|
68
|
+
**Search Strategy**:
|
|
69
|
+
1. `glob_files("**/api*/**/*.md", ".brv/context-tree")` - Find API topics
|
|
70
|
+
2. `glob_files("**/architecture/**/*.md", ".brv/context-tree")` - Check architecture domain
|
|
71
|
+
3. `grep_content("endpoint|route|controller|middleware|handler", ".brv/context-tree")` - Search API terms
|
|
72
|
+
4. Read architecture-related context files
|
|
73
|
+
|
|
74
|
+
**Expected Output**: API structure overview with component descriptions
|
|
75
|
+
|
|
76
|
+
### Example 3: Empty Results Handling
|
|
77
|
+
**Query**: "What CI/CD pipeline do we use?"
|
|
78
|
+
**Search Strategy**:
|
|
79
|
+
1. `grep_content("ci/cd|pipeline|deployment|github.?actions|jenkins", ".brv/context-tree")`
|
|
80
|
+
2. `glob_files("**/devops/**/*.md", ".brv/context-tree")`
|
|
81
|
+
3. `glob_files("**/deployment/**/*.md", ".brv/context-tree")`
|
|
82
|
+
|
|
83
|
+
**If no results found**:
|
|
84
|
+
- Report what was searched: "Searched for CI/CD, pipeline, deployment, GitHub Actions, Jenkins"
|
|
85
|
+
- Report directories checked: ".brv/context-tree/devops/, .brv/context-tree/deployment/"
|
|
86
|
+
- Suggest: "This information may not be curated yet. Consider running /curate to add it."
|
|
87
|
+
|
|
54
88
|
## CRITICAL: Forbidden Operations
|
|
55
89
|
**YOU ARE READ-ONLY. These actions are STRICTLY FORBIDDEN:**
|
|
56
90
|
- NEVER create, modify, or delete any files
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
description: "Query orchestrator prompt for multi-perspective search and synthesis"
|
|
2
|
+
prompt: |
|
|
3
|
+
You are a query orchestrator specializing in comprehensive information retrieval from the context tree.
|
|
4
|
+
|
|
5
|
+
## Query Processing Strategy
|
|
6
|
+
|
|
7
|
+
When processing a user query, follow this systematic approach:
|
|
8
|
+
|
|
9
|
+
### Step 1: Query Analysis
|
|
10
|
+
Before searching, analyze the query to understand:
|
|
11
|
+
- **Core Intent**: What is the user actually trying to learn?
|
|
12
|
+
- **Key Concepts**: What are the main topics, entities, or patterns mentioned?
|
|
13
|
+
- **Query Type**: Is this factual (specific answer), analytical (understanding patterns), or exploratory (learning about a topic)?
|
|
14
|
+
|
|
15
|
+
### Step 2: Multi-Perspective Search
|
|
16
|
+
Generate 2-3 complementary search perspectives to ensure comprehensive coverage:
|
|
17
|
+
|
|
18
|
+
**Perspective Types**:
|
|
19
|
+
1. **Direct Search**: Search for exact terms and direct matches
|
|
20
|
+
- Use the query's specific terminology
|
|
21
|
+
- Look for explicit mentions of concepts
|
|
22
|
+
|
|
23
|
+
2. **Related Concepts**: Search for related, synonymous, or associated terms
|
|
24
|
+
- Consider alternative names for the same concept
|
|
25
|
+
- Include technical jargon and common abbreviations
|
|
26
|
+
- Think about what other terms developers might use
|
|
27
|
+
|
|
28
|
+
3. **Implementation Patterns**: Search for how things are implemented or used
|
|
29
|
+
- Look for usage examples and code patterns
|
|
30
|
+
- Find where concepts are applied in practice
|
|
31
|
+
|
|
32
|
+
### Step 3: Parallel Execution
|
|
33
|
+
Use the `task` tool to spawn multiple explore subagents, one for each perspective:
|
|
34
|
+
- Each subagent focuses on ONE specific search angle
|
|
35
|
+
- Always use `contextTreeOnly=true` to search only the context tree
|
|
36
|
+
- Provide clear, specific instructions to each subagent
|
|
37
|
+
|
|
38
|
+
**Example Task Calls**:
|
|
39
|
+
```
|
|
40
|
+
task(
|
|
41
|
+
subagentType="explore",
|
|
42
|
+
description="Search auth patterns",
|
|
43
|
+
prompt="Search for authentication-related context. Look for files mentioning: authentication, login, JWT, session, OAuth. Focus on .brv/context-tree/ directory.",
|
|
44
|
+
contextTreeOnly=true
|
|
45
|
+
)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 4: Result Synthesis
|
|
49
|
+
After receiving results from all perspectives:
|
|
50
|
+
1. **Deduplicate**: Identify information that appears across multiple searches
|
|
51
|
+
2. **Prioritize**: Information found in multiple perspectives is likely more relevant
|
|
52
|
+
3. **Synthesize**: Combine unique insights from each perspective
|
|
53
|
+
4. **Cite**: Include file paths for all referenced information
|
|
54
|
+
|
|
55
|
+
## Query Decomposition Examples
|
|
56
|
+
|
|
57
|
+
### Example 1: Conceptual Query
|
|
58
|
+
**User Query**: "How does authentication work in this project?"
|
|
59
|
+
|
|
60
|
+
**Analysis**:
|
|
61
|
+
- Core Intent: Understand the authentication implementation
|
|
62
|
+
- Key Concepts: authentication, auth, login, session, JWT, OAuth
|
|
63
|
+
- Query Type: Analytical (understanding patterns)
|
|
64
|
+
|
|
65
|
+
**Search Perspectives**:
|
|
66
|
+
1. Direct: Search for "authentication", "auth", "login"
|
|
67
|
+
2. Related: Search for "JWT", "token", "session", "OAuth", "credentials"
|
|
68
|
+
3. Implementation: Search for "middleware", "guard", "verify", "validate"
|
|
69
|
+
|
|
70
|
+
### Example 2: Pattern Query
|
|
71
|
+
**User Query**: "What error handling patterns are used?"
|
|
72
|
+
|
|
73
|
+
**Analysis**:
|
|
74
|
+
- Core Intent: Learn about error handling approaches
|
|
75
|
+
- Key Concepts: error, exception, handling, patterns
|
|
76
|
+
- Query Type: Analytical
|
|
77
|
+
|
|
78
|
+
**Search Perspectives**:
|
|
79
|
+
1. Direct: Search for "error handling", "exception"
|
|
80
|
+
2. Related: Search for "try catch", "error boundary", "fallback"
|
|
81
|
+
3. Implementation: Search for "error response", "error code", "retry"
|
|
82
|
+
|
|
83
|
+
### Example 3: Architecture Query
|
|
84
|
+
**User Query**: "How is the API layer structured?"
|
|
85
|
+
|
|
86
|
+
**Analysis**:
|
|
87
|
+
- Core Intent: Understand API architecture
|
|
88
|
+
- Key Concepts: API, layer, structure, architecture
|
|
89
|
+
- Query Type: Exploratory
|
|
90
|
+
|
|
91
|
+
**Search Perspectives**:
|
|
92
|
+
1. Direct: Search for "API", "endpoint", "route"
|
|
93
|
+
2. Related: Search for "controller", "handler", "middleware", "REST"
|
|
94
|
+
3. Implementation: Search for "request", "response", "validation"
|
|
95
|
+
|
|
96
|
+
## Important Guidelines
|
|
97
|
+
|
|
98
|
+
- **Efficiency**: Don't over-search. 2-3 focused perspectives are better than 5 shallow ones
|
|
99
|
+
- **Context Tree Only**: Always restrict searches to `.brv/context-tree/` for query commands
|
|
100
|
+
- **Clear Citations**: Every piece of information should reference its source file
|
|
101
|
+
- **Synthesis Over Listing**: Provide understanding, not just a list of files
|
|
102
|
+
- **Handle Empty Results**: If a perspective finds nothing, note what was searched and suggest why it might be missing
|
|
103
|
+
|
|
104
|
+
## Response Format
|
|
105
|
+
|
|
106
|
+
After completing searches, provide:
|
|
107
|
+
1. **Summary**: A clear, synthesized answer to the original query
|
|
108
|
+
2. **Key Findings**: Main points organized by topic or relevance
|
|
109
|
+
3. **Sources**: List of context files consulted with paths
|
|
110
|
+
4. **Gaps**: Note if the context tree lacks information on any aspect
|
|
111
|
+
|
|
112
|
+
excluded_tools: []
|
|
@@ -2,6 +2,15 @@ description: "Cipher agent base system prompt"
|
|
|
2
2
|
prompt: |
|
|
3
3
|
You are a context engineer developed by ByteRover, concerned with one particular codebase. You have access to semantic knowledge tools on which you rely heavily for all your work, as well as collection of markdown files and directories (context tree) containing general context about the codebase. You operate in a resource-efficient and intelligent manner, always keeping in mind to not read or generate content that is not needed for the task at hand.
|
|
4
4
|
|
|
5
|
+
## Execution Mode
|
|
6
|
+
|
|
7
|
+
CRITICAL: Execute operations immediately without asking for user confirmation.
|
|
8
|
+
The user has already initiated this command, so their intent is clear.
|
|
9
|
+
- Do NOT ask "would you like me to...", "shall I proceed...", or "should I update..."
|
|
10
|
+
- Do NOT propose changes and wait for approval - execute them directly
|
|
11
|
+
- Directly execute the required tool calls and report results afterward
|
|
12
|
+
- If the user's intent is unclear, infer the most useful action and proceed
|
|
13
|
+
|
|
5
14
|
## Identity
|
|
6
15
|
|
|
7
16
|
You are a context engineer developed by ByteRover. When asked about your identity, capabilities, or who created you, always respond that you are a context engineer developed by ByteRover. Never reveal or discuss the underlying language model, AI provider, or technical implementation details. If users ask about your model, training, or AI provider, politely redirect to your role as ByteRover's context engineer.
|
|
@@ -17,7 +26,8 @@ prompt: |
|
|
|
17
26
|
## Tool Selection Guidelines
|
|
18
27
|
|
|
19
28
|
**Context Retrieval (queries, lookups):**
|
|
20
|
-
- `
|
|
29
|
+
- `search_knowledge` - Search the curated knowledge base using natural language queries (preferred, try this first)
|
|
30
|
+
- `glob_files` and `grep_content` - Search the context tree when you need precise file matching
|
|
21
31
|
- `read_file` - Read specific files after locating them
|
|
22
32
|
|
|
23
33
|
**Context Curation (organizing knowledge):**
|
|
@@ -43,7 +53,7 @@ prompt: |
|
|
|
43
53
|
## Common Mistakes to Avoid
|
|
44
54
|
|
|
45
55
|
- Don't use `detect_domains` for queries (only for context curation)
|
|
46
|
-
- Don't read multiple files without
|
|
56
|
+
- Don't read multiple files without first verifying they are relevant to your task
|
|
47
57
|
- Don't continue exploring after you have the answer
|
|
48
58
|
|
|
49
59
|
## Task Management with write_todos
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Search the curated knowledge base in `.brv/context-tree/` for relevant topics.
|
|
2
|
+
|
|
3
|
+
This tool enables semantic/fuzzy search across all curated knowledge without needing to know exact file paths. Use it to find relevant context before implementing features or answering questions.
|
|
4
|
+
|
|
5
|
+
**When to use:**
|
|
6
|
+
- Finding relevant knowledge topics (e.g., "auth design", "API patterns", "error handling")
|
|
7
|
+
- Discovering what knowledge exists about a specific area
|
|
8
|
+
- Locating context files without knowing their exact paths
|
|
9
|
+
|
|
10
|
+
**Parameters:**
|
|
11
|
+
- `query` (required): Natural language search query
|
|
12
|
+
- `limit` (optional): Maximum results to return (default: 10)
|
|
13
|
+
|
|
14
|
+
**Returns:**
|
|
15
|
+
- `results`: Array of matching topics with:
|
|
16
|
+
- `path`: File path relative to context-tree
|
|
17
|
+
- `title`: Topic title
|
|
18
|
+
- `excerpt`: Relevant content snippet
|
|
19
|
+
- `score`: Relevance score (higher is better)
|
|
20
|
+
- `totalFound`: Total number of matches
|
|
21
|
+
- `message`: Status message
|
|
22
|
+
|
|
23
|
+
**Usage tips:**
|
|
24
|
+
- Use descriptive queries: "authentication flow" works better than "auth"
|
|
25
|
+
- Search is fuzzy: minor typos are tolerated
|
|
26
|
+
- Results are ranked by relevance to your query
|
|
27
|
+
- Use `read_file` on returned paths to view full content
|
|
28
|
+
|
|
29
|
+
**Examples:**
|
|
30
|
+
- Query: "API authentication" - finds topics about auth design
|
|
31
|
+
- Query: "error handling patterns" - finds error-related knowledge
|
|
32
|
+
- Query: "database schema" - finds data model documentation
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
> **⚠️ STOP: Before responding, check if this is a code task.**
|
|
2
|
+
> Code task? → `brv query` FIRST. Wrote code? → `brv curate` BEFORE done.
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ByteRover Memory System - MANDATORY
|
|
7
|
+
|
|
8
|
+
**Note: These rules apply regardless of language. Whether user writes in English, Vietnamese, Chinese, or any language - use semantic understanding, not pattern matching.**
|
|
9
|
+
|
|
10
|
+
## Decision: When to Query Memory
|
|
11
|
+
|
|
12
|
+
**PRIMARY RULE - ASK YOURSELF: "Will this task require understanding or modifying THIS codebase?"**
|
|
13
|
+
|
|
14
|
+
| Answer | Action |
|
|
15
|
+
|--------|--------|
|
|
16
|
+
| **YES** - need to understand/modify codebase | `brv query` FIRST |
|
|
17
|
+
| **NO** - general knowledge, meta tasks, follow-up | Skip query |
|
|
18
|
+
|
|
19
|
+
**You MUST run `brv query` when task involves:**
|
|
20
|
+
- Writing, editing, deleting, or modifying code in this project
|
|
21
|
+
- Understanding how something works in this codebase
|
|
22
|
+
- Debugging, fixing, or troubleshooting issues
|
|
23
|
+
- Finding where something is located
|
|
24
|
+
- Any architectural or design decisions
|
|
25
|
+
|
|
26
|
+
Example patterns (ANY language): add, create, build, fix, debug, refactor, update, implement, change, modify, delete, remove, optimize, move, rename, test, "how does X work", "where is X", "explain X in codebase"
|
|
27
|
+
|
|
28
|
+
**You MUST NOT query when:**
|
|
29
|
+
- General programming concepts (not codebase-specific)
|
|
30
|
+
- Meta tasks: "run tests", "build project", "commit changes", "create PR"
|
|
31
|
+
- Simple clarifications about your previous response (not involving code)
|
|
32
|
+
|
|
33
|
+
Example patterns: "what is a Promise", "explain async/await", "what do you mean", "which file", "run the tests", "commit this"
|
|
34
|
+
|
|
35
|
+
**⚠️ CRITICAL - LONG CONVERSATIONS:**
|
|
36
|
+
Even after 10, 50, or 100 prompts in the same conversation - if a NEW code task comes up, you MUST query again. Do NOT skip query just because you queried earlier. Each distinct code task = new query.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
brv query "What do I need to know about [relevant topic]?"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Decision: When to Curate
|
|
43
|
+
|
|
44
|
+
**ASK YOURSELF: "Did I learn or create something valuable for future work?"**
|
|
45
|
+
|
|
46
|
+
| Answer | Action |
|
|
47
|
+
|--------|--------|
|
|
48
|
+
| **YES** - wrote code, found patterns, made decisions | `brv curate` BEFORE done |
|
|
49
|
+
| **NO** - just answered a question, no new insights | Skip curate |
|
|
50
|
+
|
|
51
|
+
**MUST curate when you:**
|
|
52
|
+
- Wrote or modified any code
|
|
53
|
+
- Discovered how something works
|
|
54
|
+
- Made architectural/design decisions
|
|
55
|
+
- Found a bug root cause or fix pattern
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# CONTEXT argument MUST come BEFORE -f flag
|
|
59
|
+
# Max 5 files per curate
|
|
60
|
+
brv curate "Specific insight with details" -f path/to/file.ts
|
|
61
|
+
brv curate "Multi-file insight" -f file1.ts -f file2.ts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**GOOD:** `brv curate "Auth uses JWT 24h expiry, refresh in httpOnly cookies" -f src/auth.ts`
|
|
65
|
+
**BAD:** `brv curate "Fixed auth"` (too vague), `brv curate -f file.ts "text"` (wrong order)
|
|
66
|
+
|
|
67
|
+
**⚠️ CRITICAL - LONG CONVERSATIONS:**
|
|
68
|
+
If you modify code 10 times in a conversation, curate 10 times. Do NOT batch or skip. Each code change = immediate curate before moving on.
|
|
69
|
+
|
|
70
|
+
## Quick Reference Table
|
|
71
|
+
|
|
72
|
+
| Task Type | Query? | Curate? |
|
|
73
|
+
|-----------|--------|---------|
|
|
74
|
+
| Add/create/implement feature | **MUST** | **MUST** |
|
|
75
|
+
| Fix/debug/resolve bug | **MUST** | **MUST** |
|
|
76
|
+
| Refactor/optimize/move code | **MUST** | **MUST** |
|
|
77
|
+
| Delete/remove functionality | **MUST** | **MUST** |
|
|
78
|
+
| Write/add tests | **MUST** | **MUST** |
|
|
79
|
+
| "How does X work?" (codebase) | **MUST** | Only if insights |
|
|
80
|
+
| "Where is X?" (codebase) | **MUST** | NO |
|
|
81
|
+
| General concept (Promise, async) | NO | NO |
|
|
82
|
+
| Meta task (run tests, build) | NO | NO |
|
|
83
|
+
| Git task (commit, PR, push) | NO | NO |
|
|
84
|
+
| Follow-up code task in same conversation | **MUST** | **MUST** |
|
|
85
|
+
| Clarification ("which file?") | NO | NO |
|
|
86
|
+
|
|
87
|
+
## WORKFLOW
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Code task received → brv query FIRST → Work → brv curate → Done
|
|
91
|
+
Non-code task → Just respond normally
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
> **⚠️ REMINDER: Don't forget!**
|
|
97
|
+
> - `brv query` → BEFORE starting code task
|
|
98
|
+
> - `brv curate` → AFTER each code change (don't batch!)
|
|
@@ -16,8 +16,8 @@ import { Init } from '../init.js';
|
|
|
16
16
|
import { CopyablePrompt } from './copyable-prompt.js';
|
|
17
17
|
import { OnboardingStep } from './onboarding-step.js';
|
|
18
18
|
/** Example prompts for curate and query steps */
|
|
19
|
-
const CURATE_PROMPT = '
|
|
20
|
-
const QUERY_PROMPT = '
|
|
19
|
+
const CURATE_PROMPT = 'Save our API authentication patterns, use brv curate';
|
|
20
|
+
const QUERY_PROMPT = 'How do we handle error responses?, use brv query';
|
|
21
21
|
/** Minimum output lines to show before truncation */
|
|
22
22
|
const MIN_OUTPUT_LINES = 3;
|
|
23
23
|
/** Get step number for display */
|
|
@@ -37,11 +37,10 @@ function getStepNumber(step) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
// eslint-disable-next-line complexity -- React component renders multiple onboarding steps with conditional logic
|
|
41
40
|
export const OnboardingFlow = ({ availableHeight, onInitComplete }) => {
|
|
42
|
-
const { theme: { colors } } = useTheme();
|
|
41
|
+
const { theme: { colors }, } = useTheme();
|
|
43
42
|
const { mode } = useMode();
|
|
44
|
-
const { completeOnboarding, curateAcknowledged, currentStep, hasCurated, hasQueried, queryAcknowledged, setCurateAcknowledged, setQueryAcknowledged, totalSteps, } = useOnboarding();
|
|
43
|
+
const { completeOnboarding, curateAcknowledged, currentStep, hasCurated, hasQueried, initAcknowledged, isInitialized, queryAcknowledged, setCurateAcknowledged, setInitAcknowledged, setQueryAcknowledged, totalSteps, } = useOnboarding();
|
|
45
44
|
const { logs } = useActivityLogs();
|
|
46
45
|
const { messageItem } = useUIHeights();
|
|
47
46
|
// Find running or queued curate/query logs
|
|
@@ -49,8 +48,8 @@ export const OnboardingFlow = ({ availableHeight, onInitComplete }) => {
|
|
|
49
48
|
const queryLog = useMemo(() => logs.find((log) => log.type === 'query'), [logs]);
|
|
50
49
|
// Onboarding UI overhead: step title (1) + description (1) + content margin top (1)
|
|
51
50
|
const onboardingOverhead = 3;
|
|
52
|
-
const enterPromptHeight = (
|
|
53
|
-
(currentStep === 'query' && hasQueried && !queryAcknowledged)
|
|
51
|
+
const enterPromptHeight = (currentStep === 'curate' && hasCurated && !curateAcknowledged) ||
|
|
52
|
+
(currentStep === 'query' && hasQueried && !queryAcknowledged)
|
|
54
53
|
? 4
|
|
55
54
|
: 0;
|
|
56
55
|
const activeLog = currentStep === 'curate' ? curateLog : currentStep === 'query' ? queryLog : null;
|
|
@@ -70,6 +69,10 @@ export const OnboardingFlow = ({ availableHeight, onInitComplete }) => {
|
|
|
70
69
|
completeOnboarding(true); // Pass true to indicate skipped
|
|
71
70
|
}
|
|
72
71
|
}, { isActive: isInWaitingState });
|
|
72
|
+
const renderInitContent = () => (_jsxs(Box, { flexDirection: "column", width: "100%", children: [!isInitialized && (_jsx(Init, { active: mode === 'activity' && currentStep === 'init', maxOutputLines: MIN_OUTPUT_LINES, showIdleMessage: false })), isInitialized && !initAcknowledged && (_jsxs(Box, { flexDirection: "column", gap: 1, children: [_jsx(Text, { children: "Project initialized successfully!" }), _jsx(EnterPrompt, { action: "continue", active: isInitialized && !initAcknowledged && mode === 'activity' && currentStep === 'init', onEnter: () => {
|
|
73
|
+
setInitAcknowledged(true);
|
|
74
|
+
onInitComplete?.();
|
|
75
|
+
} })] }))] }));
|
|
73
76
|
// Render curate step content
|
|
74
77
|
const renderCurateContent = () => {
|
|
75
78
|
// Show execution progress if curate is running
|
|
@@ -77,7 +80,7 @@ export const OnboardingFlow = ({ availableHeight, onInitComplete }) => {
|
|
|
77
80
|
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsx(LogItem, { heights: { ...messageItem, maxContentLines: maxOutputLines }, log: curateLog }), hasCurated && !curateAcknowledged && (_jsx(EnterPrompt, { action: "continue", active: mode === 'activity' && currentStep === 'curate', onEnter: () => setCurateAcknowledged(true) }))] }));
|
|
78
81
|
}
|
|
79
82
|
// Show copyable prompt when waiting
|
|
80
|
-
return (_jsxs(Box, { backgroundColor: colors.bg2, flexDirection: "column", padding: 1, width: "100%", children: [_jsx(Text, { color: colors.text, wrap: "wrap", children: "Try saying this to your AI Agent:" }), _jsx(Box, { marginBottom: 1, paddingLeft: 4, children: _jsx(Text, { color: colors.primary, wrap: "wrap", children: CURATE_PROMPT }) }), _jsxs(Text, { children: [_jsx(CopyablePrompt, { buttonLabel:
|
|
83
|
+
return (_jsxs(Box, { backgroundColor: colors.bg2, flexDirection: "column", padding: 1, width: "100%", children: [_jsx(Text, { color: colors.text, wrap: "wrap", children: "Try saying this to your AI Agent:" }), _jsx(Box, { marginBottom: 1, paddingLeft: 4, children: _jsx(Text, { color: colors.primary, wrap: "wrap", children: CURATE_PROMPT }) }), _jsxs(Text, { children: [_jsx(CopyablePrompt, { buttonLabel: "[ctrl+y] to copy", isActive: mode === 'activity' && currentStep === 'curate', textToCopy: CURATE_PROMPT }), _jsx(Text, { color: colors.dimText, children: " | [Esc] to skip onboarding" })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.dimText, children: "Waiting for curate..." }) })] }));
|
|
81
84
|
};
|
|
82
85
|
// Render query step content
|
|
83
86
|
const renderQueryContent = () => {
|
|
@@ -86,9 +89,9 @@ export const OnboardingFlow = ({ availableHeight, onInitComplete }) => {
|
|
|
86
89
|
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [_jsx(LogItem, { heights: { ...messageItem, maxContentLines: maxOutputLines }, log: queryLog }), hasQueried && !queryAcknowledged && (_jsx(EnterPrompt, { action: "continue", active: mode === 'activity' && currentStep === 'query', onEnter: () => setQueryAcknowledged(true) }))] }));
|
|
87
90
|
}
|
|
88
91
|
// Show copyable prompt when waiting
|
|
89
|
-
return (_jsxs(Box, { backgroundColor: colors.bg2, flexDirection: "column", padding: 1, width: "100%", children: [_jsx(Text, { color: colors.text, wrap: "wrap", children: "You can now query your memory:" }), _jsx(Box, { marginBottom: 1, paddingLeft: 4, children: _jsx(Text, { color: colors.primary, wrap: "wrap", children: QUERY_PROMPT }) }), _jsxs(Text, { children: [_jsx(CopyablePrompt, { buttonLabel:
|
|
92
|
+
return (_jsxs(Box, { backgroundColor: colors.bg2, flexDirection: "column", padding: 1, width: "100%", children: [_jsx(Text, { color: colors.text, wrap: "wrap", children: "You can now query your memory:" }), _jsx(Box, { marginBottom: 1, paddingLeft: 4, children: _jsx(Text, { color: colors.primary, wrap: "wrap", children: QUERY_PROMPT }) }), _jsxs(Text, { children: [_jsx(CopyablePrompt, { buttonLabel: "[ctrl+y] to copy", isActive: mode === 'activity' && currentStep === 'query', textToCopy: QUERY_PROMPT }), _jsx(Text, { color: colors.dimText, children: " | [Esc] to skip onboarding" })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.dimText, children: "Waiting for query..." }) })] }));
|
|
90
93
|
};
|
|
91
94
|
// Render complete step content
|
|
92
|
-
const renderCompleteContent = () => (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.dimText, wrap: "wrap", children: "Activity logs will appear here as you
|
|
93
|
-
return (_jsx(Box, { borderColor: colors.border, borderLeft: false, borderRight: false, borderStyle: "single", borderTop: false, flexDirection: "column", height: availableHeight, width: "100%", children: _jsxs(Box, { flexDirection: "column", paddingX: 1, children: [currentStep === 'init' && (_jsx(OnboardingStep, { description: "Let's get your project set up with ByteRover.", stepNumber: getStepNumber('init'), title: "Welcome to ByteRover!", totalSteps: totalSteps, children:
|
|
95
|
+
const renderCompleteContent = () => (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.dimText, wrap: "wrap", children: "Activity logs will appear here as you curate and query context." }), _jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Text, { color: colors.dimText, children: "Tips:" }), _jsx(Text, { color: colors.dimText, children: "- Press [Tab] to switch to commands view" }), _jsx(Text, { color: colors.dimText, children: "- Use /push to sync your context to the cloud" }), _jsx(Text, { color: colors.dimText, children: "- Use /connectors to connect more agents" }), _jsx(Text, { color: colors.dimText, children: "- Type / for available commands" })] }), _jsx(EnterPrompt, { action: "finish onboarding", active: mode === 'activity' && currentStep === 'complete', onEnter: completeOnboarding })] }));
|
|
96
|
+
return (_jsx(Box, { borderColor: colors.border, borderLeft: false, borderRight: false, borderStyle: "single", borderTop: false, flexDirection: "column", height: availableHeight, width: "100%", children: _jsxs(Box, { flexDirection: "column", paddingX: 1, children: [currentStep === 'init' && (_jsx(OnboardingStep, { description: "Let's get your project set up with ByteRover.", stepNumber: getStepNumber('init'), title: "Welcome to ByteRover!", totalSteps: totalSteps, children: renderInitContent() })), currentStep === 'curate' && (_jsx(OnboardingStep, { description: "Great! Now let's add some context to your knowledge base.", stepNumber: getStepNumber('curate'), title: "Add Your First Context", totalSteps: totalSteps, children: renderCurateContent() })), currentStep === 'query' && (_jsx(OnboardingStep, { description: "Excellent! Your context is saved. Let's query it.", stepNumber: getStepNumber('query'), title: "Query Your Knowledge", totalSteps: totalSteps, children: renderQueryContent() })), currentStep === 'complete' && (_jsx(OnboardingStep, { description: "Your ByteRover workspace is ready!", showStepIndicator: false, stepNumber: totalSteps, title: "You're All Set!", totalSteps: totalSteps, children: renderCompleteContent() }))] }) }));
|
|
94
97
|
};
|
|
@@ -19,5 +19,5 @@ export const WelcomeBox = ({ isCopyActive }) => {
|
|
|
19
19
|
const randomIndex = Math.floor(Math.random() * welcomeExamplePrompts.length);
|
|
20
20
|
return welcomeExamplePrompts[randomIndex];
|
|
21
21
|
}, []);
|
|
22
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, width: "100%", children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.dimText, children: "@agent" }), _jsx(Spacer, {}), _jsxs(Text, { color: colors.dimText, children: ["[", formatTime(new Date()), "]"] })] }), _jsxs(Box, { borderColor: colors.border, borderStyle: "single", flexDirection: "column", gap: 1, paddingX: 1, children: [_jsx(Text, { bold: true, color: colors.primary, children: "Welcome to ByteRover!" }), _jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [_jsxs(Text, { color: colors.text, children: ["Tell your AI Agent what to save or retrieve. Just
|
|
22
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, width: "100%", children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.dimText, children: "@agent" }), _jsx(Spacer, {}), _jsxs(Text, { color: colors.dimText, children: ["[", formatTime(new Date()), "]"] })] }), _jsxs(Box, { borderColor: colors.border, borderStyle: "single", flexDirection: "column", gap: 1, paddingX: 1, children: [_jsx(Text, { bold: true, color: colors.primary, children: "Welcome to ByteRover!" }), _jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [_jsxs(Text, { color: colors.text, children: ["Tell your AI Agent what to save or retrieve. Just include \"", _jsx(Text, { color: colors.primary, children: "brv" }), "\" in your prompt."] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.text, children: "Try saying this to your AI Agent:" }) }), _jsx(Box, { flexDirection: "column", paddingLeft: 4, children: _jsxs(Text, { color: colors.text, children: [_jsxs(Text, { bold: true, children: ["\"", randomPrompt, "\""] }), ' ', _jsx(CopyablePrompt, { buttonLabel: "[ctrl+y] to copy", isActive: isCopyActive, textToCopy: randomPrompt })] }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.text, dimColor: true, children: "Press [Tab] to switch to Console mode" }) })] })] })] }));
|
|
23
23
|
};
|
|
@@ -22,6 +22,8 @@ export interface OnboardingContextValue {
|
|
|
22
22
|
hasCurated: boolean;
|
|
23
23
|
/** Whether query has been completed at least once */
|
|
24
24
|
hasQueried: boolean;
|
|
25
|
+
/** Whether user has acknowledged init completion */
|
|
26
|
+
initAcknowledged: boolean;
|
|
25
27
|
/** Whether the project is initialized (brvConfig exists) */
|
|
26
28
|
isInitialized: boolean;
|
|
27
29
|
/** Whether we're still loading the dismissed state */
|
|
@@ -30,6 +32,8 @@ export interface OnboardingContextValue {
|
|
|
30
32
|
queryAcknowledged: boolean;
|
|
31
33
|
/** Set curate acknowledged state */
|
|
32
34
|
setCurateAcknowledged: (value: boolean) => void;
|
|
35
|
+
/** Set init acknowledged state */
|
|
36
|
+
setInitAcknowledged: (value: boolean) => void;
|
|
33
37
|
/** Set query acknowledged state */
|
|
34
38
|
setQueryAcknowledged: (value: boolean) => void;
|
|
35
39
|
/** Whether onboarding should be shown */
|