Implement classification redesign
This commit is contained in:
+20
-17
@@ -13,8 +13,8 @@ import { ErrorMessage, Field, Modal } from "./ui";
|
||||
import type { Mutate } from "./ui";
|
||||
export function Settings({ state, mutate }: { state: State; mutate: Mutate }) {
|
||||
const [model, setModel] = useState(state.settings.model);
|
||||
const [includeAmount, setIncludeAmount] = useState(
|
||||
state.settings.include_amount,
|
||||
const [privateNames, setPrivateNames] = useState(
|
||||
state.settings.private_names.join("; "),
|
||||
);
|
||||
const [classifyOnImport, setClassifyOnImport] = useState(
|
||||
state.settings.classify_on_import,
|
||||
@@ -339,7 +339,10 @@ export function Settings({ state, mutate }: { state: State; mutate: Mutate }) {
|
||||
"/api/settings",
|
||||
{
|
||||
model: model.trim(),
|
||||
include_amount: includeAmount,
|
||||
private_names: privateNames
|
||||
.split(";")
|
||||
.map((name) => name.trim())
|
||||
.filter(Boolean),
|
||||
classify_on_import: classifyOnImport,
|
||||
},
|
||||
"Classification preferences saved",
|
||||
@@ -361,18 +364,17 @@ export function Settings({ state, mutate }: { state: State; mutate: Mutate }) {
|
||||
onChange={(e) => setModel(e.target.value)}
|
||||
/>
|
||||
</Field>
|
||||
<label className="checkbox">
|
||||
<Field
|
||||
label="Private names"
|
||||
hint="Semicolon-separated names to redact from every AI text field. A semicolon inside a name is not supported."
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={includeAmount}
|
||||
onChange={(e) => setIncludeAmount(e.target.checked)}
|
||||
value={privateNames}
|
||||
maxLength={2000}
|
||||
onChange={(e) => setPrivateNames(e.target.value)}
|
||||
placeholder="Your name; household member"
|
||||
/>
|
||||
Include transaction amount in AI requests
|
||||
</label>
|
||||
<p className="muted small">
|
||||
Disabled by default for privacy. Enabling this shares the amount
|
||||
with the configured AI provider to help classification.
|
||||
</p>
|
||||
</Field>
|
||||
<label className="checkbox">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -415,10 +417,11 @@ export function Settings({ state, mutate }: { state: State; mutate: Mutate }) {
|
||||
<h4>Explicit external services</h4>
|
||||
<p>
|
||||
Bank authorization and sync use Enable Banking. AI classification
|
||||
sends allowlisted, sanitized fields to the configured provider.
|
||||
Known personal identifiers, counterparty names and bank references
|
||||
are stripped, but sanitization cannot guarantee that free-text
|
||||
descriptions contain no sensitive information.
|
||||
sends merchant and counterparty text, amount, date and currency
|
||||
to the configured provider after identifier-only redaction. Your
|
||||
own account identifiers and configured private names are never
|
||||
sent. A third party's payee name can be sent when it is not in
|
||||
your private-name list.
|
||||
</p>
|
||||
<h4>Immutable originals</h4>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user