This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("phx:page-loading-start", (_info) => { | |
Array.from(document.getElementsByTagName("a")).forEach( | |
(a) => (a.dataset.active = "false") | |
); | |
}); | |
window.addEventListener("phx:page-loading-stop", (_info) => { | |
Array.from(document.getElementsByTagName("a")).forEach( | |
(a) => {a.dataset.active = (a.href === document.location.href).toString()} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function usePushEvent<T extends object, Params extends object = object>( | |
eventName: string, | |
defaultValue?: T | |
) { | |
const live = useLiveVue(); | |
const isLoading = ref(false); | |
const isFinished = ref(false); | |
const response = ref<T | undefined>(defaultValue); | |
const error = ref<string | null>(null); | |
const execute = (data: Params) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Prompts.AIMessageSigils do | |
@moduledoc """ | |
Provides sigils for creating AI message structures with liquid template validation. | |
This module includes: | |
- `~SYSTEM` for system messages | |
- `~ASSISTANT` for assistant messages | |
- `~USER` for user messages | |
Each sigil validates the Liquid template syntax at compile time and returns a |
OlderNewer