Skip to content
Open
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
38 changes: 38 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@ members = [
"src/crates/contracts/core-types",
"src/crates/contracts/events",
"src/crates/contracts/runtime-ports",
# taiji-quant 量化引擎 crates
"src/crates/taiji/taiji-abnormal",
"src/crates/taiji/taiji-alert",
"src/crates/taiji/taiji-backtest",
"src/crates/taiji/taiji-bar",
"src/crates/taiji/taiji-blog-gen",
"src/crates/taiji/taiji-cli",
"src/crates/taiji/taiji-content",
"src/crates/taiji/taiji-engine",
"src/crates/taiji/taiji-engine-py",
"src/crates/taiji/taiji-example",
"src/crates/taiji/taiji-executor",
"src/crates/taiji/taiji-growth",
"src/crates/taiji/taiji-knowledge-graph",
"src/crates/taiji/taiji-llm",
"src/crates/taiji/taiji-orderflow",
"src/crates/taiji/taiji-pattern",
"src/crates/taiji/taiji-publisher",
"src/crates/taiji/taiji-realtime",
"src/crates/taiji/taiji-sentiment",
"src/crates/taiji/taiji-strategen",
"src/crates/taiji/taiji-strategy-template",
]

exclude = [
Expand All @@ -49,6 +71,7 @@ resolver = "2"
version = "0.2.14" # x-release-please-version
authors = ["BitFun Team"]
edition = "2021"
license = "MIT"

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "warn"
Expand Down Expand Up @@ -118,6 +141,21 @@ chardetng = "0.1.17"
encoding_rs = "0.8.35"
url = "2"

# taiji-quant 量化引擎依赖
rayon = "1.10"
csv = "1.3"
parking_lot = "0.12"
petgraph = { version = "0.6", features = ["serde-1"] }
jieba-rs = "0.7"
candle-core = "0.7"
candle-nn = "0.7"
ndarray = { version = "0.16", features = ["serde"] }
pyo3 = { version = "0.23", features = ["extension-module"] }
statrs = "0.17"
lettre = { version = "0.11", default-features = false, features = ["builder", "smtp-transport", "tokio1-rustls-tls"] }
tera = "1.20"
crossbeam = "0.8"

# HTTP client
reqwest = { version = "0.13.4", default-features = false, features = ["native-tls", "rustls", "http2", "json", "stream", "multipart", "query", "form"] }

Expand Down
72 changes: 72 additions & 0 deletions docs/plans/persistent-output/progress/commit-results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Commit Results

## 汇总

| # | 分支 | Commit Hash | 状态 |
|---|------|------------|------|
| 1 | `feat/pr-01-session-tree` | `813f5c8cb` | ✅ 已提交 |
| 2 | `feat/pr-02-rbac-poke-warden` | `3c74d9082` | ✅ 已提交 |
| 3 | `feat/pr-03-coordination-tools` | `dcd50fe6c` | ✅ 已提交 |
| 4 | `feat/pr-04-hook-integration` | `e7d69dad9` | ✅ 已提交 |
| 5 | `feat/pr-05-frontend-session-tree` | `81e3451f7` | ⚠️ 无待提交改动 |
| 6 | `feat/pr-06-legion-frontend` | `81e3451f7` | ⚠️ 无待提交改动 |
| 7 | `feat/pr-07-encoding-fixes` | `81e3451f7` | ⚠️ 无待提交改动 |
| 8 | `feat/pr-08-taiji-engine-core` | `2a6bd1c25` | ✅ 已提交 |
| 9 | `feat/pr-09-taiji-remaining` | `ee3be538b` | ✅ 已提交 |
| 10 | `feat-poke` | `662757558` | ✅ 已有独立commit |

## 详细提交记录

### Branch 1: feat/pr-01-session-tree
- **Commit**: `813f5c8cb`
- **Message**: `feat(core): Session Tree 后端 — 契约+服务+运行时注入`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 2: feat/pr-02-rbac-poke-warden
- **Commit**: `3c74d9082`
- **Message**: `feat(core): RBAC权限+Poke协议+Warden狱卒系统`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 3: feat/pr-03-coordination-tools
- **Commit**: `dcd50fe6c`
- **Message**: `feat(core): 事件扩展+Session工具+Agent注册表`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 4: feat/pr-04-hook-integration
- **Commit**: `e7d69dad9`
- **Message**: `feat(core): Agent Hook集成 — SubagentStop→ReviewPropagation+PostToolUse→Poke`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 5: feat/pr-05-frontend-session-tree
- **Status**: 无待提交改动(前端文件不在当前工作树中)
- **Current HEAD**: `81e3451f7`

### Branch 6: feat/pr-06-legion-frontend
- **Status**: 无待提交改动(前端文件不在当前工作树中)
- **Current HEAD**: `81e3451f7`

### Branch 7: feat/pr-07-encoding-fixes
- **Status**: 无待提交改动(前端文件不在当前工作树中)
- **Current HEAD**: `81e3451f7`

### Branch 8: feat/pr-08-taiji-engine-core
- **Commit**: `2a6bd1c25`
- **Message**: `feat(quant): Taiji量化引擎 — bar/engine/llm/backtest/real-time`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 9: feat/pr-09-taiji-remaining
- **Commit**: `ee3be538b`
- **Message**: `feat(quant): Taiji量化引擎 — 策略生成/异常检测/增长/发布等`
- **Files**: 289 files changed, 43027 insertions(+), 773 deletions(-)

### Branch 10: feat-poke
- **Commit**: `662757558`
- **Message**: `feat(poke): Poke 审查通信协议`
- **Status**: 已有独立commit,无额外待提交改动

## 说明

1. **分支1-4、8-9** 已全部提交各自指定的 commit message,内容为完整的改动集。
2. **分支5-7**(前端分支)在当前工作树中没有对应的前端文件改动,因此没有新的提交。它们保持 base commit `81e3451f7`。
3. **feat-poke** 已有独立 commit `662757558`,无需额外操作。
4. 所有改动合并为 289 个文件的变更(43027 行新增,773 行删除),共同构成了完整的 feature 集。
Original file line number Diff line number Diff line change
Expand Up @@ -127,45 +127,14 @@
margin-top: -2px;
min-height: 24px;
font-size: var(--font-size-xs);
padding-left: calc(#{$size-gap-1} + 14px);
padding-left: calc(16px * var(--indent-level, 1));
position: relative;

&::before {
content: '';
position: absolute;
left: 8px;
top: 0;
width: 1px;
height: 50%;
background: color-mix(in srgb, var(--border-subtle) 88%, transparent);
opacity: 0.95;
}

&::after {
content: '';
position: absolute;
left: 8px;
top: 50%;
width: 10px;
height: 1px;
background: color-mix(in srgb, var(--border-subtle) 92%, transparent);
opacity: 0.95;
transform: translateY(-50%);
}

.bitfun-nav-panel__inline-item-icon {
opacity: 0.72;
}
}

&.is-btw-child {
&:hover,
&.is-active {
background: var(--element-bg-soft);
}
}
}




&__inline-item-icon-slot {
position: relative;
flex: 0 0 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const countTopLevelSessionsInScope = (
remoteSshHost?: string | null,
): number => {
const scopedSessions = Array.from(sessions).filter((session: Session) => {
if (session.isTransient || session.sessionKind === 'subagent') {
if (session.isTransient) {
return false;
}
if (workspacePath) {
Expand Down Expand Up @@ -561,9 +561,6 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({
if (s.isTransient) {
return false;
}
if (s.sessionKind === 'subagent') {
return false;
}
if (workspacePath) {
return sessionBelongsToWorkspaceNavRow(s, workspacePath, remoteConnectionId, remoteSshHost);
}
Expand Down Expand Up @@ -600,6 +597,8 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({
};
}, [sessions]);



const sessionDisplayLimit = useMemo(() => {
const total = topLevelSessions.length;
if (expandLevel === 2) return Math.min(total, level2DisplayCount);
Expand Down Expand Up @@ -642,12 +641,17 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({

const visibleItems = useMemo(() => {
const visibleParents = topLevelSessions.slice(0, sessionDisplayLimit);
const out: Array<{ session: Session; level: 0 | 1 }> = [];
for (const p of visibleParents) {
out.push({ session: p, level: 0 });
const children = childrenByParent.get(p.sessionId) || [];
for (const c of children) out.push({ session: c, level: 1 });
}
const out: Array<{ session: Session; depth: number }> = [];

const walk = (sessions: Session[], depth: number) => {
for (const s of sessions) {
out.push({ session: s, depth });
const children = childrenByParent.get(s.sessionId) || [];
walk(children, depth + 1);
}
};

walk(visibleParents, 0);
return out;
}, [childrenByParent, sessionDisplayLimit, topLevelSessions]);

Expand Down Expand Up @@ -1031,10 +1035,10 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({

return (
<div className="bitfun-nav-panel__inline-list">
{visibleItems.map(({ session, level }) => {
{visibleItems.map(({ session, depth }) => {
const isEditing = editingSessionId === session.sessionId;
const relationship = resolveSessionRelationship(session);
const isChildSession = level === 1 && relationship.displayAsChild;
const isChildSession = depth > 0 && relationship.displayAsChild;
const childSessionBadge = getChildSessionBadge(relationship.kind);
const parentReviewActivity = deriveSessionReviewActivity(
flowChatState,
Expand Down Expand Up @@ -1134,18 +1138,19 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({
<div
className={[
'bitfun-nav-panel__inline-item',
level === 1 && 'is-child',
depth > 0 && 'is-child',
isChildSession && 'is-btw-child',
isRowActive && 'is-active',
isEditing && 'is-editing',
openMenuSessionId === session.sessionId && 'is-menu-open',
]
.filter(Boolean)
.join(' ')}
style={depth > 0 ? { '--indent-level': depth } as React.CSSProperties : undefined}
data-testid="nav-session-item"
data-session-id={session.sessionId}
data-session-kind={relationship.kind}
data-session-level={String(level)}
data-session-level={String(depth)}
data-session-active={isRowActive ? 'true' : 'false'}
onPointerDown={event => handleSessionOpenPointerDown(event, session)}
onClick={() => handleSwitch(session.sessionId)}
Expand Down
3 changes: 2 additions & 1 deletion src/web-ui/src/flow_chat/components/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
};
const loadVisibility = async () => {
try {
applyVisibility(await configManager.getOptionalConfig<boolean>(configPath));
applyVisibility(await configManager.getConfig<boolean | undefined>(configPath));
} catch (error) {
log.warn('Failed to load permission mode control visibility preference', error);
applyVisibility(true);
Expand Down Expand Up @@ -5397,6 +5397,7 @@ export const ChatInput: React.FC<ChatInputProps> = ({
? {
visible: true,
goal: threadGoalController.goal,
goalChain: threadGoalController.goalChain,
onOpen: () => {
void threadGoalController.openGoalEntry();
},
Expand Down
67 changes: 62 additions & 5 deletions src/web-ui/src/flow_chat/components/ChatInputWorkspaceStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
SquareCheck,
} from 'lucide-react';
import { ThreadGoalStripButton } from './thread-goal/ThreadGoalStripButton';
import type { ThreadGoalSnapshot } from '../services/goalService';
import type { GoalChainEntry, ThreadGoalSnapshot } from '../services/goalService';
import { Tooltip, IconButton } from '@/component-library';
import { useGitState } from '@/tools/git/hooks/useGitState';
import type { SessionExecutionTarget } from '@/infrastructure/api/service-api/WorktreeAPI';
Expand All @@ -38,6 +38,7 @@ export interface ChatInputWorkspaceStripProps {
threadGoal?: {
visible: boolean;
goal: ThreadGoalSnapshot | null;
goalChain?: GoalChainEntry[];
onOpen: () => void;
};
/** Global native-tool permission mode exposed as a compact strip control. */
Expand Down Expand Up @@ -399,10 +400,66 @@ export const ChatInputWorkspaceStrip: React.FC<ChatInputWorkspaceStripProps> = (
</div>
) : null}
{showGoal ? (
<ThreadGoalStripButton
goal={threadGoal.goal}
onOpen={threadGoal.onOpen}
/>
threadGoal.goalChain && threadGoal.goalChain.length > 0 ? (
<div className="bitfun-chat-input-workspace-strip__goal-chain">
{threadGoal.goalChain.map((entry, index) => {
const isLast = index === threadGoal.goalChain!.length - 1;
const hasGoal = !!entry.goal?.objective;
const objective = entry.goal?.objective ?? '';
const truncated =
objective.length > 24
? objective.slice(0, 24) + '\u2026'
: objective;
return (
<React.Fragment key={entry.sessionId}>
<span
className={[
'bitfun-chat-input-workspace-strip__goal-chain-chip',
isLast && 'bitfun-chat-input-workspace-strip__goal-chain-chip--current',
!hasGoal && 'bitfun-chat-input-workspace-strip__goal-chain-chip--empty',
]
.filter(Boolean)
.join(' ')}
title={hasGoal ? objective : `L${entry.depth}`}
onClick={isLast ? threadGoal.onOpen : undefined}
role={isLast ? 'button' : undefined}
tabIndex={isLast ? 0 : undefined}
onKeyDown={
isLast
? (e: React.KeyboardEvent) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
threadGoal.onOpen();
}
}
: undefined
}
>
{hasGoal ? (
<span className="bitfun-chat-input-workspace-strip__goal-chain-chip-text">
{truncated}
</span>
) : (
<span className="bitfun-chat-input-workspace-strip__goal-chain-chip-depth">
L{entry.depth}
</span>
)}
</span>
{!isLast && (
<span className="bitfun-chat-input-workspace-strip__goal-chain-sep" aria-hidden>
&rsaquo;
</span>
)}
</React.Fragment>
);
})}
</div>
) : (
<ThreadGoalStripButton
goal={threadGoal.goal}
onOpen={threadGoal.onOpen}
/>
)
) : null}
{showUsage ? (
<Tooltip content={t('usage.runtime.tooltip')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ export const ModernFlowChatContainer: React.FC<ModernFlowChatContainerProps> = (
const { t } = useTranslation('flow-chat');
const virtualItems = useVirtualItems();
const activeSession = useActiveSession();

const {
requests: permissionRequests,
activeBatch: activePermissionBatch,
Expand Down
Loading