mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 16:24:58 +00:00
chore: fix formatting
This commit is contained in:
@@ -101,7 +101,14 @@ export function loadAgentIdentity(workspace: string): AgentIdentity | null {
|
|||||||
try {
|
try {
|
||||||
const content = fs.readFileSync(identityPath, "utf-8");
|
const content = fs.readFileSync(identityPath, "utf-8");
|
||||||
const parsed = parseIdentityMarkdown(content);
|
const parsed = parseIdentityMarkdown(content);
|
||||||
if (!parsed.name && !parsed.emoji && !parsed.theme && !parsed.creature && !parsed.vibe && !parsed.avatar) {
|
if (
|
||||||
|
!parsed.name &&
|
||||||
|
!parsed.emoji &&
|
||||||
|
!parsed.theme &&
|
||||||
|
!parsed.creature &&
|
||||||
|
!parsed.vibe &&
|
||||||
|
!parsed.avatar
|
||||||
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return parsed;
|
return parsed;
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ export function fuzzyFilterLower<T extends { searchTextLower?: string }>(
|
|||||||
/**
|
/**
|
||||||
* Prepare items for fuzzy filtering by pre-computing lowercase search text.
|
* Prepare items for fuzzy filtering by pre-computing lowercase search text.
|
||||||
*/
|
*/
|
||||||
export function prepareSearchItems<T extends { label?: string; description?: string; searchText?: string }>(
|
export function prepareSearchItems<
|
||||||
items: T[],
|
T extends { label?: string; description?: string; searchText?: string },
|
||||||
): (T & { searchTextLower: string })[] {
|
>(items: T[]): (T & { searchTextLower: string })[] {
|
||||||
return items.map((item) => {
|
return items.map((item) => {
|
||||||
const parts: string[] = [];
|
const parts: string[] = [];
|
||||||
if (item.label) parts.push(item.label);
|
if (item.label) parts.push(item.label);
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import {
|
|||||||
selectListTheme,
|
selectListTheme,
|
||||||
settingsListTheme,
|
settingsListTheme,
|
||||||
} from "../theme/theme.js";
|
} from "../theme/theme.js";
|
||||||
import {
|
import { FilterableSelectList, type FilterableSelectItem } from "./filterable-select-list.js";
|
||||||
FilterableSelectList,
|
|
||||||
type FilterableSelectItem,
|
|
||||||
} from "./filterable-select-list.js";
|
|
||||||
import { SearchableSelectList } from "./searchable-select-list.js";
|
import { SearchableSelectList } from "./searchable-select-list.js";
|
||||||
|
|
||||||
export function createSelectList(items: SelectItem[], maxVisible = 7) {
|
export function createSelectList(items: SelectItem[], maxVisible = 7) {
|
||||||
|
|||||||
Reference in New Issue
Block a user