Merge pull request #3 from litongjava/java-perplexica

remove chinese
This commit is contained in:
Tong Li 2025-02-02 16:11:25 -10:00 committed by GitHub
commit 4c6e056261
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -429,7 +429,7 @@ const ChatWindow = ({id}: { id?: string }) => {
setUserId(storedUserId);
console.debug('Using existing user ID:', storedUserId);
} else {
const newUserId = new Mcid().generate().toString(); // 转换为字符串
const newUserId = new Mcid().generate().toString();
localStorage.setItem('userId', newUserId);
setUserId(newUserId);

View file

@ -30,9 +30,7 @@ export class Mcid {
this.lastTimestamp = now;
return (
(now * 0x1000) + // 时间戳左移 12 位
(this.machineId * 16) + // 机器 ID 左移 4 位
this.sequence // 序列号
(now * 0x1000) + (this.machineId * 16) + this.sequence
);
}
}