diff --git a/index.html b/index.html index d3b78a2..f8c03a8 100644 --- a/index.html +++ b/index.html @@ -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; diff --git a/main.py b/main.py index 1224d9c..fe95c65 100644 --- a/main.py +++ b/main.py @@ -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()