小橙子 8ac3ea395a
feat(solo): wire LSP error count into Tier-1 signals (Phase 5) (#27)
* feat(solo): wire LSP error count into Tier-1 signals + cleanup suggestion

Phase 5 of editor-lsp-foundation (tasks 41-45):

- src/server/services/soloSuggestions.ts: SoloSignalsTier1 gains
  lspErrorCount field + new ruleLspError. Rule fires on positive
  integer counts only (defensive against undefined / 0 / non-integer
  / negative). Score 80 — high enough to outrank other 'cleanup'
  candidates (todo-marker / sync-upstream / stash) via the existing
  per-category dedup pass, and to outrank test-gap / ship / finish-wip /
  release base scores so the user is told to clear type errors first
  whenever the LSP reports any.
- src/server/services/soloSignalsService.ts: gatherSoloSignalsTier1 now
  accepts an optional `getLspErrorCount` provider. Wrapped in
  Promise.allSettled so an LSP failure / missing prereq silently
  leaves lspErrorCount undefined — the rule then sits the round out
  rather than nagging users about a setup problem they didn't ask
  about. Existing callers don't pass the option, so no behavioral
  drift on the current call sites; the manager will inject a real
  provider when the LspManager singleton from Phase 3 is wired into
  the Solo welcome-card pipeline.
- desktop/src/i18n/locales/{en,zh,zh-TW,jp,kr}.ts: 3 keys ×
  5 locales = 15 entries for solo.suggest.lspError.{title,detail,
  taskPrompt}. The other LSP-related i18n keys mentioned in the
  spec (lsp.indicator.*, editor.unsupportedEncoding, editor.conflict.*,
  editor.unsavedClose.*) are deferred to the component-integration PR
  that swaps Phase 2/3's hardcoded English for translated labels —
  shipping keys without callers would create dead code that drifts
  out of sync before integration lands.
- src/server/services/soloSuggestions.test.ts: 6 new tests for
  ruleLspError covering undefined / 0 / non-integer / negative gates,
  positive-count emission, per-category dedup outranks
  todo / sync-upstream when LSP errors exist.
- src/server/services/soloSuggestions.i18n.test.ts: fixtureWithEverySignal
  now includes lspErrorCount, so the existing en.ts contract scan
  automatically validates the 3 new keys.

Tested:
- bun test src/server/services/soloSuggestions.test.ts (44/44, +6 new)
- bun test src/server/services/soloSignalsService.test.ts
- bun test src/server/services/soloSuggestions.i18n.test.ts
- 61/61 across 3 Solo-related test files
- bun run lint (desktop tsc --noEmit clean — 5 locales × TranslationKey
  mapped Record gates the additions)

Note: pre-existing e2e/business-flow failures (~44) on origin/main
remain untouched.

_Requirements: 14.1, 14.2, 14.3, 14.4, 14.5, 15.6_

* test(desktop): add i18n contract test for solo.suggest.lspError

Phase 5 follow-up: change-policy CI gate refused PR #27 because the
desktop locale changes shipped without a matching desktop test —
production code in `desktop/src/i18n/locales/*.ts` requires a
desktop-side test. The server-side i18n contract test
(soloSuggestions.i18n.test.ts) only validates en.ts, leaving the
4 other locales unchecked at the desktop boundary.

This test mirrors that contract on the desktop side: 5 locales × 3
keys = 15 presence checks, plus interpolation checks for {count} and
absence-of-params check for the static detail key. 18/18 passing.

The test imports each locale as a named export (the file's `export
const zh: Record<TranslationKey, string>` is repeated across all
five locale files, so `zh-TW.ts` needs `import { zh as zhTW }` to
disambiguate at the call site).

Tested:
- bun run test src/i18n/lspError.test.ts (18/18 pass)

---------

Co-authored-by: 你的姓名 <you@example.com>
2026-06-12 08:33:32 +08:00
2026-06-11 20:55:46 +08:00
2026-04-01 10:30:17 +08:00

Claude Code Haha

Claude Code Haha

GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests License 中文 English Docs

A Claude Code build repaired from the source leaked from Anthropic's npm registry on 2026-03-31. Claude Code Haha is now primarily a desktop Claude Code workspace for macOS, Windows, and Linux: sessions, projects, branch / Worktree launch, right-side file changes, code diffs, permission review, provider setup, Computer Use, H5 remote access, IM integration, and scheduled tasks in one app.

Desktop Preview · Install · Highlights · Sponsorship · More Docs


Desktop Preview

The Claude Code Haha desktop app brings sessions, multi-project navigation, branch / Worktree controls, right-side file changes, code diffs, permission review, provider setup, and remote access into one graphical workspace for daily development flows beyond the terminal.

Download Desktop   Install Guide

Desktop workspace
Desktop Workspace
Right-side changes and Worktree
Right-side Changes & Worktree
Code editing
Code Editing & Diff View
Permission control
Permission Review & AI Questions
H5 remote access
H5 Remote Access
Token usage
Token Usage
Computer Use
Computer Use
Scheduled tasks
Scheduled Tasks

Install the Desktop App

  1. Download the macOS / Windows / Linux desktop installer from Releases.
  2. On first launch, configure your model provider, API key, and default model in Settings.
  3. This build is currently unsigned, so the first launch needs a one-time manual approval (clear quarantine on macOS, click "Run anyway" on Windows). See the desktop installation guide.

Run the CLI from Source

For users who want to debug the underlying CLI, server, or local development flow:

bun install
cp .env.example .env
./bin/claude-haha

See environment variables and global usage for more configuration options.


Desktop Highlights

  • Multi-session workspace: tabs, project switching, terminal entry, and session history in one place.
  • Branch / Worktree launch: choose a repository branch and decide whether to use the current working tree or an isolated Worktree.
  • Right-side file changes: review changed files, added/removed lines, and current workspace state while chatting.
  • Visual code changes: inspect edits, file writes, and diffs directly in the desktop app.
  • Permission review: approve risky commands, tool calls, and model follow-up questions in the GUI.
  • Multi-provider setup: configure Anthropic-compatible APIs, third-party models, WebSearch fallback, and local options.
  • Computer Use: let the agent take screenshots, click, type, and control desktop apps after authorization.
  • H5 remote access: open the current desktop session from a phone or another device with a one-time token.
  • IM integration: chat, switch projects, and approve actions through Telegram / Feishu / WeChat / DingTalk.
  • Scheduled tasks and usage stats: create planned tasks and track local token usage trends.

More Documentation

Document Description
Environment Variables Full env var reference and configuration methods
Third-Party Models Using OpenAI / DeepSeek / Ollama and other non-Anthropic models
Contributing Local tests, live model baselines, PR gates, and release gates
Memory System Cross-session persistent memory usage and implementation
Multi-Agent System Agent orchestration, parallel tasks and Teams collaboration
Skills System Extensible capability plugins, custom workflows and conditional activation
IM Integration Remote chat, project switching, and permission approval via Telegram / Feishu / WeChat / DingTalk
Computer Use Desktop control (screenshots, mouse, keyboard) — Architecture
Desktop App Electron + React GUI client — Quick Start | Architecture | Installation
Global Usage Run claude-haha from any directory
FAQ Common error troubleshooting
Source Fixes Fixes compared with the original leaked source
Project Structure Code directory structure

Sponsorship & Partnership

This project is maintained in the author's spare time. Corporate or individual sponsorships are welcome to support ongoing development. Custom features, integrations, and business partnerships are also open for discussion.

Sponsor Description
JieKou AI
接口AI
Thanks to JieKou AI for sponsoring this project. JieKou AI provides official model resources with stable, high-performance API access. Subscription bundles are priced at 20% off the official rate; new users who register through this link and bind GitHub can claim a $3 coupon.
ShengSuanYun Thanks to ShengSuanYun for sponsoring this project. ShengSuanYun is an industrial-grade AI task parallel execution platform for AI Native Teams, aggregating Claude, ChatGPT, Gemini, and other LLM, image, and video model capacity through direct, non-reverse-engineered access. Its platform SLA reaches 99.7%, with service status available online. It also supports dedicated enterprise gateways, cost and permission controls, smart routing, security protection, BYOK, usage-based billing, upcoming tokens plans, and invoicing. New users registering through this link can receive 10 yuan in model credits plus a 10% first top-up bonus.

📧 Contact: relakkes@gmail.com


Tech Stack

Category Technology
Language TypeScript
Desktop app Electron
Desktop UI React + Vite
Local runtime Bun
Terminal UI React + Ink
CLI parsing Commander.js
API Anthropic SDK
Protocols MCP, LSP

Thanks

Thanks to the following open-source projects and community practices for reference and inspiration:

  • React: frontend engineering and component-based UI ecosystem.
  • Electron: cross-platform desktop app capabilities and engineering practices.
  • cc-switch: reference for model provider configuration.

Star History

If this project helps you, please support it with a Star so more people can discover Claude Code Haha.

Star History Chart

Disclaimer

This repository is based on the Claude Code source leaked from the Anthropic npm registry on 2026-03-31. All original source code copyrights belong to Anthropic. It is provided for learning and research purposes only.

Description
Claude Code 本地可运行版本 - mirror from GitHub
Readme 537 MiB
Languages
TypeScript 98.7%
CSS 0.3%
Rust 0.2%
Shell 0.2%
Python 0.2%
Other 0.3%