freestylefly / freestylefly/wesight
OpenCode credentials not detected although CLI auth works; task stalls at `OpenCode step started.`
- Dominant language
- TypeScript
- Stars
- 923
- Forks
- 206
- Avg merge
- 24m
- Merged PRs (30d)
- 2
Description
## Problem
WeSight reports **“本机凭据未检测到本机登录或密钥”** for OpenCode, even though OpenCode CLI itself detects credentials and can run normally.
In WeSight, an OpenCode task only shows:
```text
OpenCode step started.
```
and does not proceed.
## Environment
- macOS
- OpenCode binary: `/opt/homebrew/bin/opencode`
- OpenCode config directory: `~/.config/opencode`
- Config files present: `opencode.json`, `opencode.jsonc`
- Credentials file: `~/.local/share/opencode/auth.json`
## Verification
`/opt/homebrew/bin/opencode auth list` returns:
```text
Credentials ~/.local/share/opencode/auth.json
DeepSeek api
Google api
Environment
DeepSeek DEEPSEEK_API_KEY
Google GEMINI_API_KEY
```
And this works successfully:
```bash
/opt/homebrew/bin/opencode run "只回复OK"
```
So OpenCode itself can detect and use the credentials correctly.
`~/.config/opencode/opencode.json` currently contains only:
```json
{
"$schema": "https://opencode.ai/config.json"
}
```
## Expected behavior
WeSight should detect the credentials that OpenCode already recognizes, and OpenCode tasks should continue past `OpenCode step started.`.
## Actual behavior
WeSight shows that no local login/key is detected and the OpenCode task stalls immediately after starting.
This looks like a WeSight-side credential detection / OpenCode process integration issue rather than an OpenCode authentication issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the OpenCode integration from the task that reports “OpenCode step started.” and inspect how it checks ~/.local/share/opencode/auth.json, ~/.config/opencode, and the /opt/homebrew/bin/opencode process. Reproduce the issue with `opencode auth list` and `opencode run "只回复OK"`; done means WeSight detects the existing credentials and the task continues past its start message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- authentication, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100