chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -41,11 +41,7 @@ export class CustomEditor extends Editor {
|
||||
this.onShiftTab();
|
||||
return;
|
||||
}
|
||||
if (
|
||||
matchesKey(data, Key.escape) &&
|
||||
this.onEscape &&
|
||||
!this.isShowingAutocomplete()
|
||||
) {
|
||||
if (matchesKey(data, Key.escape) && this.onEscape && !this.isShowingAutocomplete()) {
|
||||
this.onEscape();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
type SelectItem,
|
||||
SelectList,
|
||||
type SettingItem,
|
||||
SettingsList,
|
||||
} from "@mariozechner/pi-tui";
|
||||
import { type SelectItem, SelectList, type SettingItem, SettingsList } from "@mariozechner/pi-tui";
|
||||
import { selectListTheme, settingsListTheme } from "../theme/theme.js";
|
||||
|
||||
export function createSelectList(items: SelectItem[], maxVisible = 7) {
|
||||
@@ -16,11 +11,5 @@ export function createSettingsList(
|
||||
onCancel: () => void,
|
||||
maxVisible = 7,
|
||||
) {
|
||||
return new SettingsList(
|
||||
items,
|
||||
maxVisible,
|
||||
settingsListTheme,
|
||||
onChange,
|
||||
onCancel,
|
||||
);
|
||||
return new SettingsList(items, maxVisible, settingsListTheme, onChange, onCancel);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { Box, Container, Markdown, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import {
|
||||
formatToolDetail,
|
||||
resolveToolDisplay,
|
||||
} from "../../agents/tool-display.js";
|
||||
import { formatToolDetail, resolveToolDisplay } from "../../agents/tool-display.js";
|
||||
import { markdownTheme, theme } from "../theme/theme.js";
|
||||
|
||||
type ToolResultContent = {
|
||||
@@ -124,9 +121,7 @@ export class ToolExecutionComponent extends Container {
|
||||
if (!this.expanded && text) {
|
||||
const lines = text.split("\n");
|
||||
const preview =
|
||||
lines.length > PREVIEW_LINES
|
||||
? `${lines.slice(0, PREVIEW_LINES).join("\n")}\n…`
|
||||
: text;
|
||||
lines.length > PREVIEW_LINES ? `${lines.slice(0, PREVIEW_LINES).join("\n")}\n…` : text;
|
||||
this.output.setText(preview);
|
||||
} else {
|
||||
this.output.setText(text);
|
||||
|
||||
Reference in New Issue
Block a user