feat: snip a region into chat, and make links clickable (#14)
This commit was merged in pull request #14.
This commit is contained in:
@@ -15,6 +15,8 @@ export interface LamPreferences {
|
||||
model?: string;
|
||||
ollamaHost?: string;
|
||||
systemPrompt?: string;
|
||||
location?: string;
|
||||
ipGeolocation?: boolean;
|
||||
webSearchEnabled?: boolean;
|
||||
thinking?: string;
|
||||
showToolCalls?: boolean;
|
||||
@@ -28,6 +30,16 @@ export interface ResolvedPreferences {
|
||||
model: string;
|
||||
host: string;
|
||||
systemPrompt: string;
|
||||
/**
|
||||
* The place the user says they are, verbatim, or an empty string.
|
||||
*
|
||||
* The only exact location this extension has. Everything else is inferred from
|
||||
* the device timezone and locale, which is accurate to a region rather than a
|
||||
* city, and a timezone name is not a city at all.
|
||||
*/
|
||||
place: string;
|
||||
/** Whether to resolve a rough place from the IP address. Off unless asked for. */
|
||||
ipGeolocation: boolean;
|
||||
webEnabled: boolean;
|
||||
/** Undefined when reasoning is off, which is what the API client expects. */
|
||||
think?: string;
|
||||
@@ -78,6 +90,10 @@ export function resolvePreferences(raw: LamPreferences): ResolvedPreferences {
|
||||
model: (raw.model ?? "").trim() || DEFAULT_MODEL,
|
||||
host: (raw.ollamaHost ?? "").trim() || DEFAULT_HOST,
|
||||
systemPrompt: (raw.systemPrompt ?? "").trim(),
|
||||
place: (raw.location ?? "").trim(),
|
||||
// Defaults to off: this is the one setting that sends something about the
|
||||
// user to a third party, so it is a deliberate choice rather than a default.
|
||||
ipGeolocation: raw.ipGeolocation ?? false,
|
||||
// Defaults to on: the preference is a checkbox the user has to actively untick.
|
||||
webEnabled: raw.webSearchEnabled ?? true,
|
||||
think: thinking && thinking !== "off" ? thinking : undefined,
|
||||
|
||||
Reference in New Issue
Block a user