mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
feat(ohos): 鸿蒙端聊天历史分段懒加载 + 首次提交完整工程
原有 cmd/ohos/HomeAgent 是未入库的鸿蒙原生 ArkTS 工程,本次随改动一并入库, 保证他人 clone 后可直接编译(含 .gitignore 排除 build/oh_modules/签名材料, 提供 build-profile.json5.example 模板)。 本次功能改动(与 WebUI / GUI 三端对齐): - /chat/history 首屏只拉最新 CHAT_PAGE_SIZE(40) 条,1.26MB → 48.5KB - 抽出 parseHistoryPayload() 复用解析,记录 chatOffset/chatHasMore - 新增 loadOlderChat():向上滚动触顶(yOffset<60)懒加载更早页 - 工具调用 args/result 与 reasoning_content 完整还原,不做裁剪 构建验证:hvigorw assembleHap BUILD SUCCESSFUL(7.8s,ChatPage 零告警)
This commit is contained in:
57
cmd/ohos/HomeAgent/build-profile.json5.example
Normal file
57
cmd/ohos/HomeAgent/build-profile.json5.example
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
app: {
|
||||
products: [
|
||||
{
|
||||
name: 'default',
|
||||
signingConfig: 'default',
|
||||
compileSdkVersion: '26.0.0',
|
||||
compatibleSdkVersion: '6.1.1(24)',
|
||||
runtimeOS: 'HarmonyOS',
|
||||
buildOption: {
|
||||
strictMode: {
|
||||
useNormalizedOHMUrl: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
buildModeSet: [
|
||||
{
|
||||
name: 'debug',
|
||||
},
|
||||
{
|
||||
name: 'release',
|
||||
},
|
||||
],
|
||||
// 复制为 build-profile.json5 后,把下面四项换成本机 DevEco 生成的调试签名材料
|
||||
// (默认在 ~/.ohos/config/ 下),keyPassword / storePassword 用自己的值。
|
||||
signingConfigs: [
|
||||
{
|
||||
name: 'default',
|
||||
type: 'HarmonyOS',
|
||||
material: {
|
||||
certpath: 'REPLACE_WITH_YOUR_CER_PATH',
|
||||
keyAlias: 'debugKey',
|
||||
keyPassword: 'REPLACE_WITH_YOUR_KEY_PASSWORD',
|
||||
profile: 'REPLACE_WITH_YOUR_P7B_PATH',
|
||||
signAlg: 'SHA256withECDSA',
|
||||
storeFile: 'REPLACE_WITH_YOUR_P12_PATH',
|
||||
storePassword: 'REPLACE_WITH_YOUR_STORE_PASSWORD',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
modules: [
|
||||
{
|
||||
name: 'entry',
|
||||
srcPath: './entry',
|
||||
targets: [
|
||||
{
|
||||
name: 'default',
|
||||
applyToProducts: [
|
||||
'default',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user