Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qjclaw-dmg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AI-甘富林
qjclaw-dmg
Commits
127ab878
Commit
127ab878
authored
Apr 03, 2026
by
AI-甘富林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 启动完成后改为首页绑定员工密钥
parent
dd42a21c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
67 deletions
+43
-67
ipc.ts
apps/desktop/src/main/ipc.ts
+2
-0
secrets.ts
apps/desktop/src/main/services/secrets.ts
+7
-0
App.tsx
apps/ui/src/App.tsx
+33
-67
index.ts
packages/shared-types/src/index.ts
+1
-0
No files found.
apps/desktop/src/main/ipc.ts
View file @
127ab878
...
@@ -521,6 +521,7 @@ export function registerDesktopIpc(services: MainServices): RegisteredDesktopIpc
...
@@ -521,6 +521,7 @@ export function registerDesktopIpc(services: MainServices): RegisteredDesktopIpc
}
=
await
loadActiveProjectWorkspaceState
(
projectStore
);
}
=
await
loadActiveProjectWorkspaceState
(
projectStore
);
const
bundleSyncStatus
=
projectBundleService
.
getSyncStatus
();
const
bundleSyncStatus
=
projectBundleService
.
getSyncStatus
();
const
bundleSyncFailed
=
bundleSyncStatus
.
state
===
"error"
;
const
bundleSyncFailed
=
bundleSyncStatus
.
state
===
"error"
;
const
shellReady
=
!
bundleSyncFailed
;
const
chatSummary
=
projects
.
length
>
0
const
chatSummary
=
projects
.
length
>
0
?
baseChatSummary
?
baseChatSummary
:
bundleSyncFailed
:
bundleSyncFailed
...
@@ -544,6 +545,7 @@ export function registerDesktopIpc(services: MainServices): RegisteredDesktopIpc
...
@@ -544,6 +545,7 @@ export function registerDesktopIpc(services: MainServices): RegisteredDesktopIpc
};
};
return
{
return
{
shellReady
,
apiKeyConfigured
:
config
.
apiKeyConfigured
,
apiKeyConfigured
:
config
.
apiKeyConfigured
,
bindingRequired
:
!
config
.
apiKeyConfigured
,
bindingRequired
:
!
config
.
apiKeyConfigured
,
setupRequired
:
!
config
.
apiKeyConfigured
,
setupRequired
:
!
config
.
apiKeyConfigured
,
...
...
apps/desktop/src/main/services/secrets.ts
View file @
127ab878
...
@@ -18,6 +18,7 @@ type SecretName = "apiKey" | "gatewayToken" | "deviceToken" | "authToken";
...
@@ -18,6 +18,7 @@ type SecretName = "apiKey" | "gatewayToken" | "deviceToken" | "authToken";
type
KeytarModule
=
typeof
import
(
"keytar"
);
type
KeytarModule
=
typeof
import
(
"keytar"
);
const
KEYTAR_SERVICE
=
"QianjiangClaw"
;
const
KEYTAR_SERVICE
=
"QianjiangClaw"
;
const
FORCED_SECRET_BACKEND
=
(
process
.
env
.
QJCLAW_SECRET_BACKEND
??
""
).
trim
().
toLowerCase
();
const
KEYTAR_ACCOUNT_MAP
:
Record
<
SecretName
,
string
>
=
{
const
KEYTAR_ACCOUNT_MAP
:
Record
<
SecretName
,
string
>
=
{
apiKey
:
"provider-api-key"
,
apiKey
:
"provider-api-key"
,
gatewayToken
:
"gateway-token"
,
gatewayToken
:
"gateway-token"
,
...
@@ -108,6 +109,12 @@ export class SecretManager {
...
@@ -108,6 +109,12 @@ export class SecretManager {
async
load
():
Promise
<
void
>
{
async
load
():
Promise
<
void
>
{
await
this
.
fallbackStore
.
load
();
await
this
.
fallbackStore
.
load
();
if
(
FORCED_SECRET_BACKEND
===
"file-fallback"
)
{
this
.
backend
=
"file-fallback(forced)"
;
this
.
store
=
this
.
fallbackStore
;
return
;
}
const
keytar
=
await
this
.
tryLoadKeytar
();
const
keytar
=
await
this
.
tryLoadKeytar
();
if
(
!
keytar
)
{
if
(
!
keytar
)
{
this
.
backend
=
"file-fallback"
;
this
.
backend
=
"file-fallback"
;
...
...
apps/ui/src/App.tsx
View file @
127ab878
This diff is collapsed.
Click to expand it.
packages/shared-types/src/index.ts
View file @
127ab878
...
@@ -259,6 +259,7 @@ export interface PluginSummary {
...
@@ -259,6 +259,7 @@ export interface PluginSummary {
}
}
export
interface
WorkspaceSummary
{
export
interface
WorkspaceSummary
{
shellReady
:
boolean
;
apiKeyConfigured
:
boolean
;
apiKeyConfigured
:
boolean
;
bindingRequired
:
boolean
;
bindingRequired
:
boolean
;
setupRequired
:
boolean
;
setupRequired
:
boolean
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment