Skip to content

Commit

Permalink
Aider 3
Browse files Browse the repository at this point in the history
  • Loading branch information
nang-dev committed Oct 23, 2024
1 parent 5886a84 commit 571a839
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/llm/llms/Aider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public async aiderResetSession(model: string, apiKey: string | undefined): Promi
}

async listModels(): Promise<string[]> {
return ["aider", "claude-3-5-sonnet-20240620", "pearai_model", "gpt-4o"];
return ["claude-3-5-sonnet-20240620", "pearai_model", "gpt-4o"];
}

supportsFim(): boolean {
Expand Down
12 changes: 7 additions & 5 deletions gui/src/components/mainInput/TipTapEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
} from "./getSuggestion";
import { ComboBoxItem } from "./types";
import { isBareChatMode } from '../../util/bareChatMode';
import { useLocation } from "react-router-dom";


const InputBoxDiv = styled.div`
Expand Down Expand Up @@ -117,8 +118,9 @@ const HoverTextDiv = styled.div`
justify-content: center;
`;

const getPlaceholder = (defaultModel, historyLength: number) => {
if (defaultModel?.title?.toLowerCase().includes("aider")) {

const getPlaceholder = (historyLength: number, location: Location | null) => {
if (location?.pathname === "/aiderMode") {
return historyLength === 0
? "Ask me to create, change, or fix anything..."
: "Send a follow-up";
Expand Down Expand Up @@ -310,7 +312,7 @@ function TipTapEditor(props: TipTapEditorProps) {
},
}),
Placeholder.configure({
placeholder: () => getPlaceholder(defaultModel, historyLengthRef.current),
placeholder: () => getPlaceholder(historyLengthRef.current, location),
}),
Paragraph.extend({
addKeyboardShortcuts() {
Expand Down Expand Up @@ -483,7 +485,7 @@ function TipTapEditor(props: TipTapEditorProps) {
});

const editorFocusedRef = useUpdatingRef(editor?.isFocused, [editor]);

useEffect(() => {
const handleShowFile = (event: CustomEvent) => {
const filepath = event.detail.filepath;
Expand All @@ -495,7 +497,7 @@ function TipTapEditor(props: TipTapEditorProps) {
window.removeEventListener('showFile', handleShowFile as EventListener);
};
}, [ideMessenger]);

useEffect(() => {
if (isJetBrains()) {
// This is only for VS Code .ipynb files
Expand Down
1 change: 0 additions & 1 deletion gui/src/components/markdown/FileCreateChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const FileCreateChip = ({ rawCodeBlock }) => {
// try {
// // this does not work, dont waste your time - promise never resolves
// const response = await ideMessenger.ide.fileExists(filePath);
// console.dir("aldsfjkalsdfjk")
// setFileExists(response);
// } catch (error) {
// console.error(`Error checking file existence: ${error}`);
Expand Down

0 comments on commit 571a839

Please sign in to comment.