chore(stage-ui,stage-tamagotchi): removed useless
This commit is contained in:
@@ -129,7 +129,7 @@ export async function generateHeadless(params: {
|
||||
|
||||
// We hash the globals (excluding the heavy image already covered by imageHash)
|
||||
// to ensure that changing a workflow or provider setting triggers a unique execution.
|
||||
const { image, ...globalsForFingerprint } = activeGlobals
|
||||
const { image: _image, ...globalsForFingerprint } = activeGlobals
|
||||
const globalsHash = createHash('sha256').update(JSON.stringify(globalsForFingerprint)).digest('hex')
|
||||
|
||||
const fingerprint = JSON.stringify({
|
||||
@@ -365,7 +365,7 @@ async function handleArtistryTrigger(params: {
|
||||
params.widgetsManager.updateWidget({
|
||||
id: params.id,
|
||||
componentProps: {
|
||||
...(existing?.componentProps as any || {}),
|
||||
...(existing?.componentProps as any),
|
||||
...statusUpdate,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -75,7 +75,7 @@ export class ReplicateProvider implements ArtistryProvider {
|
||||
|
||||
// 2. Merge overrides from the "JSON Parameters" textarea if present
|
||||
if (request.extra) {
|
||||
const { image, internalJobId, remixId, ...rest } = request.extra
|
||||
const { image: _image, internalJobId: _internalJobId, remixId: _remixId, ...rest } = request.extra
|
||||
// [BY DESIGN]: Strip 'prompt' from rest to avoid overwriting the prefixed version from the bridge.
|
||||
const { prompt: _overriddenPrompt, ...safeRest } = rest as any
|
||||
inputOptions = { ...inputOptions, ...safeRest }
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
const { spawnSync } = require('node:child_process')
|
||||
|
||||
const query = `
|
||||
query {
|
||||
repository(owner: "moeru-ai", name: "airi") {
|
||||
pullRequest(number: 1636) {
|
||||
reviewThreads(last: 80) {
|
||||
nodes {
|
||||
id
|
||||
isResolved
|
||||
comments(last: 1) {
|
||||
nodes {
|
||||
body
|
||||
author {
|
||||
login
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const result = spawnSync('gh', ['api', 'graphql', '-f', `query=${query}`], {
|
||||
encoding: 'utf8',
|
||||
maxBuffer: 10 * 1024 * 1024,
|
||||
})
|
||||
|
||||
if (result.error) {
|
||||
console.error(result.error)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const data = JSON.parse(result.stdout)
|
||||
const threads = data.data.repository.pullRequest.reviewThreads.nodes
|
||||
const unresolved = threads.filter(t => !t.isResolved)
|
||||
|
||||
console.log(JSON.stringify(unresolved, null, 2))
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 294 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 519 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 MiB |
@@ -5,8 +5,8 @@ import { nanoid } from 'nanoid'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, onScopeDispose, reactive, ref, watch } from 'vue'
|
||||
|
||||
import cozyTeaCornerInPastelHuesUrl from '../assets/backgrounds/cozy-tea-corner-in-pastel-hues.png'
|
||||
import cuteStreamingRoomWithPastelDecorUrl from '../assets/backgrounds/cute-streaming-room-with-pastel-decor.png'
|
||||
import cozyTeaCornerInPastelHuesUrl from '../assets/backgrounds/cozy-tea-corner-in-pastel-hues.avif'
|
||||
import cuteStreamingRoomWithPastelDecorUrl from '../assets/backgrounds/cute-streaming-room-with-pastel-decor.avif'
|
||||
|
||||
import { useAiriCardStore } from './modules/airi-card'
|
||||
|
||||
@@ -52,7 +52,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
try {
|
||||
const url = URL.createObjectURL(blob)
|
||||
backgroundUrls[id] = url
|
||||
console.log(`[BackgroundStore] Created ObjectURL for ${id}`)
|
||||
return url
|
||||
}
|
||||
catch (e) {
|
||||
@@ -81,7 +80,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
if (loading.value && entries.value.size > 0)
|
||||
return // Already initializing
|
||||
|
||||
console.log('[BackgroundStore] Initializing store...')
|
||||
loading.value = true
|
||||
try {
|
||||
const loadedEntries = new Map<string, BackgroundEntry>()
|
||||
@@ -167,13 +165,10 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
const url = backgroundUrls[id]
|
||||
if (url) {
|
||||
URL.revokeObjectURL(url)
|
||||
console.log(`[BackgroundStore] Revoked stale ObjectURL for ${id}`)
|
||||
}
|
||||
delete backgroundUrls[id]
|
||||
}
|
||||
})
|
||||
|
||||
console.log(`[BackgroundStore] Store initialized with ${loadedEntries.size} entries.`)
|
||||
}
|
||||
catch (error) {
|
||||
console.error('[BackgroundStore] Initialization failed:', error)
|
||||
@@ -186,15 +181,12 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
// Cross-window synchronization
|
||||
const { data: syncSignal, post: broadcastSync } = useBroadcastChannel({ name: 'airi:background-sync' })
|
||||
|
||||
watch(syncSignal, (val) => {
|
||||
console.log(`[BackgroundStore] Received sync signal (${val}), re-initializing...`)
|
||||
watch(syncSignal, () => {
|
||||
initializeStore()
|
||||
})
|
||||
|
||||
async function sync() {
|
||||
const timestamp = Date.now()
|
||||
console.log(`[BackgroundStore] Sending sync signal: ${timestamp}`)
|
||||
broadcastSync(timestamp)
|
||||
broadcastSync(Date.now())
|
||||
}
|
||||
|
||||
// Auto-init once
|
||||
@@ -207,7 +199,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
return null
|
||||
const bgId = airiCardStore.activeCard.extensions?.airi?.modules?.activeBackgroundId
|
||||
if (!bgId || bgId === 'none') {
|
||||
console.log('[BackgroundStore] activeBackgroundUrl: No ID or "none"')
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -224,7 +215,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
// NOTICE: We gate the return on entry existence to ensure deleted backgrounds
|
||||
// (removed from other windows) do not keep rendering via a stale cached URL.
|
||||
if (url && entryExists) {
|
||||
console.log(`[BackgroundStore] activeBackgroundUrl resolved for "${lookupId}" (from URL map)`)
|
||||
return url
|
||||
}
|
||||
|
||||
@@ -237,12 +227,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
return null // Should have been caught by backgroundUrls check above if entry is valid
|
||||
})
|
||||
|
||||
// List of available backgrounds for the current character
|
||||
const availableBackgrounds = computed(() => {
|
||||
const airiCardStore = useAiriCardStore()
|
||||
return getCharacterBackgrounds.value(airiCardStore.activeCardId)
|
||||
})
|
||||
|
||||
const getCharacterBackgrounds = computed(() => (characterId?: string) => {
|
||||
const list = Array.from(entries.value.values()).filter((e) => {
|
||||
// Shared (builtin/scene) or Journal/Selfie for specific character
|
||||
@@ -254,10 +238,10 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
})).sort((a, b) => b.createdAt - a.createdAt)
|
||||
})
|
||||
|
||||
// The 'journal' store functionality needs to access just the journal entries for the active char
|
||||
const journalEntries = computed(() => {
|
||||
// List of available backgrounds for the current character
|
||||
const availableBackgrounds = computed(() => {
|
||||
const airiCardStore = useAiriCardStore()
|
||||
return getCharacterJournalEntries.value(airiCardStore.activeCardId)
|
||||
return getCharacterBackgrounds.value(airiCardStore.activeCardId)
|
||||
})
|
||||
|
||||
const getCharacterJournalEntries = computed(() => (characterId?: string) => {
|
||||
@@ -269,6 +253,12 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
})).sort((a, b) => b.createdAt - a.createdAt)
|
||||
})
|
||||
|
||||
// The 'journal' store functionality needs to access just the journal entries for the active char
|
||||
const journalEntries = computed(() => {
|
||||
const airiCardStore = useAiriCardStore()
|
||||
return getCharacterJournalEntries.value(airiCardStore.activeCardId)
|
||||
})
|
||||
|
||||
async function addBackground(
|
||||
type: 'scene' | 'journal' | 'selfie',
|
||||
blob: Blob,
|
||||
@@ -306,7 +296,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
|
||||
initializeStore()
|
||||
await sync()
|
||||
console.log(`[BackgroundStore] Successfully added background: ${id} (${type})`)
|
||||
return id
|
||||
}
|
||||
catch (error) {
|
||||
@@ -330,7 +319,6 @@ export const useBackgroundStore = defineStore('background', () => {
|
||||
const url = backgroundUrls[id]
|
||||
if (url) {
|
||||
URL.revokeObjectURL(url)
|
||||
console.log(`[BackgroundStore] Revoked ObjectURL for ${id}`)
|
||||
}
|
||||
delete backgroundUrls[id]
|
||||
broadcastSync(Date.now())
|
||||
|
||||
@@ -192,7 +192,15 @@ export const useArtistryStore = defineStore('artistry', () => {
|
||||
* @param store - The artistry store instance (from useArtistryStore())
|
||||
*/
|
||||
export function resolveArtistryConfigFromStore(store: any): ResolvedArtistryConfig {
|
||||
const unwrap = (val: any) => (isRef(val) ? val.value : val)
|
||||
const unwrap = (val: any) => {
|
||||
if (isRef(val))
|
||||
return val.value
|
||||
|
||||
if (val && typeof val === 'object' && 'value' in val && Object.keys(val).length === 1)
|
||||
return val.value
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
return {
|
||||
provider: unwrap(store.activeProvider),
|
||||
|
||||
Binary file not shown.
@@ -1,16 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": "PRRT_kwDONXX6d859HYhL",
|
||||
"isResolved": false,
|
||||
"comments": {
|
||||
"nodes": [
|
||||
{
|
||||
"body": "**<sub><sub></sub></sub> Keep prefixed prompt from being overwritten by extra fields**\n\n`generate()` first writes `inputOptions.prompt` from `request.prompt` (which already includes card/global `promptPrefix`), but then immediately spreads `rest` from `request.extra` over it. In widget-triggered flows, `request.extra` includes the raw `componentProps.prompt`, so this overwrite drops the normalized/prefixed prompt and silently bypasses configured style prefixes for Replicate outputs. Preserve the computed prompt (or strip `prompt` from `rest`) before merging provider extras.\n\nUseful? React with 👍 / 👎.",
|
||||
"author": {
|
||||
"login": "chatgpt-codex-connector"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user