Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions openspec/changes/at-filepath-autocomplete-tui/.openspec.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions openspec/changes/at-filepath-autocomplete-tui/design.md

This file was deleted.

36 changes: 0 additions & 36 deletions openspec/changes/at-filepath-autocomplete-tui/proposal.md

This file was deleted.

This file was deleted.

64 changes: 0 additions & 64 deletions openspec/changes/at-filepath-autocomplete-tui/tasks.md

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"ansi-escapes": "^7.3.0",
"ansi-regex": "^6.2.2",
"adm-zip": "^0.5.16",
"fast-glob": "^3.3.3",
"chalk": "^6.0.0",
"cli-highlight": "^2.1.11",
"cli-table3": "^0.6.5",
Expand Down
38 changes: 0 additions & 38 deletions src/tui/AutoCompleteDropdown.js

This file was deleted.

53 changes: 1 addition & 52 deletions src/tui/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { useState, useEffect, useRef, useCallback } from "react";
import React, { useState, useEffect, useRef } from "react";
import { Box, useApp, useInput, useWindowSize } from "ink";
import { CommandParser } from "./commandParser.js";
import { ConversationPanel } from "./conversationPanel.js";
import { StatusBar } from "./statusBar.js";
import { InputPanel } from "./inputPanel.js";
import { Banner } from "./banner.js";
import { OnboardingPanel } from "./onboardingPanel.js";
import { AutoCompleteDropdown } from "./AutoCompleteDropdown.js";
import { createSession } from "../session/factory.js";
import { setConfigValue } from "../config/loader.js";
import { isAvailable, getGcCalls } from "../memory/gc.js";
Expand Down Expand Up @@ -40,11 +39,6 @@ export default function App({
const [inputFocused, setInputFocused] = useState(true);
const [contextSize, setContextSize] = useState(0);
const [isCompacting, setIsCompacting] = useState(false);
// Autocomplete state
const [inAutocomplete, setInAutocomplete] = useState(false);
const [autocompleteQuery, setAutocompleteQuery] = useState("");
const [autocompleteMatches, setAutocompleteMatches] = useState([]);
const [autocompleteSelectedIndex, setAutocompleteSelectedIndex] = useState(0);
const messageListRef = useRef(null);
const abortControllerRef = useRef(null);
const isStreamingRef = useRef(false);
Expand Down Expand Up @@ -131,39 +125,6 @@ export default function App({
}
};

/**
* Handle autocomplete file selection.
* @param {string} fullPath - The selected file path
* @param {string[]} _results - Search results (unused, for future use)
*/
const handleAutocompleteSelect = useCallback((fullPath, _results) => {
if (fullPath) {
setInputText(fullPath);
setInAutocomplete(false);
setAutocompleteQuery("");
setAutocompleteMatches([]);
setAutocompleteSelectedIndex(0);
}
}, []);

/**
* Handle autocomplete search results from InputPanel.
* @param {string[]} results - The search results to display
*/
const handleAutocompleteResults = useCallback((results) => {
setAutocompleteMatches(results);
}, []);

/**
* Handle autocomplete dismiss (Esc key).
*/
const handleAutocompleteDismiss = useCallback(() => {
setInAutocomplete(false);
setAutocompleteQuery("");
setAutocompleteMatches([]);
setAutocompleteSelectedIndex(0);
}, []);

/**
* Handle IRC-style command parsing with dispatch table.
* @param {string} trimmed - The command string (sans leading whitespace)
Expand Down Expand Up @@ -993,19 +954,7 @@ export default function App({
onFocus: () => setInputFocused(true),
onBlur: () => setInputFocused(false),
focus: inputFocused,
inAutocomplete,
autocompleteQuery,
autocompleteMatches,
autocompleteSelectedIndex,
onAutocompleteSelect: handleAutocompleteSelect,
onAutocompleteResults: handleAutocompleteResults,
}),
inAutocomplete &&
React.createElement(AutoCompleteDropdown, {
matches: autocompleteMatches,
selectedIndex: autocompleteSelectedIndex,
onDismiss: handleAutocompleteDismiss,
}),
)
: null,
);
Expand Down
Loading