Skip to content

Commit 1ba477e

Browse files
committed
Merge branch 'nextjs' of https://github.com/Tangeyo/SyntaxSorcerer into nextjs
2 parents a1064b9 + 238b83b commit 1ba477e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can start editing the page by modifying `app/page.js`. The page auto-updates
1212

1313
## How to Use
1414
Each user may upload one codebase to the app's local storage at a time by pasting a link in the topmost input box. This link must be a link to download a .zip file and must be a [valid URL](https://dev.w3.org/html5/spec-LC/urls.html). An existing codebase may be removed at any time during the user session in order to upload another one. Currently, only JavaScript files are supported.\
15-
To send a regular message to the ChatGPT interface, press 'Enter.' Pressing 'Query codebase' will process your prompt, use cosine similarity to find the three most relevant code segments in your codebase, and display an answer to your prompt that considers the files containing these segments.\
15+
To send a regular message to the ChatGPT interface, press 'Enter.' Pressing 'Query codebase' will process your prompt, use cosine similarity to find the three most relevant code segments in your codebase, and display an answer to your prompt that considers the files containing these segments.
1616
## Learn More
1717

1818
To learn more about Next.js, take a look at the following resources:

src/app/page.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,18 @@ export default function Home() {
1212

1313
useEffect(() => {
1414
const checkSeed = () => {
15-
// Check if the seed cookie exists on the client side
1615
const cookies = document.cookie.split('; ').reduce((acc, cookie) => {
1716
const [name, value] = cookie.split('=');
1817
acc[name] = value;
1918
return acc;
2019
}, {});
21-
2220
setHasSeed(!!cookies['seed']);
2321
};
2422
checkSeed();
2523
}, []);
2624

2725
useEffect(() => {
2826
if (!hasSeed) {
29-
// Fetch the seed if it has not been set
3027
fetch(`${process.env.NEXT_PUBLIC_URL}/config/seed`)
3128
.then(response => response.json())
3229
.then(() => setSeedFetched(true))
@@ -47,11 +44,14 @@ export default function Home() {
4744

4845
return (
4946
<div className={styles.wrapper}>
47+
{/* Main content container */}
5048
{/* Main content container */}
5149
<div className={styles.container}>
5250
<div className={styles.flex}>
5351
<Image src="./icon.svg" alt="The app logo, a glowing hexagon." width={80} height={80} />
5452
<h1 className={styles.title}>Syntax Sorcerer</h1>
53+
<Image src="./icon.svg" alt="The app logo, a glowing hexagon." width={80} height={80} />
54+
<h1 className={styles.title}>Syntax Sorcerer</h1>
5555
</div>
5656

5757
{/* Main content: CodebaseControls, Chatbot, QueryControls */}
@@ -73,4 +73,4 @@ export default function Home() {
7373
</div>
7474
</div>
7575
);
76-
}
76+
}

0 commit comments

Comments
 (0)