mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Add memory plugin with semantic search and session planning (#145)
* Add memory plugin with semantic search and session planning * Clarify Memory Plugin is optional in docs
This commit is contained in:
1 parent
da283a82cf
commit
3461f86556
132 files changed
+11448
-2834
No files matched your search
@@ -103,10 +103,6 @@ export function createGitEnv(credentials: GitCredential[]): Record<string, strin
|
||||
return env
|
||||
}
|
||||
|
||||
export function createGitHubGitEnv(gitToken: string): Record<string, string> {
|
||||
return createGitEnv([{ name: 'GitHub', host: 'https://github.com/', token: gitToken, type: 'pat' }])
|
||||
}
|
||||
|
||||
export function findGitHubCredential(credentials: GitCredential[]): GitCredential | null {
|
||||
if (!credentials || credentials.length === 0) return null
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export function compareVersions(v1: string, v2: string): number {
|
||||
const parts1 = v1.replace(/^v/, '').split('.').map(Number)
|
||||
const parts2 = v2.replace(/^v/, '').split('.').map(Number)
|
||||
|
||||
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
||||
const p1 = parts1[i] ?? 0
|
||||
const p2 = parts2[i] ?? 0
|
||||
if (p1 > p2) return 1
|
||||
if (p1 < p2) return -1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
Reference in new issue
Block a user