-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move getLocalModels to ModelsManager #112
Conversation
0347457
to
0ef4670
Compare
import type { GitManager } from './gitManager'; | ||
import os from 'os'; | ||
import fs, { Stats, type Dirent } from 'fs'; | ||
import path from 'path'; | ||
import fs from 'fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import fs from 'fs'; | |
import fs from 'node:fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using node:
prefix is recommended for all the 'internal' packages
it's to avoid for example that you use https://www.npmjs.com/package/fs
export class ModelsManager { | ||
constructor(private appUserDirectory: string) {} | ||
|
||
getLocalModels(): LocalModelInfo[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a question.
It seems it's a lazy initialization and without cache, do we need to read the files each time we're called or you're planning to read it eagerly or have a cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could watch the folder for changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I created #116
0ef4670
to
1c6a778
Compare
model_servers workflow renamed
No description provided.