feat: list, pick and manage Ollama models from a command
This commit is contained in:
+5
-2
@@ -1,6 +1,6 @@
|
||||
import { LaunchType, closeMainWindow, launchCommand, showHUD, type LaunchProps } from "@vicinae/api";
|
||||
import { captureRegion } from "./lib/capture";
|
||||
import { getLamPreferences } from "./lib/preferences";
|
||||
import { loadPreferences } from "./lib/preferences";
|
||||
import { describeCaptureFailure, readSnipContext, snipDirectory } from "./lib/snip";
|
||||
import { visionSupport } from "./lib/vision";
|
||||
|
||||
@@ -34,7 +34,10 @@ function settleWindow(): Promise<void> {
|
||||
* Bind it to a global shortcut for one-key "snip and ask".
|
||||
*/
|
||||
export default async function SnipCommand(props: LaunchProps) {
|
||||
const preferences = getLamPreferences();
|
||||
// Awaited because the model can come from a pick in the Models command, which
|
||||
// lives in storage. The vision check below is about whichever model is in use,
|
||||
// so it has to be the resolved one.
|
||||
const preferences = await loadPreferences();
|
||||
const context = readSnipContext(props.launchContext);
|
||||
|
||||
// Before anything else. Everything below is pointless if the selector is
|
||||
|
||||
Reference in New Issue
Block a user