Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7a10787
Hack
moczolaszlo May 7, 2025
12b5440
updated info
trapacska May 8, 2025
967f328
added process plan function call
trapacska May 8, 2025
2ea5b5d
System prompt states
ofalvai May 8, 2025
eed6056
Hack
moczolaszlo May 8, 2025
34d6a62
Fix missing user message in state
ofalvai May 8, 2025
13831d7
Extract prompts
ofalvai May 8, 2025
c60fcce
added script processing tool
trapacska May 8, 2025
95b61c8
added plan
trapacska May 8, 2025
ea48bcb
resolved conflict
trapacska May 8, 2025
0326c0f
updated inputs model
trapacska May 8, 2025
9224eea
Hack
moczolaszlo May 8, 2025
dce688f
Always call plan function
ofalvai May 8, 2025
eb593eb
added action
trapacska May 8, 2025
2fb2cdb
update action
trapacska May 8, 2025
bb4f5a6
added tool result
trapacska May 8, 2025
00a801c
Hack
moczolaszlo May 8, 2025
aeccb70
Hack
moczolaszlo May 8, 2025
b1c870f
iterate on plan
trapacska May 8, 2025
ccfa557
Hack
moczolaszlo May 8, 2025
48c064f
New coder system prompt
ofalvai May 8, 2025
d69b655
added code gen
trapacska May 8, 2025
b0acf03
added tool selection
trapacska May 8, 2025
9c2b692
Hack
moczolaszlo May 8, 2025
bd1644a
Update example prompts
ofalvai May 8, 2025
4f89b19
Purr-fect everything
ofalvai May 8, 2025
0fe64ba
Hack
moczolaszlo May 8, 2025
6f5cdbf
updated prompt
trapacska May 8, 2025
370d2aa
updated prompts
trapacska May 8, 2025
c701f9b
added reset
trapacska May 8, 2025
7c7d6e0
cleanup
trapacska May 8, 2025
aceffce
Hack
moczolaszlo May 8, 2025
515a7cc
Hack
moczolaszlo May 8, 2025
929520d
Hack
moczolaszlo May 8, 2025
1815460
Hack
moczolaszlo May 8, 2025
515680b
iteration on outputs
trapacska May 8, 2025
35e94e4
Everything
ofalvai May 8, 2025
67e3c57
Set temp
ofalvai May 8, 2025
6ddb378
Hack
moczolaszlo May 8, 2025
8d97119
Hack
moczolaszlo May 9, 2025
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
51 changes: 10 additions & 41 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"monaco-editor": "0.51.0",
"monaco-yaml": "^5.2.3",
"node-diff3": "^3.1.2",
"openai": "^4.97.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.56.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { Editor } from '@monaco-editor/react';
import { editor } from 'monaco-editor';
import { useCallback, useEffect, useState } from 'react';

import MonacoUtils from '@/core/utils/MonacoUtils';

const EDITOR_OPTIONS = {
fontSize: 13,
fontFamily: 'mono',
roundedSelection: false,
scrollBeyondLastLine: false,
stickyScroll: { enabled: true },
contextmenu: false,
minimap: { enabled: false },
padding: { top: 16, bottom: 16 },
};

type EditorWrapperProps = {
value: string;
defaultValue?: string;
onChange: (value: string | null) => void;
readOnly?: boolean;
};

const EditorWrapper = (props: EditorWrapperProps) => {
const { defaultValue, onChange, readOnly, value } = props;
const [editorInstance, setEditor] = useState<editor.IStandaloneCodeEditor>();

const updateEditorHeight = useCallback(() => {
if (!editorInstance) {
return;
}

const contentHeight = Math.min(editorInstance?.getContentHeight() || 250, window.innerHeight * 0.5);
requestAnimationFrame(() =>
editorInstance?.layout({
height: contentHeight,
width: editorInstance?.getLayoutInfo().width,
}),
);
}, [editorInstance]);

useEffect(() => {
editorInstance?.onDidContentSizeChange(updateEditorHeight);
updateEditorHeight();
return undefined;
}, [editorInstance, updateEditorHeight]);

return (
<Editor
theme="vs-dark"
onMount={setEditor}
defaultLanguage="shell"
options={{ ...EDITOR_OPTIONS, readOnly }}
value={value || defaultValue}
onChange={(changedValue) => onChange(changedValue || null)}
beforeMount={MonacoUtils.configureEnvVarsCompletionProvider}
/>
);
};
export default EditorWrapper;
Loading