This commit is contained in:
retoor 2025-08-04 19:57:14 +02:00
parent 52715e8b5f
commit f8bf8af4d3
2 changed files with 9 additions and 4 deletions

View File

@ -35,8 +35,9 @@
return;
}
const { hash } = await res.json();
const ws = new WebSocket(`ws://${location.host}/ws/${hash}`);
ws.onmessage = evt => {
const protocol = location.protocol === 'https:' ? 'wss://' : 'ws://';
const ws = new WebSocket(`${protocol}${location.host}/ws/${hash}`);
ws.onmessage = evt => {
const data = JSON.parse(evt.data);
if (data.type === 'message') addUpdate(data.content);
else if (data.type === 'redirect') location.href = data.url;

View File

@ -484,8 +484,12 @@ async def process_repo(url: str, repo_hash: str, is_user_request: bool = False):
prompt = f"""1. Generate a git one liner based on git diff
2. Example of a good message is: `feat: Enhanced message display with emojis and code highlighting`
3. Example of a good message is: `fix: Fixed a bug that caused the app to crash`
4. Do not include explanations in your response. It must look like human written.
5. The diff to respond to with a git one liner: {messages}"""
4. Example of a good message is: `docs: Updated README with installation instructions`
5. Example of a good message is: `refactor: Simplified user authentication logic for better readability`
6. Example of a good message is `build: Upgraded project dependencies to latest versions`
7. Prefixes available to use in the message are: feat, fix, docs, refactor, build.
8. Do not include explanations in your response. It must look like human written.
9. The diff to respond to with a git one liner: {messages}"""
for _ in range(3):
try:
ai = client.APIClient()