Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JURIKO CLI Configuration
# KALICODE CLI Configuration
# Copy this file to .env and fill in your values

# Multi-LLM Provider Support
Expand All @@ -14,11 +14,11 @@ OPENAI_API_KEY=your_openai_api_key_here
GROK_API_KEY=your_grok_api_key_here

# Alternative environment variable names (also supported)
# JURIKO_ANTHROPIC_API_KEY=your_anthropic_api_key_here
# JURIKO_OPENAI_API_KEY=your_openai_api_key_here
# JURIKO_GROK_API_KEY=your_grok_api_key_here
# KALICODE_ANTHROPIC_API_KEY=your_anthropic_api_key_here
# KALICODE_OPENAI_API_KEY=your_openai_api_key_here
# KALICODE_GROK_API_KEY=your_grok_api_key_here

# Legacy support (for backward compatibility)
# JURIKO_API_KEY=your_grok_api_key_here
# JURIKO_BASE_URL=https://api.x.ai/v1
# JURIKO_MODEL=grok-4-latest
# KALICODE_API_KEY=your_grok_api_key_here
# KALICODE_BASE_URL=https://api.x.ai/v1
# KALICODE_MODEL=grok-4-latest
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Code Reference System**: Clickable file references with VSCode integration
- `--enable-code-references`: Enable clickable file references (default: enabled)
- `--disable-code-references`: Disable clickable file references
- `JURIKO_ENABLE_CODE_REFERENCES`: Environment variable to control code references
- `KALICODE_ENABLE_CODE_REFERENCES`: Environment variable to control code references
- **CodeReferenceManager**: Intelligent file reference detection and link generation
- **VSCode Integration**: Direct navigation to files and specific line numbers
- **Automatic Enhancement**: Tool outputs automatically include clickable references
Expand All @@ -35,7 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Multi-Tool Batching**: Parallel execution of independent tools for improved performance
- `--enable-batching`: Enable parallel execution of independent tools
- `--disable-batching`: Disable parallel execution (use sequential execution)
- `JURIKO_ENABLE_BATCHING`: Environment variable to control batching
- `KALICODE_ENABLE_BATCHING`: Environment variable to control batching
- **BatchToolExecutor**: Intelligent tool dependency analysis and parallel execution
- **Performance Improvements**: Up to 40% faster execution when multiple independent tools are used
- **Smart Dependency Detection**: Automatic categorization of tools by type (read/write/compute/network/bash)
Expand Down Expand Up @@ -108,8 +108,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Markdown Enhancement: Enhanced code blocks with reference links
- CLI Flag: `--enable-code-references` for beta feature control
- **User Configuration System**: Persistent user settings management
- Persistent Settings: `~/.juriko/user-settings.json` for user preferences
- Settings Management: CLI commands (`juriko config show/set/reset`, `juriko settings`)
- Persistent Settings: `~/.kalicode/user-settings.json` for user preferences
- Settings Management: CLI commands (`kalicode config show/set/reset`, `kalicode settings`)
- Merge Protection: Fixed critical bug preventing data loss during setting updates
- Environment Overrides: Support for environment variable configuration
- **Security Enhancement Framework**: Comprehensive security validation and control
Expand All @@ -136,7 +136,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Enhanced
- **Token Management**: Extended token counter with model-specific limits and threshold monitoring
- **Agent System**: Enhanced JurikoAgent with automatic token monitoring and condensing capabilities
- **Agent System**: Enhanced KalicodeAgent with automatic token monitoring and condensing capabilities
- **Tool System**: Added condense tool with confirmation workflow integration
- **User Experience**: Clear visual feedback when condensing occurs with token count reduction display

Expand Down Expand Up @@ -170,7 +170,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Better user guidance during operations

### Enhanced
- **Input Handling**: Improved input handlers in both JurikoAgent and MultiLLMAgent modes
- **Input Handling**: Improved input handlers in both KalicodeAgent and MultiLLMAgent modes
- **User Experience**: Better visual feedback and control during long-running operations
- **Documentation**: Added comprehensive feature documentation in `docs/STOP_CONVERSATION_FEATURE.md`

Expand Down
56 changes: 28 additions & 28 deletions CONDENSE_THRESHOLD_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# JURIKO CLI - Condense Threshold Guide
# KALICODE CLI - Condense Threshold Guide

## Overview

JURIKO CLI includes an automatic conversation condensing feature that helps manage token usage by summarizing older parts of conversations when they approach the token limit. The condense threshold determines when this condensing is triggered.
KALICODE CLI includes an automatic conversation condensing feature that helps manage token usage by summarizing older parts of conversations when they approach the token limit. The condense threshold determines when this condensing is triggered.

## What is the Condense Threshold?

The condense threshold is a percentage value (0-100) that determines when JURIKO should automatically condense (summarize) the conversation to reduce token usage. When the conversation reaches this percentage of the model's token limit, JURIKO will:
The condense threshold is a percentage value (0-100) that determines when KALICODE should automatically condense (summarize) the conversation to reduce token usage. When the conversation reaches this percentage of the model's token limit, KALICODE will:

1. Summarize older messages in the conversation
2. Keep recent messages intact for context
Expand All @@ -22,19 +22,19 @@ The condense threshold is a percentage value (0-100) that determines when JURIKO

### 1. Environment Variable (Highest Priority)

Set the `JURIKO_CONDENSE_THRESHOLD` environment variable:
Set the `KALICODE_CONDENSE_THRESHOLD` environment variable:

```bash
# Set threshold to 80%
export JURIKO_CONDENSE_THRESHOLD=80
export KALICODE_CONDENSE_THRESHOLD=80

# Or run JURIKO with the environment variable
JURIKO_CONDENSE_THRESHOLD=80 juriko
# Or run KALICODE with the environment variable
KALICODE_CONDENSE_THRESHOLD=80 kalicode
```

### 2. User Settings File

The threshold is stored in `~/.juriko/user-settings.json`:
The threshold is stored in `~/.kalicode/user-settings.json`:

```json
{
Expand All @@ -61,10 +61,10 @@ await saveCondenseThreshold(85); // Set to 85%

## Configuration Priority

JURIKO checks for the condense threshold in this order:
KALICODE checks for the condense threshold in this order:

1. **Environment Variable**: `JURIKO_CONDENSE_THRESHOLD` (0-100)
2. **User Settings**: `~/.juriko/user-settings.json`
1. **Environment Variable**: `KALICODE_CONDENSE_THRESHOLD` (0-100)
2. **User Settings**: `~/.kalicode/user-settings.json`
3. **Default**: 75%

## Recommended Thresholds
Expand All @@ -88,7 +88,7 @@ JURIKO checks for the condense threshold in this order:

When the threshold is reached:

1. **Token Analysis**: JURIKO calculates current token usage vs. model limit
1. **Token Analysis**: KALICODE calculates current token usage vs. model limit
2. **Message Selection**: Identifies older messages for condensing
3. **Summarization**: Uses the AI model to create a concise summary
4. **Context Preservation**: Keeps recent messages and important context
Expand All @@ -100,16 +100,16 @@ When the threshold is reached:

```bash
# Terminal 1: Set for current session
export JURIKO_CONDENSE_THRESHOLD=70
juriko
export KALICODE_CONDENSE_THRESHOLD=70
kalicode

# Terminal 2: Set for single run
JURIKO_CONDENSE_THRESHOLD=85 juriko
KALICODE_CONDENSE_THRESHOLD=85 kalicode
```

### Manual User Settings File Edit

Edit `~/.juriko/user-settings.json`:
Edit `~/.kalicode/user-settings.json`:

```json
{
Expand All @@ -126,10 +126,10 @@ You can verify your current settings by examining the user settings file:

```bash
# View current settings
cat ~/.juriko/user-settings.json
cat ~/.kalicode/user-settings.json

# Check if environment variable is set
echo $JURIKO_CONDENSE_THRESHOLD
echo $KALICODE_CONDENSE_THRESHOLD
```

## Model-Specific Considerations
Expand All @@ -152,12 +152,12 @@ Different models have different token limits, which affects when condensing trig

### Issue: Settings not taking effect
**Check**:
1. Environment variable value: `echo $JURIKO_CONDENSE_THRESHOLD`
2. User settings file: `cat ~/.juriko/user-settings.json`
1. Environment variable value: `echo $KALICODE_CONDENSE_THRESHOLD`
2. User settings file: `cat ~/.kalicode/user-settings.json`
3. Valid range (0-100)

### Issue: Invalid threshold values
**Note**: JURIKO automatically clamps values to 0-100 range. Invalid values default to 75%.
**Note**: KALICODE automatically clamps values to 0-100 range. Invalid values default to 75%.

## Best Practices

Expand All @@ -178,12 +178,12 @@ You can create scripts to adjust thresholds based on context:
# Set different thresholds for different projects

if [[ "$PWD" == *"large-project"* ]]; then
export JURIKO_CONDENSE_THRESHOLD=85 # More context for complex projects
export KALICODE_CONDENSE_THRESHOLD=85 # More context for complex projects
else
export JURIKO_CONDENSE_THRESHOLD=70 # Less context for simple tasks
export KALICODE_CONDENSE_THRESHOLD=70 # Less context for simple tasks
fi

juriko
kalicode
```

### Project-Specific Configuration
Expand All @@ -192,14 +192,14 @@ Create project-specific threshold settings:

```bash
# In your project directory
echo 'export JURIKO_CONDENSE_THRESHOLD=80' > .jurikorc
source .jurikorc
juriko
echo 'export KALICODE_CONDENSE_THRESHOLD=80' > .kalicoderc
source .kalicoderc
kalicode
```

## Summary

The condense threshold is a powerful feature that helps JURIKO manage long conversations efficiently. By understanding and configuring this setting appropriately, you can optimize the balance between context preservation and token usage for your specific needs.
The condense threshold is a powerful feature that helps KALICODE manage long conversations efficiently. By understanding and configuring this setting appropriately, you can optimize the balance between context preservation and token usage for your specific needs.

**Default**: 75% - Good for most users
**Configuration**: Environment variable or user settings file
Expand Down
Loading