8 Commits

Author SHA1 Message Date
Radon Co
be6477cca7 feat: Fix CLI crash and add OpenAI Responses API integration
WHAT: Fix critical CLI crash with content.filter() error and implement OpenAI Responses API integration with comprehensive testing

WHY: CLI was crashing with 'TypeError: undefined is not an object (evaluating "content.filter")' when using OpenAI models, preventing users from making API calls. Additionally needed proper Responses API support with reasoning tokens.

HOW:
• Fix content extraction from OpenAI response structure in legacy path
• Add JSON/Zod schema detection in responsesAPI adapter
• Create comprehensive test suite for both integration and production scenarios
• Document the new adapter architecture and usage

CRITICAL FIXES:
• claude.ts: Extract content from response.choices[0].message.content instead of undefined response.content
• responsesAPI.ts: Detect if schema is already JSON (has 'type' property) vs Zod schema before conversion

FILES:
• src/services/claude.ts - Critical bug fix for OpenAI response content extraction
• src/services/adapters/responsesAPI.ts - Robust schema detection for tool parameters
• src/test/integration-cli-flow.test.ts - Integration tests for full flow
• src/test/chat-completions-e2e.test.ts - End-to-end Chat Completions compatibility tests
• src/test/production-api-tests.test.ts - Production API tests with environment configuration
• docs/develop/modules/openai-adapters.md - New adapter system documentation
• docs/develop/README.md - Updated development documentation
2025-11-09 18:41:29 -08:00
CrazyBoyM
61a8ce0d22 clean code 2025-09-20 15:14:38 +08:00
CrazyBoyM
a7af9834ef chore(update): disable auto-update flow; keep version-check banner only\n\n- Remove AutoUpdater UI and NPM prefix/permissions flows\n- Simplify Doctor to passive health-check\n- Keep only getLatestVersion/assertMinVersion/update suggestions\n- Clean REPL/PromptInput to avoid extra renders and flicker\n- No hardcoding; no auto-install; docstrings tidy 2025-09-10 14:22:33 +08:00
Yulong Li
e3d903e7bc feat: Add WebSearchTool and URLFetcherTool for web content access
- Add WebSearchTool with DuckDuckGo integration for web search
    - Provides titles, snippets, and links for current information

  - Add URLFetcherTool for AI-powered web content analysis
    - Fetches and converts HTML content to markdown
    - Processes content using AI with user-provided prompts
    - Includes 15-minute caching for efficiency
    - Uses queryQuick for fast content analysis

  - Register both tools in the tools registry
  - Update documentation to reflect new web capabilities
2025-08-28 17:50:02 +08:00
CrazyBoyM
d8f0a22233 feat: Implement intelligent completion system with advanced fuzzy matching
- Add advanced fuzzy matching with 7+ strategies (exact, prefix, substring, acronym, initials, fuzzy, Levenshtein)
- Create comprehensive database of 500+ common Unix commands for smart autocompletion
- Implement intelligent Tab completion with @ prefix injection for agents and files
- Add sophisticated input pattern recognition for commands like "dao", "gp5", "py3"
- Enhance mention system with TaskProgressMessage component for better user feedback
- Update documentation with comprehensive intelligent completion guide
- Clean up 21 temporary markdown files to maintain repository cleanliness
- Improve project structure and configuration documentation
- Optimize completion system performance with advanced caching and scoring
2025-08-22 13:07:48 +08:00
CrazyBoyM
926df2cfaf feat: Ultra-redesign completion system with @mention integration
- Complete architectural overhaul of useUnifiedCompletion hook
- Unified state management: 8 separate states → single CompletionState interface
- Simplified core logic: getWordAtCursor 194 lines → 42 lines (78% reduction)
- Fixed infinite React update loops with ref-based input tracking
- Smart triggering mechanism replacing aggressive auto-completion
- Integrated @agent and @file mention system with system reminders
- Added comprehensive agent loading and mention processing
- Enhanced Tab/Arrow/Enter key handling with clean event management
- Maintained 100% functional compatibility across all completion types

Key improvements:
• File path completion (relative, absolute, ~expansion, @references)
• Slash command completion (/help, /model, etc.)
• Agent completion (@agent-xxx with intelligent descriptions)
• System command completion (PATH scanning with fallback)
• Terminal-style Tab cycling, Enter confirmation, Escape cancellation
• Preview mode with boundary calculation
• History navigation compatibility
• Empty directory handling with user feedback

Architecture: Event-driven @mention detection → system reminder injection → LLM tool usage
Performance: Eliminated 7-layer nested conditionals, reduced state synchronization issues
Reliability: Fixed maximum update depth exceeded warnings, stable state management
2025-08-21 01:21:12 +08:00
CrazyBoyM
7a3c4a7baa Refactor project structure and update documentation
- Update project branding from claude-cli to Kode
- Reorganize documentation with new development guides
- Add CONTRIBUTING.md and Chinese README
- Remove worktree_merge command and relocate system-design.md
- Update dependencies and package configuration
- Improve custom commands service with better error handling
- Clean up storage utilities and debug logging
2025-08-11 21:31:18 +08:00
CrazyBoyM
11a0e46ecc kode with agent-unix-system v1.0.0 2025-08-10 19:57:17 +08:00