mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-22 06:28:11 +02:00
Jauge de contexte, espace disque sur partage agrégé, panneau Fichiers
Trois défauts sans rapport entre eux, tous visibles à l'écran. Jauge de contexte bloquée à « 0 / N (0 %) » : le comptage exact vient de usage.prompt_tokens (include_usage), qu'un llama-server récent a cessé de renvoyer. On note désormais si l'usage est arrivé ; sinon la fin de tour publie l'estimation qui pilote déjà la compaction — approximative, mais jamais absente. Et la souscription envoie la valeur courante juste après le rattrapage : une page rechargée affichait zéro sur une discussion pourtant pleine, faute d'événement ctx_used dans la fenêtre rejouée. Espace disque : « il ne reste que 11,9 Go » sur un partage Unraid qui en a des centaines. /mnt/user est servi par shfs, un FUSE qui agrège plusieurs disques — statfs y renvoie l'espace d'un seul, et ce chiffre REFUSAIT l'installation du modèle. Les systèmes de fichiers qui approximent (FUSE, overlay, NFS, CIFS, Ceph, Gluster) sont reconnus par leur magie : leur chiffre reste affiché, précédé d'un « ~ », mais ne bloque plus rien. Panneau Fichiers : le panneau entier défilait, emportant vers le haut l'en-tête, le fil d'Ariane et le pied (occupation disque, bouton .zip) dès qu'il y avait quelques fichiers. Seule la liste défile maintenant ; le pied reste en bas et l'état vide se centre. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
895ff92ed8
commit
b405adea6c
5118 files changed
+1264007
-23
No files matched your search
+111
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @import {Node, Parent} from 'unist'
|
||||
*/
|
||||
/**
|
||||
* @template Fn
|
||||
* @template Fallback
|
||||
* @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate
|
||||
*/
|
||||
/**
|
||||
* @callback Check
|
||||
* Check that an arbitrary value is a node.
|
||||
* @param {unknown} this
|
||||
* The given context.
|
||||
* @param {unknown} [node]
|
||||
* Anything (typically a node).
|
||||
* @param {number | null | undefined} [index]
|
||||
* The node’s position in its parent.
|
||||
* @param {Parent | null | undefined} [parent]
|
||||
* The node’s parent.
|
||||
* @returns {boolean}
|
||||
* Whether this is a node and passes a test.
|
||||
*
|
||||
* @typedef {Record<string, unknown> | Node} Props
|
||||
* Object to check for equivalence.
|
||||
*
|
||||
* Note: `Node` is included as it is common but is not indexable.
|
||||
*
|
||||
* @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
|
||||
* Check for an arbitrary node.
|
||||
*
|
||||
* @callback TestFunction
|
||||
* Check if a node passes a test.
|
||||
* @param {unknown} this
|
||||
* The given context.
|
||||
* @param {Node} node
|
||||
* A node.
|
||||
* @param {number | undefined} [index]
|
||||
* The node’s position in its parent.
|
||||
* @param {Parent | undefined} [parent]
|
||||
* The node’s parent.
|
||||
* @returns {boolean | undefined | void}
|
||||
* Whether this node passes the test.
|
||||
*
|
||||
* Note: `void` is included until TS sees no return as `undefined`.
|
||||
*/
|
||||
/**
|
||||
* Check if `node` is a `Node` and whether it passes the given test.
|
||||
*
|
||||
* @param {unknown} node
|
||||
* Thing to check, typically `Node`.
|
||||
* @param {Test} test
|
||||
* A check for a specific node.
|
||||
* @param {number | null | undefined} index
|
||||
* The node’s position in its parent.
|
||||
* @param {Parent | null | undefined} parent
|
||||
* The node’s parent.
|
||||
* @param {unknown} context
|
||||
* Context object (`this`) to pass to `test` functions.
|
||||
* @returns {boolean}
|
||||
* Whether `node` is a node and passes a test.
|
||||
*/
|
||||
export const is: ((<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {
|
||||
type: Condition[number];
|
||||
}) & (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {
|
||||
type: Condition[number];
|
||||
}) & (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {
|
||||
type: Condition;
|
||||
}) & (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) & (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) & ((node?: null | undefined) => false) & ((node: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) & ((node: unknown, test?: Test, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => boolean));
|
||||
/**
|
||||
* Generate an assertion from a test.
|
||||
*
|
||||
* Useful if you’re going to test many nodes, for example when creating a
|
||||
* utility where something else passes a compatible test.
|
||||
*
|
||||
* The created function is a bit faster because it expects valid input only:
|
||||
* a `node`, `index`, and `parent`.
|
||||
*
|
||||
* @param {Test} test
|
||||
* * when nullish, checks if `node` is a `Node`.
|
||||
* * when `string`, works like passing `(node) => node.type === test`.
|
||||
* * when `function` checks if function passed the node is true.
|
||||
* * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
|
||||
* * when `array`, checks if any one of the subtests pass.
|
||||
* @returns {Check}
|
||||
* An assertion.
|
||||
*/
|
||||
export const convert: ((<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {
|
||||
type: Condition;
|
||||
}) & (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) & (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) & ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) & ((test?: Test) => Check));
|
||||
export type Predicate<Fn, Fallback> = Fn extends (value: any) => value is infer Thing ? Thing : Fallback;
|
||||
/**
|
||||
* Check that an arbitrary value is a node.
|
||||
*/
|
||||
export type Check = (this: unknown, node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined) => boolean;
|
||||
/**
|
||||
* Object to check for equivalence.
|
||||
*
|
||||
* Note: `Node` is included as it is common but is not indexable.
|
||||
*/
|
||||
export type Props = Record<string, unknown> | Node;
|
||||
/**
|
||||
* Check for an arbitrary node.
|
||||
*/
|
||||
export type Test = Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined;
|
||||
/**
|
||||
* Check if a node passes a test.
|
||||
*/
|
||||
export type TestFunction = (this: unknown, node: Node, index?: number | undefined, parent?: Parent | undefined) => boolean | undefined | void;
|
||||
import type { Parent } from 'unist';
|
||||
import type { Node } from 'unist';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
Reference in new issue
Block a user