Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apps/mobile/harmonyos/AppScope/app.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// upgrades retain encrypted sessions, preferences, and watch handoff data.
"bundleName": "com.bitfun.app",
"vendor": "OpenBitFun",
"versionCode": 5,
"versionCode": 8,
"versionName": "1.0.0", // x-release-please-version
"buildVersion": "1",
"icon": "$media:openbitfun_app_icon",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { RemoteI18n } from '../../i18n/RemoteI18n';
import { HarnessProfilePolicy } from '../policy/HarnessProfilePolicy';
import { CARD, INK, LINE, MUTED, SHADOW_SUBTLE, TRANSPARENT } from './Theme';

/** Compact creation-time selector for the three supported Harness profiles. */
/** Compact creation-time selector for the supported Harness profiles. */
@ComponentV2
export struct HarnessProfileMenu {
@Param showTitle: boolean = true;
@Param includeCowork: boolean = false;
@Param menuWidth: number = 190;
@Param menuWidth: number = 160;
@Event onSelect: (agentType: string) => void = (_agentType: string) => {};

build() {
Expand All @@ -22,9 +22,10 @@ export struct HarnessProfileMenu {
.height(30)
.padding({ left: 14, right: 14 })
}
this.ProfileRow('minimal', RemoteI18n.t('remote.harness.minimal'), 1)
this.ProfileRow('standard', RemoteI18n.t('remote.harness.standard'), 2)
this.ProfileRow('ultimate', RemoteI18n.t('remote.harness.ultimate'), 3)
this.ProfileRow('minimal', RemoteI18n.t('remote.harness.minimal'))
this.ProfileRow('standard', RemoteI18n.t('remote.harness.standard'))
this.ProfileRow('ultimate', RemoteI18n.t('remote.harness.ultimate'))
this.ProfileRow('creative', RemoteI18n.t('remote.harness.creative'))
if (this.includeCowork) {
Divider().strokeWidth(0.5).color(LINE).margin({ top: 4, bottom: 4 })
this.AgentRow('Cowork', 'Cowork')
Expand All @@ -39,9 +40,9 @@ export struct HarnessProfileMenu {
}

@Builder
private ProfileRow(profileId: string, label: string, density: number) {
private ProfileRow(profileId: string, label: string) {
Row({ space: 12 }) {
this.DensityMark(density)
this.ProfileIcon(profileId)
Text(label)
.fontSize(MobileDesignTypography.titleSmall.size)
.fontWeight(FontWeight.Medium)
Expand Down Expand Up @@ -79,19 +80,15 @@ export struct HarnessProfileMenu {
}

@Builder
private DensityMark(density: number) {
Row({ space: 2 }) {
Text('').width(4).height(8).backgroundColor(INK).borderRadius(2)
if (density >= 2) {
Text('').width(4).height(13).backgroundColor(INK).borderRadius(2)
}
if (density >= 3) {
Text('').width(4).height(18).backgroundColor(INK).borderRadius(2)
}
private ProfileIcon(profileId: string) {
if (profileId === 'minimal') {
Image($r('app.media.harness_minimal')).width(22).height(22).objectFit(ImageFit.Contain).draggable(false)
} else if (profileId === 'standard') {
Image($r('app.media.harness_standard')).width(22).height(22).objectFit(ImageFit.Contain).draggable(false)
} else if (profileId === 'ultimate') {
Image($r('app.media.harness_ultimate')).width(22).height(22).objectFit(ImageFit.Contain).draggable(false)
} else {
Image($r('app.media.harness_creative')).width(22).height(22).objectFit(ImageFit.Contain).draggable(false)
}
.width(22)
.height(22)
.alignItems(VerticalAlign.Center)
.justifyContent(FlexAlign.Center)
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/** Maps the three product execution levels onto the host's canonical Agents. */
/** Maps the product execution levels onto the host's canonical Agents. */
export class HarnessProfilePolicy {
static agentType(profileId: string): string {
switch (profileId.trim().toLowerCase()) {
case 'minimal': return 'minimal';
case 'ultimate': return 'Ultra';
case 'creative': return 'Creative';
default: return 'agentic';
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading