-
Notifications
You must be signed in to change notification settings - Fork 1
PR test Altin #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… Harden the broadcast auth so only the owner of a given analysis can subscribe
…loading state for now
…tured the templates
|
|
||
| it('broadcasts an error when the LLM client throws', function () { | ||
| // Bind a permissive moderation | ||
| app()->bind(ModerationClient::class, fn () => new class implements ModerationClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: could use fake implementation and just making it safe by default
| }); | ||
|
|
||
| // Bind an LLM client that throws | ||
| app()->bind(LlmClient::class, fn () => new class implements LlmClient { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: can use fake llm client and force to throw exception
| <template> | ||
| <div class="min-h-screen w-full flex items-center justify-center bg-gradient-to-b from-slate-50 to-slate-100 p-6"> | ||
| <div class="w-full max-w-md"> | ||
| <div class="bg-white/90 backdrop-blur rounded-2xl shadow-xl p-8 border border-slate-200"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could have been merged with abode div
|
|
||
| <form @submit.prevent="submit" class="space-y-4"> | ||
| <div> | ||
| <label class="block text-sm font-medium text-slate-700 mb-1">Email</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for attribute is missing
|
|
||
| <button type="submit" :disabled="loading" | ||
| class="w-full inline-flex items-center justify-center gap-2 rounded-xl bg-indigo-600 text-white font-medium px-4 py-2.5 hover:bg-indigo-700 disabled:opacity-60 disabled:cursor-not-allowed transition"> | ||
| <svg v-if="loading" class="h-5 w-5 animate-spin" viewBox="0 0 24 24" fill="none"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could have been an asset
| const email = ref('') | ||
| const password = ref('') | ||
| const { user, fetchUser } = useAuth() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch user could have been directly chained in useAuth.
useAuth composable could have been something like :
const { user, isLoggedIn } = useAuth()
| gap: 1rem; | ||
| const sendPrompt = async () => { | ||
| if (!prompt.value.trim() || loading.value) return | ||
| loading.value = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loading.value should be mutated in useLLMChannel composable
| margin-right: 1rem; | ||
| width: 70%; | ||
| } | ||
| const envelope = computed<LlmResultEnvelope | null>(() => result.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary
|
|
||
| <script setup lang="ts"> | ||
| import type { LlmErrorResult, LlmPayload } from '@/types/llm' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type definitions are missing
| (r as LlmErrorResult).status === 'error' | ||
| </script> | ||
|
|
||
| <style scoped> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be removed
| </div> | ||
|
|
||
| <!-- Error --> | ||
| <div v-else-if="isError(data.result)" class="rounded-xl border border-rose-200 bg-rose-50 text-rose-700 p-4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to many as
|
|
||
| channel = echo.private('analysis') | ||
|
|
||
| const { data } = await api.post('/api/prompt', { prompt }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should managed errors
No description provided.