update prompt

This commit is contained in:
leookun
2026-08-20 13:59:31 +08:00
parent eb68375306
commit 77c8e31a09
13 changed files with 64 additions and 177 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ info:
description: "Cursor助手" description: "Cursor助手"
copyright: "© 2026, Cursor助手" copyright: "© 2026, Cursor助手"
comments: "Cursor助手" comments: "Cursor助手"
version: "0.0.48" version: "0.0.49"
dev_mode: dev_mode:
root_path: . root_path: .
+2 -2
View File
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.0.48</string> <string>0.0.49</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0.0.48</string> <string>0.0.49</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>12.0.0</string> <string>12.0.0</string>
<key>LSUIElement</key> <key>LSUIElement</key>
+2 -2
View File
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.0.48</string> <string>0.0.49</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>0.0.48</string> <string>0.0.49</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>12.0.0</string> <string>12.0.0</string>
<key>LSUIElement</key> <key>LSUIElement</key>
+15 -28
View File
@@ -6,7 +6,7 @@
name: "Cursor助手" name: "Cursor助手"
arch: ${GOARCH} arch: ${GOARCH}
platform: "linux" platform: "linux"
version: "0.0.48" version: "0.0.49"
section: "default" section: "default"
priority: "extra" priority: "extra"
maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}> maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>
@@ -24,24 +24,24 @@ contents:
- src: "./build/linux/Cursor助手.desktop" - src: "./build/linux/Cursor助手.desktop"
dst: "/usr/share/applications/Cursor助手.desktop" dst: "/usr/share/applications/Cursor助手.desktop"
# Default dependencies for the GTK4 + WebKitGTK 6.0 stack (Ubuntu 24.04+ / Debian 13+) # Default dependencies for Debian 12/Ubuntu 22.04+ with WebKit 4.1
depends: depends:
- libgtk-4-1 - libgtk-3-0
- libwebkitgtk-6.0-4 - libwebkit2gtk-4.1-0
# Distribution-specific overrides for different package formats # Distribution-specific overrides for different package formats and WebKit versions
overrides: overrides:
# RPM packages for Fedora / RHEL / AlmaLinux / Rocky Linux # RPM packages for RHEL/CentOS/AlmaLinux/Rocky Linux (WebKit 4.0)
rpm: rpm:
depends: depends:
- gtk4 - gtk3
- webkitgtk6.0 - webkit2gtk4.1
# Arch Linux packages # Arch Linux packages (WebKit 4.1)
archlinux: archlinux:
depends: depends:
- gtk4 - gtk3
- webkitgtk-6.0 - webkit2gtk-4.1
# scripts section to ensure desktop database is updated after install # scripts section to ensure desktop database is updated after install
scripts: scripts:
@@ -50,26 +50,13 @@ scripts:
# preremove: "./build/linux/nfpm/scripts/preremove.sh" # preremove: "./build/linux/nfpm/scripts/preremove.sh"
# postremove: "./build/linux/nfpm/scripts/postremove.sh" # postremove: "./build/linux/nfpm/scripts/postremove.sh"
# If you build your app with -tags gtk3 (legacy WebKit2GTK 4.1 stack — supported through v3.0.x, removed in v3.1),
# replace the depends/overrides above with these:
#
# depends:
# - libgtk-3-0
# - libwebkit2gtk-4.1-0
# overrides:
# rpm:
# depends:
# - gtk3
# - webkit2gtk4.1
# archlinux:
# depends:
# - gtk3
# - webkit2gtk-4.1
#
# replaces: # replaces:
# - foobar # - foobar
# provides: # provides:
# - bar # - bar
# depends:
# - gtk3
# - libwebkit2gtk
# recommends: # recommends:
# - whatever # - whatever
# suggests: # suggests:
+2 -2
View File
@@ -1,10 +1,10 @@
{ {
"fixed": { "fixed": {
"file_version": "0.0.48" "file_version": "0.0.49"
}, },
"info": { "info": {
"0000": { "0000": {
"ProductVersion": "0.0.48", "ProductVersion": "0.0.49",
"CompanyName": "Cursor助手", "CompanyName": "Cursor助手",
"FileDescription": "Cursor助手", "FileDescription": "Cursor助手",
"LegalCopyright": "© 2026, Cursor助手", "LegalCopyright": "© 2026, Cursor助手",
+12 -37
View File
@@ -14,7 +14,7 @@
!define INFO_PRODUCTNAME "Cursor助手" !define INFO_PRODUCTNAME "Cursor助手"
!endif !endif
!ifndef INFO_PRODUCTVERSION !ifndef INFO_PRODUCTVERSION
!define INFO_PRODUCTVERSION "0.0.48" !define INFO_PRODUCTVERSION "0.0.49"
!endif !endif
!ifndef INFO_COPYRIGHT !ifndef INFO_COPYRIGHT
!define INFO_COPYRIGHT "© 2026, Cursor助手" !define INFO_COPYRIGHT "© 2026, Cursor助手"
@@ -27,16 +27,8 @@
!endif !endif
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}" !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
!ifndef WAILS_INSTALL_SCOPE
!define WAILS_INSTALL_SCOPE "machine"
!endif
!ifndef REQUEST_EXECUTION_LEVEL !ifndef REQUEST_EXECUTION_LEVEL
!if "${WAILS_INSTALL_SCOPE}" == "user" !define REQUEST_EXECUTION_LEVEL "admin"
!define REQUEST_EXECUTION_LEVEL "user"
!else
!define REQUEST_EXECUTION_LEVEL "admin"
!endif
!endif !endif
RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}" RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
@@ -123,40 +115,23 @@ RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
WriteUninstaller "$INSTDIR\uninstall.exe" WriteUninstaller "$INSTDIR\uninstall.exe"
SetRegView 64 SetRegView 64
!if "${WAILS_INSTALL_SCOPE}" == "user" WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
WriteRegStr HKCU "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}" WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
WriteRegStr HKCU "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}" WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
WriteRegStr HKCU "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}" WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
WriteRegStr HKCU "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}" WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKCU "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKCU "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2 ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0 IntFmt $0 "0x%08X" $0
WriteRegDWORD HKCU "${UNINST_KEY}" "EstimatedSize" "$0" WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
!else
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
!endif
!macroend !macroend
!macro wails.deleteUninstaller !macro wails.deleteUninstaller
Delete "$INSTDIR\uninstall.exe" Delete "$INSTDIR\uninstall.exe"
SetRegView 64 SetRegView 64
!if "${WAILS_INSTALL_SCOPE}" == "user" DeleteRegKey HKLM "${UNINST_KEY}"
DeleteRegKey HKCU "${UNINST_KEY}"
!else
DeleteRegKey HKLM "${UNINST_KEY}"
!endif
!macroend !macroend
!macro wails.setShellContext !macro wails.setShellContext
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity type="win32" name="com.cursor.wuxianxubei" version="0.0.48" processorArchitecture="*"/> <assemblyIdentity type="win32" name="com.cursor.wuxianxubei" version="0.0.49" processorArchitecture="*"/>
<dependency> <dependency>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
+26 -26
View File
@@ -142,8 +142,8 @@
"refs": [ "refs": [
{ {
"file": "src/views/Config.vue", "file": "src/views/Config.vue",
"line": 50, "line": 51,
"column": 48 "column": 1
} }
] ]
}, },
@@ -166,8 +166,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/HomeMetricsCard.vue", "file": "src/components/HomeMetricsCard.vue",
"line": 337, "line": 338,
"column": 65 "column": 1
} }
] ]
}, },
@@ -400,8 +400,8 @@
"refs": [ "refs": [
{ {
"file": "src/views/Config.vue", "file": "src/views/Config.vue",
"line": 64, "line": 65,
"column": 48 "column": 1
} }
] ]
}, },
@@ -527,8 +527,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/ModelAdapterTestCard.vue", "file": "src/components/ModelAdapterTestCard.vue",
"line": 145, "line": 146,
"column": 7 "column": 1
} }
] ]
}, },
@@ -575,8 +575,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/ModelAdapterTestCard.vue", "file": "src/components/ModelAdapterTestCard.vue",
"line": 124, "line": 125,
"column": 60 "column": 1
} }
] ]
}, },
@@ -672,8 +672,8 @@
}, },
{ {
"file": "src/components/CursorAccountCard.vue", "file": "src/components/CursorAccountCard.vue",
"line": 187, "line": 188,
"column": 11 "column": 1
} }
] ]
}, },
@@ -778,8 +778,8 @@
"refs": [ "refs": [
{ {
"file": "src/views/ModelConfig.vue", "file": "src/views/ModelConfig.vue",
"line": 411, "line": 412,
"column": 13 "column": 1
} }
] ]
}, },
@@ -1601,8 +1601,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/HomeMetricsCard.vue", "file": "src/components/HomeMetricsCard.vue",
"line": 389, "line": 390,
"column": 65 "column": 1
} }
] ]
}, },
@@ -1902,8 +1902,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/HomeMetricsCard.vue", "file": "src/components/HomeMetricsCard.vue",
"line": 341, "line": 342,
"column": 23 "column": 1
} }
] ]
}, },
@@ -2356,8 +2356,8 @@
"refs": [ "refs": [
{ {
"file": "src/views/ModelConfig.vue", "file": "src/views/ModelConfig.vue",
"line": 404, "line": 405,
"column": 13 "column": 1
} }
] ]
}, },
@@ -2854,8 +2854,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/CursorAccountCard.vue", "file": "src/components/CursorAccountCard.vue",
"line": 169, "line": 170,
"column": 53 "column": 1
} }
] ]
}, },
@@ -2965,8 +2965,8 @@
"refs": [ "refs": [
{ {
"file": "src/views/Config.vue", "file": "src/views/Config.vue",
"line": 76, "line": 77,
"column": 48 "column": 1
} }
] ]
}, },
@@ -3071,8 +3071,8 @@
"refs": [ "refs": [
{ {
"file": "src/components/CursorAccountCard.vue", "file": "src/components/CursorAccountCard.vue",
"line": 172, "line": 173,
"column": 81 "column": 1
} }
] ]
}, },
+1 -33
View File
@@ -506,10 +506,6 @@ func (store *ConversationFileStore) syncCursorTranscriptBestEffort(conversationI
} }
func (store *ConversationFileStore) syncCursorTranscript(conversationID string, conversation *ConversationFile, transcriptsFolder string) error { func (store *ConversationFileStore) syncCursorTranscript(conversationID string, conversation *ConversationFile, transcriptsFolder string) error {
return store.syncCursorTranscriptWithLatestStatus(conversationID, conversation, transcriptsFolder, false)
}
func (store *ConversationFileStore) syncCursorTranscriptWithLatestStatus(conversationID string, conversation *ConversationFile, transcriptsFolder string, includeLatestStatus bool) error {
if store == nil || conversation == nil { if store == nil || conversation == nil {
return nil return nil
} }
@@ -517,7 +513,7 @@ func (store *ConversationFileStore) syncCursorTranscriptWithLatestStatus(convers
if err != nil { if err != nil {
return err return err
} }
data, err := projectCursorTranscriptJSONLWithLatestStatus(conversation, includeLatestStatus) data, err := projectCursorTranscriptJSONL(conversation)
if err != nil { if err != nil {
return err return err
} }
@@ -528,34 +524,6 @@ func (store *ConversationFileStore) syncCursorTranscriptWithLatestStatus(convers
return writeCursorTranscriptAtomic(path, data) return writeCursorTranscriptAtomic(path, data)
} }
func (store *ConversationFileStore) SyncAllCursorTranscriptsBestEffort() {
if store == nil {
return
}
conversationIDs, err := store.ListConversationIDs()
if err != nil {
log.Printf("forwarder transcript backfill scan failed err=%v", err)
return
}
for _, conversationID := range conversationIDs {
conversation, err := store.LoadConversation(conversationID)
if err != nil {
log.Printf("forwarder transcript backfill load failed conversation_id=%s err=%v", conversationID, err)
continue
}
if conversation == nil || conversation.AgentTranscriptsFolder == "" {
continue
}
info, err := os.Stat(conversation.AgentTranscriptsFolder)
if err != nil || !info.IsDir() {
continue
}
if err := store.syncCursorTranscriptWithLatestStatus(conversationID, conversation, conversation.AgentTranscriptsFolder, true); err != nil {
log.Printf("forwarder transcript backfill failed conversation_id=%s err=%v", conversationID, err)
}
}
}
func contextVersionForEntries(entries []HistoryEntry) int64 { func contextVersionForEntries(entries []HistoryEntry) int64 {
var version int64 var version int64
for _, entry := range entries { for _, entry := range entries {
-1
View File
@@ -307,7 +307,6 @@ func NewService(historyRoot string, resolver modeladapter.ChannelResolver) *Serv
appendSeq: newAppendSequenceTracker(), appendSeq: newAppendSequenceTracker(),
} }
service.startHistoryMaintenance() service.startHistoryMaintenance()
store.SyncAllCursorTranscriptsBestEffort()
return service return service
} }
@@ -68,10 +68,6 @@ type cursorTranscriptContent struct {
// projectCursorTranscriptJSONL projects the local semantic history into Cursor's // projectCursorTranscriptJSONL projects the local semantic history into Cursor's
// current agent transcript JSONL contract. context.json remains the source of truth. // current agent transcript JSONL contract. context.json remains the source of truth.
func projectCursorTranscriptJSONL(conversation *ConversationFile) ([]byte, error) { func projectCursorTranscriptJSONL(conversation *ConversationFile) ([]byte, error) {
return projectCursorTranscriptJSONLWithLatestStatus(conversation, false)
}
func projectCursorTranscriptJSONLWithLatestStatus(conversation *ConversationFile, includeLatestStatus bool) ([]byte, error) {
if conversation == nil { if conversation == nil {
return nil, nil return nil, nil
} }
@@ -85,7 +81,7 @@ func projectCursorTranscriptJSONLWithLatestStatus(conversation *ConversationFile
currentTurnSeq := int64(0) currentTurnSeq := int64(0)
pendingTurnStatus := cursorTranscriptLine{} pendingTurnStatus := cursorTranscriptLine{}
flushTurnStatus := func() { flushTurnStatus := func() {
if currentTurnSeq > 0 && (includeLatestStatus || currentTurnSeq < maxTurnSeq) && pendingTurnStatus.Type != "" { if currentTurnSeq > 0 && currentTurnSeq < maxTurnSeq && pendingTurnStatus.Type != "" {
lines = append(lines, pendingTurnStatus) lines = append(lines, pendingTurnStatus)
} }
pendingTurnStatus = cursorTranscriptLine{} pendingTurnStatus = cursorTranscriptLine{}
@@ -97,42 +97,6 @@ func TestConversationFileStoreSyncsCursorTranscript(t *testing.T) {
} }
} }
func TestConversationFileStoreBackfillsTranscriptOnStartup(t *testing.T) {
historyRoot := filepath.Join(t.TempDir(), "history")
transcriptsFolder := filepath.Join(t.TempDir(), "agent-transcripts")
if err := os.MkdirAll(transcriptsFolder, 0o755); err != nil {
t.Fatalf("create transcript root: %v", err)
}
store := NewConversationFileStore(historyRoot)
conversation := transcriptTestConversation(nil)
conversation.AgentTranscriptsFolder = transcriptsFolder
_, err := store.SaveConversationWithEntries(conversation.ConversationID, conversation, []HistoryEntry{
transcriptTestUserMessageEntry(t, 1, "request-1", "hello"),
newAssistantTextEntry(1, "request-1", "hi", "", ""),
newMetadataEntry(1, "request-1", "turn_completed", nil),
})
if err != nil {
t.Fatalf("SaveConversationWithEntries() error = %v", err)
}
path := filepath.Join(transcriptsFolder, conversation.ConversationID, conversation.ConversationID+".jsonl")
if err := os.RemoveAll(filepath.Dir(path)); err != nil {
t.Fatalf("remove generated transcript: %v", err)
}
if err := os.MkdirAll(transcriptsFolder, 0o755); err != nil {
t.Fatalf("restore transcript root: %v", err)
}
store.SyncAllCursorTranscriptsBestEffort()
data, err := os.ReadFile(path)
if err != nil {
t.Fatalf("read backfilled transcript: %v", err)
}
lines := decodeCursorTranscriptLines(t, data)
if len(lines) != 3 || lines[2].Type != "turn_ended" || lines[2].Status != "success" {
t.Fatalf("backfilled transcript = %s", data)
}
}
func TestNormalizeAgentTranscriptsFolderRejectsUnexpectedPaths(t *testing.T) { func TestNormalizeAgentTranscriptsFolderRejectsUnexpectedPaths(t *testing.T) {
root := t.TempDir() root := t.TempDir()
if got := normalizeAgentTranscriptsFolder(filepath.Join(root, "agent-transcripts")); got == "" { if got := normalizeAgentTranscriptsFolder(filepath.Join(root, "agent-transcripts")); got == "" {
+1 -3
View File
@@ -8,6 +8,4 @@ QQ交流群:
Tg群组: Tg群组:
https://t.me/cursor_byok https://t.me/cursor_byok
- 修复Read Image - 修复许多问题比如子代理数量等
- 支持不设置思考强度
- 修复证书安全问题,需要重启一下cursor生效