fix: handle Tauri cold storage path and remote persistence#1468
Open
gwahak10 wants to merge 1 commit into
Open
fix: handle Tauri cold storage path and remote persistence#1468gwahak10 wants to merge 1 commit into
gwahak10 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Promise<boolean>. No new public type definitions were needed.Summary
Tauri cold storage의 AppData 경로 처리와 local remote character block persistence 문제를 수정합니다.
This PR fixes Tauri cold storage AppData path handling and local remote character block persistence.
Related Issues
None.
Changes
한국어
exists('./coldstorage')에 의존하지 않고,mkdir('./coldstorage', { recursive: true, baseDir: BaseDirectory.AppData })를 항상 호출하도록 변경했습니다.remove()호출에도BaseDirectory.AppData를 추가했습니다.makeColdDataForCharacter()와makeColdDataForChat()이Promise<boolean>을 반환하도록 변경했습니다.requiresFullEncoderReload.state = true를 설정하여 다음 저장 시 local remote character blocks가 다시 기록되도록 했습니다.English
exists('./coldstorage')in the Tauri cold storage writer and always create the directory withmkdir('./coldstorage', { recursive: true, baseDir: BaseDirectory.AppData }).BaseDirectory.AppDatato the Tauri cold storage cleanupremove()call.makeColdDataForCharacter()andmakeColdDataForChat()to returnPromise<boolean>somakeColdData()can track whether cold storage actually changed any character/chat data.requiresFullEncoderReload.state = trueso local remote character blocks are rewritten on the next save.Impact
한국어
이 수정은 Tauri 환경에서 cold storage가 process working directory에 의존해 실패하는 문제를 줄이고, cold storage 변환 후 local remote character block에 cold stub이 저장되지 않아 다음 실행 시 같은 캐릭터가 다시 cold storage 처리되는 문제를 방지하기 위한 것입니다.
웹, account storage, node-hosted storage의 cold storage 저장 경로는 변경하지 않았습니다. 변경된 동작은 주로 Tauri local storage와 local remote character block persistence에 해당합니다.
English
This change should prevent Tauri cold storage from depending on the process working directory, and should also prevent the same characters from being cold-stored again on the next launch because converted cold stubs were not persisted into local remote character blocks.
Cold storage path handling for web, account storage, and node-hosted storage is not changed. The behavior change mainly affects Tauri local storage and local remote character block persistence.
Testing
한국어
pnpm check통과:svelte-check found 0 errors and 0 warningsWindows Tauri 릴리즈 빌드에서 DevTools로 문제를 재현하고 확인했습니다.
일반 실행 시 cold storage 저장이 실패하고, WorkingDirectory를
%APPDATA%\co.aiclient.risu로 지정하면 저장이 시작되는 것을 확인했습니다.cold storage 완료 시점에 full encoder reload 플래그를 강제로 설정했을 때, local remote character block에 cold stub이 반영되고 다음 실행 시 중복 cold storage 생성이 멈추는 것을 확인했습니다.
성공 적용 후 JS heap이 약 3GB대에서 약 1,153MB까지 감소하는 것을 확인했습니다.
English
pnpm checkpassed:svelte-check found 0 errors and 0 warningsReproduced and verified the issue with DevTools on the released Windows Tauri build.
Confirmed that cold storage fails when launched normally, but starts writing when WorkingDirectory is set to
%APPDATA%\co.aiclient.risu.Confirmed that forcing the full encoder reload flag after cold storage conversion persists cold stubs into local remote character blocks and prevents duplicate cold storage generation on the next launch.
Confirmed JS heap decreased from around 3GB to about 1,153MB after successful persistence.
Additional Notes
한국어
이 PR은 AI model 요청/응답 처리 로직을 변경하지 않습니다.
수정 범위는
src/ts/process/coldstorage.svelte.ts에 한정되어 있으며, cold storage 변환 후 실제 변경이 있었을 때만 full encoder reload를 요청하도록 했습니다.DevTools로 직접 디버깅하고 검증한 결과를 바탕으로 작성했습니다. 변경 범위는 작고, 제출 전 수정 내용을 확인했습니다.
English
This PR does not modify AI model prompting, request handling, or response handling.
The change is limited to
src/ts/process/coldstorage.svelte.ts, and full encoder reload is requested only when cold storage conversion actually changed character/chat data.Based on manual debugging and verification with DevTools. The code change is small and was reviewed before submission.
Footnotes
Modifies the behavior of prompting, requesting, or handling responses from AI models. ↩
Over 80% of the code is AI generated. ↩