算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
lov-frontend【设计与创意】在 DCloud uni-app 前端项目里封装 API 网关调用层:统一 uni.request 封装(baseURL、token 注入、 可复制的错误提示、SSE 流式支持),并按网关端点清单生成模块化 API 文件。触发:给 uni-app 封装 网关请求层 / 前端对接网关 / wrap the gateway request layer in a uni-app project。
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
在 DCloud uni-app 前端项目里生成一层网关调用封装:统一的 request 入口(baseURL / token / 错误
处理 / 流式),以及按后端网关端点清单生成的模块化 API 文件。页面与组件只 import 模块化 API,
不直接碰 uni.request。
lov-backend 模块。Every generated Skill is connected to the shared user-profile/v1 contract in
skill.yaml. Read the shared user, brand, workspace, preferences, and this
Skill's skills.<skill_id> namespace at the start of every run. Keep the source
portable: resolved personal values belong in the shared profile, never here.
When the user directly states a durable preference or brand fact, persist it
through scripts/profile_store.py and report the saved profile path. Put
Skill-specific values under records.<field>; use brand.<field> or
user.<field> for shared values. Do not persist inferred secrets or credentials.
See references/user-profile.md for the complete contract.
Read references/skill-composition.md before deciding whether to invoke or
extend any adjacent capability. The record distinguishes optional upstream and
downstream handoffs from embedded Kit modules. Do not silently depend on a
sibling Skill that is not shipped with this source.
You MUST follow these steps in order.
SKILL_DIR if the environment provides it;否则从当前上下文推断已安装的模块目录。pages.json 与 manifest.json)。uni.getStorageSync 的哪个 key)。references/uni-app-client-patterns.md 掌握 uni-app 请求约定。Resolve context.profile on every invocation. The precedence is current request,
project context, Skill-specific profile records, shared preferences, shared
brand/user profile, then safe defaults. A direct user statement about a durable
preference or brand fact should be saved with scripts/profile_store.py record
using --confirm, followed by a concise saved-path report.
.ts 还是 .js)。api/ 模块 + 一个页面调用示例 + 用法说明。lov-backend。api/config.ts(或等价位置)集中放 baseURL;dev/prod 可按 process.env
或 uni.getSystemInfoSync().platform 等区分,不散落在页面里。api/request.ts,对 uni.request 做 Promise 化:
Content-Type 按需设置。Authorization: Bearer <token>,token 从 uni.getStorageSync(key) 读取,
支持自定义 getter。standard_error_handler 的 detail)统一抛错,
提示信息可复制并携带 context_id/requestId 等便于 debug 的字段。uni.request 的 enableChunked 或事件源适配器封装。api/<domain>.ts,每个端点一个函数(如 api/llm.ts 的
callBase(body)),页面直接 import { callBase } from '@/api/llm'。api/types.ts 定义网关响应与错误类型;TS 工程用 interface,JS 工程可省。uni.request 等内置 API,无第三方依赖。