@shytv/ai-chart 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41050,29 +41050,232 @@ Prism.languages.clike = {
|
|
|
41050
41050
|
punctuation: /[{}[\];(),.:]/
|
|
41051
41051
|
};
|
|
41052
41052
|
// src/lib/composables/monarchTokens.ts
|
|
41053
|
-
var N6 = "mine"
|
|
41053
|
+
var N6 = "mine", P6 = {
|
|
41054
|
+
builtinFunctions: /strategy\.closedtrades\.max_drawdown_percent|strategy\.opentrades\.max_drawdown_percent|strategy\.risk\.max_intraday_filled_orders|strategy\.closedtrades\.max_runup_percent|array\.percentile_linear_interpolation|strategy\.closedtrades\.entry_bar_index|strategy\.opentrades\.max_runup_percent|strategy\.closedtrades\.exit_bar_index|strategy\.closedtrades\.profit_percent|strategy\.closedtrades\.entry_comment|strategy\.opentrades\.entry_bar_index|strategy\.closedtrades\.exit_comment|strategy\.closedtrades\.max_drawdown|strategy\.opentrades\.profit_percent|ta\.percentile_linear_interpolation|strategy\.closedtrades\.entry_price|strategy\.opentrades\.entry_comment|strategy\.closedtrades\.commission|strategy\.closedtrades\.entry_time|strategy\.closedtrades\.exit_price|strategy\.opentrades\.max_drawdown|strategy\.risk\.max_cons_loss_days|strategy\.closedtrades\.exit_time|strategy\.closedtrades\.max_runup|strategy\.opentrades\.entry_price|strategy\.risk\.max_intraday_loss|strategy\.risk\.max_position_size|table\.cell_set_text_font_family|strategy\.closedtrades\.entry_id|strategy\.opentrades\.commission|strategy\.opentrades\.entry_time|table\.cell_set_text_formatting|array\.binary_search_rightmost|array\.percentile_nearest_rank|strategy\.closedtrades\.exit_id|strategy\.opentrades\.direction|strategy\.opentrades\.max_runup|array\.binary_search_leftmost|strategy\.closedtrades\.profit|strategy\.opentrades\.entry_id|strategy\.risk\.allow_entry_in|strategy\.convert_to_account|box\.set_bottom_right_point|label\.set_text_font_family|strategy\.closedtrades\.size|strategy\.convert_to_symbol|strategy\.default_entry_qty|strategy\.opentrades\.profit|strategy\.risk\.max_drawdown|ta\.percentile_nearest_rank|table\.cell_set_text_halign|table\.cell_set_text_valign|label\.set_text_formatting|request\.security_lower_tf|table\.cell_set_text_color|box\.set_text_font_family|strategy\.close_all_short|strategy\.opentrades\.size|table\.cell_set_text_size|box\.set_text_formatting|matrix\.is_antisymmetric|strategy\.close_all_long|box\.set_top_left_point|chart\.point\.from_index|matrix\.is_antidiagonal|table\.cell_set_bgcolor|table\.cell_set_tooltip|table\.set_border_color|table\.set_border_width|timeframe\.from_seconds|chart\.point\.from_time|line\.set_second_point|math\.round_to_mintick|matrix\.elements_count|ta\.pivot_point_levels|table\.cell_set_height|table\.set_frame_color|table\.set_frame_width|box\.set_border_color|box\.set_border_style|box\.set_border_width|line\.set_first_point|matrix\.is_stochastic|matrix\.is_triangular|table\.cell_set_width|timeframe\.in_seconds|array\.binary_search|box\.set_rightbottom|box\.set_text_halign|box\.set_text_valign|color\.from_gradient|label\.set_textalign|label\.set_textcolor|matrix\.eigenvectors|matrix\.is_symmetric|matrix\.swap_columns|strategy\.cancel_all|table\.cell_set_text|array\.new_linefill|array\.sort_indices|box\.set_text_color|linefill\.get_line1|linefill\.get_line2|linefill\.set_color|map\.new|matrix\.eigenvalues|matrix\.is_diagonal|matrix\.is_identity|strategy\.close_all|table\.set_position|array\.lastindexof|array\.percentrank|array\.standardize|box\.set_text_size|box\.set_text_wrap|label\.set_tooltip|matrix\.remove_col|matrix\.remove_row|table\.merge_cells|table\.set_bgcolor|array\.covariance|array\.new_string|chart\.point\.copy|matrix\.is_binary|matrix\.is_square|matrix\.new|matrix\.submatrix|matrix\.swap_rows|matrix\.transpose|request\.security|timeframe\.change|array\.new|array\.new_color|array\.new_float|array\.new_label|array\.new_table|box\.set_bgcolor|box\.set_lefttop|chart\.point\.new|chart\.point\.now|input\.text_area|input\.timeframe|label\.set_color|label\.set_point|label\.set_style|line\.set_extend|linefill\.delete|polyline\.delete|str\.format_time|str\.replace_all|strategy\.cancel|alertcondition|array\.includes|array\.new_bool|array\.new_line|array\.variance|box\.get_bottom|box\.set_bottom|box\.set_extend|label\.get_text|label\.set_size|label\.set_text|label\.set_xloc|label\.set_yloc|line\.get_price|line\.set_color|line\.set_style|line\.set_width|math\.todegrees|math\.toradians|matrix\.add_col|matrix\.add_row|matrix\.columns|matrix\.is_zero|matrix\.reshape|matrix\.reverse|str\.startswith|strategy\.close|strategy\.entry|strategy\.order|syminfo\.prefix|syminfo\.ticker|ta\.correlation|ta\.highestbars|ta\.percentrank|array\.indexof|array\.new_box|array\.new_int|array\.reverse|array\.unshift|box\.get_right|box\.set_right|input\.session|line\.set_xloc|matrix\.concat|matrix\.median|max_bars_back|runtime\.error|str\.substring|strategy\.exit|ta\.crossunder|ta\.lowestbars|ta\.supertrend|array\.concat|array\.insert|array\.median|array\.remove|box\.get_left|box\.set_left|box\.set_text|box\.set_xloc|input\.source|input\.string|input\.symbol|label\.delete|label\.set_xy|line\.set_xy1|line\.set_xy2|linefill\.new|map\.contains|matrix\.trace|polyline\.new|str\.contains|str\.endswith|str\.tonumber|str\.tostring|ta\.barssince|ta\.crossover|ta\.pivothigh|ta\.valuewhen|table\.delete|array\.clear|array\.every|array\.first|array\.range|array\.shift|array\.slice|array\.stdev|box\.get_top|box\.set_top|input\.color|input\.float|input\.price|label\.get_x|label\.get_y|label\.set_x|label\.set_y|line\.delete|line\.get_x1|line\.get_x2|line\.get_y1|line\.get_y2|line\.set_x1|line\.set_x2|line\.set_y1|line\.set_y2|log\.warning|map\.put_all|math\.random|matrix\.copy|matrix\.diff|matrix\.fill|matrix\.kron|matrix\.mode|matrix\.mult|matrix\.pinv|matrix\.rank|matrix\.rows|matrix\.sort|str\.replace|ta\.pivotlow|ta\.variance|table\.clear|array\.copy|array\.fill|array\.from|array\.join|array\.last|array\.mode|array\.push|array\.size|array\.some|array\.sort|box\.delete|dayofmonth|input\.bool|input\.enum|input\.time|label\.copy|map\.remove|map\.values|math\.floor|math\.log10|math\.round|matrix\.avg|matrix\.col|matrix\.det|matrix\.get|matrix\.inv|matrix\.max|matrix\.min|matrix\.pow|matrix\.row|matrix\.set|matrix\.sum|plotcandle|str\.format|str\.length|str\.repeat|ta\.falling|ta\.highest|table\.cell|time_close|weekofyear|array\.abs|array\.avg|array\.get|array\.max|array\.min|array\.pop|array\.set|array\.sum|color\.new|color\.rgb|dayofweek|indicator|input\.int|label\.new|line\.copy|log\.error|map\.clear|math\.acos|math\.asin|math\.atan|math\.ceil|math\.sign|math\.sqrt|plotarrow|plotshape|str\.lower|str\.match|str\.split|str\.upper|ta\.change|ta\.linreg|ta\.lowest|ta\.median|ta\.rising|table\.new|timestamp|barcolor|box\.copy|line\.new|linefill|log\.info|map\.copy|map\.keys|map\.size|math\.abs|math\.avg|math\.cos|math\.exp|math\.log|math\.max|math\.min|math\.pow|math\.sin|math\.sum|math\.tan|plotchar|str\.trim|strategy|ta\.cross|ta\.range|ta\.stdev|ta\.stoch|bgcolor|box\.new|color\.b|color\.g|color\.r|color\.t|library|map\.get|map\.put|plotbar|str\.pos|ta\.alma|ta\.macd|ta\.mode|ta\.swma|ta\.vwap|ta\.vwma|fixnan|minute|second|string|ta\.atr|ta\.bbw|ta\.cci|ta\.cmo|ta\.cog|ta\.cum|ta\.dev|ta\.dmi|ta\.ema|ta\.hma|ta\.kcw|ta\.max|ta\.mfi|ta\.min|ta\.mom|ta\.rci|ta\.rma|ta\.roc|ta\.rsi|ta\.sar|ta\.sma|ta\.tsi|ta\.wma|ta\.wpr|alert|color|float|hline|input|label|month|ta\.bb|ta\.kc|ta\.tr|table|bool|fill|hour|line|plot|time|year|box|int|na|nz/,
|
|
41055
|
+
keywords: /continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|enum|type|and|for|not|var|as|by|if|in|or|to/,
|
|
41056
|
+
tokenizer: {
|
|
41057
|
+
root: [
|
|
41058
|
+
[
|
|
41059
|
+
/\/\/\s*(?=@)/,
|
|
41060
|
+
"comment",
|
|
41061
|
+
"@comments"
|
|
41062
|
+
],
|
|
41063
|
+
[/\/\/.*(?!@).*/, "comment"],
|
|
41064
|
+
[/\'([^\'\\]|\\.)*$/, "string.invalid"],
|
|
41065
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"],
|
|
41066
|
+
[/\"/, {
|
|
41067
|
+
token: "string",
|
|
41068
|
+
bracket: "@open",
|
|
41069
|
+
next: "@stringDouble"
|
|
41070
|
+
}],
|
|
41071
|
+
[/(type|enum)\s+[a-zA-Z]\w*/, "entity.name.type"],
|
|
41072
|
+
[/'/, {
|
|
41073
|
+
token: "string",
|
|
41074
|
+
bracket: "@open",
|
|
41075
|
+
next: "@stringSingle"
|
|
41076
|
+
}],
|
|
41077
|
+
[/(@builtinFunctions)(?=\s*\(|\s*<.*>)/, {
|
|
41078
|
+
token: "support.function",
|
|
41079
|
+
next: "@template"
|
|
41080
|
+
}],
|
|
41081
|
+
[/@punctuation/, {
|
|
41082
|
+
token: "punctuation.operator",
|
|
41083
|
+
next: "@property"
|
|
41084
|
+
}],
|
|
41085
|
+
[/(varip|var)\b(\s+)((?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)/, [
|
|
41086
|
+
{ token: "keyword" },
|
|
41087
|
+
{ token: "source" },
|
|
41088
|
+
{ token: "entity.name.type" },
|
|
41089
|
+
{ token: "paren" },
|
|
41090
|
+
{ token: "source" },
|
|
41091
|
+
{ token: "variable.other" }
|
|
41092
|
+
]],
|
|
41093
|
+
[/\b(?:@builtinTypes)(?=(\s*)[\[|<|(]|(?=\s+(?=[^.=][\w\(]*))|\s*$)/, {
|
|
41094
|
+
token: "support.type",
|
|
41095
|
+
next: "@template"
|
|
41096
|
+
}],
|
|
41097
|
+
[/^(\s*)\b(?!(?:chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map|continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)([\w.\d_$]+)(\[\]|)(\s+)((?!(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b)[\w\d_$]+)(\s+)(\=)/, [
|
|
41098
|
+
{ token: "source" },
|
|
41099
|
+
{ token: "entity.name.type" },
|
|
41100
|
+
{ token: "paren" },
|
|
41101
|
+
{ token: "source" },
|
|
41102
|
+
{ token: "variable.other" },
|
|
41103
|
+
{ token: "source" },
|
|
41104
|
+
{ token: "keyword.equals" }
|
|
41105
|
+
]],
|
|
41106
|
+
[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/, "entity.name.type"],
|
|
41107
|
+
[/import(?=\s+@importName)/, {
|
|
41108
|
+
token: "keyword",
|
|
41109
|
+
next: "@import"
|
|
41110
|
+
}],
|
|
41111
|
+
[/import(?=\s+[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+)/, "keyword"],
|
|
41112
|
+
[/[+-]?\d+\.\d*([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
|
|
41113
|
+
[/[+-]?\.\d+([eE][\-+]?\d+)?(?!\w+)/, "constant.numeric.float"],
|
|
41114
|
+
[/([+-]?(\d+))(?!\w+)(?!\w+)/, "constant.numeric.integer"],
|
|
41115
|
+
[/(?:true|false)\b/, "constant.other.boolean"],
|
|
41116
|
+
[/#[0-9a-fA-F]{6,8}\b/, "constant.other.color"],
|
|
41117
|
+
[/\+=|\-=|\*=|\/=|%=|[\/%*+\-]|==|!=|<=|>=|=>|<|>|\?|\:=|\:|\,/, "keyword.operator"],
|
|
41118
|
+
[/\b(?:continue|for\.\.\.in|export|import|method|switch|break|varip|while|else|type|enum|and|for|not|var|as|by|if|in|or|to)\b/, "keyword"],
|
|
41119
|
+
[/^[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, "entity.name.function"],
|
|
41120
|
+
[/[0-9]+\b/, "constant.numeric.integer"],
|
|
41121
|
+
[/=/, "keyword.equals"],
|
|
41122
|
+
[/\b(?:@builtinVariables)\b(?!\s*=\s*\w+)/, "support.variable"],
|
|
41123
|
+
[/[(|)|\[|\]]/, "paren"],
|
|
41124
|
+
[/[a-zA-Z_][a-zA-Z_0-9]*(?=\s*\()/, { token: "entity.name.method" }],
|
|
41125
|
+
[/\w+\b/, "variable.other"]
|
|
41126
|
+
],
|
|
41127
|
+
comments: [
|
|
41128
|
+
[/@[A-Za-z]+(\s*=\s*)?$/, {
|
|
41129
|
+
token: "comment.annotation",
|
|
41130
|
+
next: "@pop"
|
|
41131
|
+
}],
|
|
41132
|
+
[/@[A-Za-z]+(\s*=\s*)?/, { token: "comment.annotation" }],
|
|
41133
|
+
[/(?!\s*@[A-Za-z]+).+$/, {
|
|
41134
|
+
token: "comment",
|
|
41135
|
+
next: "@pop"
|
|
41136
|
+
}]
|
|
41137
|
+
],
|
|
41138
|
+
stringDouble: [
|
|
41139
|
+
[/[^\\\"]+/, "string"],
|
|
41140
|
+
[/\\./, "string.invalid"],
|
|
41141
|
+
[/\"/, {
|
|
41142
|
+
token: "string.quote",
|
|
41143
|
+
bracket: "@close",
|
|
41144
|
+
next: "@pop"
|
|
41145
|
+
}]
|
|
41146
|
+
],
|
|
41147
|
+
stringSingle: [
|
|
41148
|
+
[/[^\\']+/, "string"],
|
|
41149
|
+
[/\\./, "string.invalid"],
|
|
41150
|
+
[/'/, {
|
|
41151
|
+
token: "string",
|
|
41152
|
+
bracket: "@close",
|
|
41153
|
+
next: "@pop"
|
|
41154
|
+
}]
|
|
41155
|
+
],
|
|
41156
|
+
template: [
|
|
41157
|
+
[/(@builtinTypes)/, { token: "support.type" }],
|
|
41158
|
+
[/(\((?:\s+))?((?!(?:chart\.point|linefill|polyline|continue|for\.\.\.in|matrix|series|simple|string|export|import|method|switch|array|color|const|float|label|table|break|varip|while|bool|line|else|type|enum|box|int|map|and|for|not|var|as|by|if|in|or|to)\b)\b[\w.\d_$]+(?=[\[\]]*(?:\s+)(?:[\w\d_$]+\s*(?:\,|\))+\s*).+(?:\=\>|\→)))/, "entity.name.type"],
|
|
41159
|
+
[/\(|\)|\[|\]|\=|\>/, {
|
|
41160
|
+
token: "paren",
|
|
41161
|
+
next: "@pop"
|
|
41162
|
+
}],
|
|
41163
|
+
[/(\,)(\s+)/, ["keyword.operator", "source"]],
|
|
41164
|
+
[/(\,)/, { token: "keyword.operator" }],
|
|
41165
|
+
[/([\w.\d$]+)/, { token: "entity.name.type" }],
|
|
41166
|
+
[/(<|>)/, { token: "paren" }],
|
|
41167
|
+
[/\s(?=\w)|$/, {
|
|
41168
|
+
token: "source",
|
|
41169
|
+
next: "@pop"
|
|
41170
|
+
}]
|
|
41171
|
+
],
|
|
41172
|
+
property: [
|
|
41173
|
+
[/@punctuation/, { token: "punctuation.operator" }],
|
|
41174
|
+
[/(@builtinTypes)(?=\s*[(])/, {
|
|
41175
|
+
token: "support.method",
|
|
41176
|
+
next: "@pop"
|
|
41177
|
+
}],
|
|
41178
|
+
[/[a-zA-Z_][a-zA-Z_0-9]+(?=\s*\()/, {
|
|
41179
|
+
token: "entity.name.method",
|
|
41180
|
+
next: "@pop"
|
|
41181
|
+
}],
|
|
41182
|
+
[/[a-zA-Z0-9_]+/, {
|
|
41183
|
+
token: "variable.other.property",
|
|
41184
|
+
next: "@pop"
|
|
41185
|
+
}],
|
|
41186
|
+
[/@empty/, {
|
|
41187
|
+
token: "source",
|
|
41188
|
+
next: "@pop"
|
|
41189
|
+
}]
|
|
41190
|
+
],
|
|
41191
|
+
import: [
|
|
41192
|
+
[/\s+/, { token: "source" }],
|
|
41193
|
+
[/(@importName)(\s+)(as\b)(\s+)(@importAlias)/, [
|
|
41194
|
+
{ token: "entity.name.module" },
|
|
41195
|
+
{ token: "source" },
|
|
41196
|
+
{ token: "keyword" },
|
|
41197
|
+
{ token: "source" },
|
|
41198
|
+
{
|
|
41199
|
+
token: "entity.name.module.name",
|
|
41200
|
+
next: "@pop"
|
|
41201
|
+
}
|
|
41202
|
+
]],
|
|
41203
|
+
[/@importName/, {
|
|
41204
|
+
token: "entity.name.module",
|
|
41205
|
+
next: "@pop"
|
|
41206
|
+
}]
|
|
41207
|
+
]
|
|
41208
|
+
},
|
|
41209
|
+
builtinVariables: /strategy\.commission\.cash_per_contract|syminfo\.recommendations_sell_strong|strategy\.commission\.cash_per_order|strategy\.avg_winning_trade_percent|syminfo\.recommendations_buy_strong|strategy\.avg_losing_trade_percent|strategy\.closedtrades\.first_index|strategy\.margin_liquidation_price|strategy\.max_contracts_held_short|strategy\.max_contracts_held_long|strategy\.opentrades\.capital_held|syminfo\.shares_outstanding_float|syminfo\.shares_outstanding_total|barstate\.islastconfirmedhistory|earnings\.future_period_end_time|strategy\.max_contracts_held_all|syminfo\.target_price_estimates|alert\.freq_once_per_bar_close|label\.style_label_lower_right|label\.style_label_upper_right|strategy\.max_drawdown_percent|syminfo\.recommendations_total|label\.style_label_lower_left|label\.style_label_upper_left|chart\.right_visible_bar_time|strategy\.grossprofit_percent|strategy\.position_entry_name|strategy\.position_size_short|strategy\.position_size_total|strategy\.price_highest_short|syminfo\.recommendations_date|syminfo\.recommendations_hold|syminfo\.recommendations_sell|syminfo\.target_price_average|plot\.style_stepline_diamond|strategy\.commission\.percent|chart\.left_visible_bar_time|strategy\.openprofit_percent|strategy\.position_avg_price|strategy\.position_size_long|strategy\.price_highest_long|strategy\.price_lowest_short|syminfo\.recommendations_buy|syminfo\.target_price_median|strategy\.percent_of_equity|session\.isfirstbar_regular|strategy\.avg_trade_percent|strategy\.avg_winning_trade|strategy\.grossloss_percent|strategy\.max_runup_percent|strategy\.netprofit_percent|strategy\.price_first_short|strategy\.price_lowest_long|dividends\.future_pay_date|session\.islastbar_regular|strategy\.account_currency|strategy\.avg_losing_trade|strategy\.openprofit_short|strategy\.opentrades_short|strategy\.price_first_long|strategy\.price_last_short|syminfo\.target_price_date|syminfo\.target_price_high|label\.style_label_center|label\.style_text_outline|label\.style_triangledown|strategy\.direction\.short|dividends\.future_ex_date|strategy\.avg_price_short|strategy\.initial_capital|strategy\.openprofit_long|strategy\.opentrades_long|strategy\.price_last_long|syminfo\.current_contract|syminfo\.target_price_low|alert\.freq_once_per_bar|label\.style_label_right|strategy\.direction\.long|dividends\.future_amount|earnings\.future_revenue|strategy\.avg_price_long|syminfo\.expiration_date|barmerge\.lookahead_off|label\.style_label_down|label\.style_label_left|label\.style_triangleup|line\.style_arrow_right|position\.bottom_center|position\.middle_center|strategy\.direction\.all|strategy\.position_size|barmerge\.lookahead_on|earnings\.standardized|font\.family_monospace|label\.style_arrowdown|line\.style_arrow_both|line\.style_arrow_left|plot\.style_steplinebr|position\.bottom_right|position\.middle_right|strategy\.closedtrades|strategy\.max_drawdown|syminfo\.main_tickerid|timeframe\.main_period|label\.style_label_up|plot\.style_histogram|position\.bottom_left|position\.middle_left|barstate\.isconfirmed|earnings\.future_time|session\.ispostmarket|strategy\.grossprofit|syminfo\.basecurrency|syminfo\.shareholders|timeframe\.isintraday|timeframe\.multiplier|dayofweek\.wednesday|display\.data_window|display\.price_scale|display\.status_line|font\.family_default|label\.style_arrowup|label\.style_diamond|plot\.style_stepline|position\.top_center|strategy\.oca\.cancel|strategy\.oca\.reduce|barstate\.isrealtime|chart\.is_heikinashi|earnings\.future_eps|session\.ispremarket|strategy\.eventrades|strategy\.losstrades|strategy\.openprofit|strategy\.opentrades|syminfo\.description|syminfo\.mincontract|timeframe\.isminutes|timeframe\.ismonthly|timeframe\.isseconds|dayofweek\.saturday|dayofweek\.thursday|hline\.style_dashed|hline\.style_dotted|label\.style_circle|label\.style_square|label\.style_xcross|plot\.style_circles|plot\.style_columns|position\.top_right|shape\.triangledown|splits\.denominator|text\.format_italic|barstate\.ishistory|chart\.is_linebreak|session\.isfirstbar|strategy\.avg_trade|strategy\.grossloss|strategy\.max_runup|strategy\.netprofit|strategy\.wintrades|syminfo\.pointvalue|syminfo\.pricescale|syminfo\.volumetype|timeframe\.isweekly|barmerge\.gaps_off|dayofweek\.tuesday|earnings\.estimate|hline\.style_solid|label\.style_cross|line\.style_dashed|line\.style_dotted|location\.abovebar|location\.absolute|location\.belowbar|plot\.style_areabr|plot\.style_linebr|position\.top_left|strategy\.oca\.none|text\.align_bottom|text\.align_center|chart\.is_standard|session\.islastbar|syminfo\.employees|timeframe\.isdaily|barmerge\.gaps_on|dayofweek\.friday|dayofweek\.monday|dayofweek\.sunday|label\.style_flag|label\.style_none|line\.style_solid|order\.descending|plot\.style_cross|session\.extended|shape\.triangleup|splits\.numerator|text\.align_right|text\.format_bold|text\.format_none|barstate\.isfirst|session\.ismarket|syminfo\.currency|syminfo\.industry|syminfo\.tickerid|syminfo\.timezone|timeframe\.period|dividends\.gross|earnings\.actual|location\.bottom|order\.ascending|plot\.style_area|plot\.style_line|session\.regular|shape\.arrowdown|shape\.labeldown|text\.align_left|barstate\.islast|strategy\.equity|syminfo\.country|syminfo\.minmove|syminfo\.mintick|syminfo\.session|time_tradingday|timeframe\.isdwm|alert\.freq_all|format\.inherit|format\.mintick|format\.percent|strategy\.fixed|strategy\.short|text\.align_top|text\.wrap_auto|text\.wrap_none|xloc\.bar_index|barstate\.isnew|chart\.bg_color|chart\.fg_color|chart\.is_range|chart\.is_renko|last_bar_index|syminfo\.prefix|syminfo\.sector|syminfo\.ticker|color\.fuchsia|currency\.NONE|currency\.USDT|dividends\.net|format\.volume|shape\.arrowup|shape\.diamond|shape\.labelup|strategy\.cash|strategy\.long|xloc\.bar_time|yloc\.abovebar|yloc\.belowbar|chart\.is_kagi|last_bar_time|color\.maroon|color\.orange|color\.purple|color\.silver|color\.yellow|currency\.AUD|currency\.BTC|currency\.CAD|currency\.CHF|currency\.EGP|currency\.ETH|currency\.EUR|currency\.GBP|currency\.HKD|currency\.INR|currency\.JPY|currency\.KRW|currency\.MYR|currency\.NOK|currency\.NZD|currency\.PKR|currency\.PLN|currency\.RUB|currency\.SEK|currency\.SGD|currency\.TRY|currency\.USD|currency\.ZAR|display\.none|display\.pane|extend\.right|format\.price|location\.top|shape\.circle|shape\.square|shape\.xcross|chart\.is_pnf|linefill\.all|polyline\.all|syminfo\.root|syminfo\.type|color\.black|color\.green|color\.olive|color\.white|display\.all|extend\.both|extend\.left|extend\.none|scale\.right|shape\.cross|size\.normal|color\.aqua|color\.blue|color\.gray|color\.lime|color\.navy|color\.teal|scale\.left|scale\.none|shape\.flag|size\.large|size\.small|yloc\.price|dayofmonth|ta\.accdist|time_close|weekofyear|color\.red|math\.rphi|size\.auto|size\.huge|size\.tiny|bar_index|dayofweek|label\.all|table\.all|math\.phi|line\.all|math\.pi|box\.all|ta\.vwap|ta\.wvad|timenow|math\.e|minute|second|ta\.iii|ta\.nvi|ta\.obv|ta\.pvi|ta\.pvt|ta\.wad|volume|false|close|hlcc4|month|ohlc4|ta\.tr|true|high|hlc3|hour|open|time|year|ask|bid|hl2|low|na/,
|
|
41210
|
+
builtinTypes: /chart\.point|linefill|polyline|matrix|series|simple|string|array|color|const|float|label|table|bool|line|box|int|map/,
|
|
41211
|
+
punctuation: /[.](?![.])/,
|
|
41212
|
+
importName: /[a-zA-Z\d\$_\-\.\u00a1-\uffff\/]+/,
|
|
41213
|
+
importAlias: /[a-zA-Z\d\_\u00a1\uffff\/]+/,
|
|
41214
|
+
empty: /^$/
|
|
41215
|
+
}, F6 = (e) => P6[e].source, I6 = F6("builtinFunctions"), L6 = F6("builtinVariables"), R6 = F6("builtinTypes"), z6 = F6("keywords"), B6 = F6("punctuation"), V6 = {
|
|
41216
|
+
comment: {
|
|
41217
|
+
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
|
|
41218
|
+
greedy: !0,
|
|
41219
|
+
inside: { "comment-annotation": /@[a-zA-Z]+(?:\s*=\s*)?/ }
|
|
41220
|
+
},
|
|
41221
|
+
string: {
|
|
41222
|
+
pattern: /"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/,
|
|
41223
|
+
greedy: !0
|
|
41224
|
+
},
|
|
41225
|
+
"builtin-function": {
|
|
41226
|
+
pattern: RegExp(`\\b(?:${I6})(?=\\s*(?:\\(|<))`),
|
|
41227
|
+
greedy: !0,
|
|
41228
|
+
alias: "function"
|
|
41229
|
+
},
|
|
41230
|
+
"builtin-variable": {
|
|
41231
|
+
pattern: RegExp(`\\b(?:${L6})\\b`),
|
|
41232
|
+
greedy: !0,
|
|
41233
|
+
alias: "variable"
|
|
41234
|
+
},
|
|
41235
|
+
"builtin-type": {
|
|
41236
|
+
pattern: RegExp(`\\b(?:${R6})\\b`),
|
|
41237
|
+
greedy: !0,
|
|
41238
|
+
alias: "class-name"
|
|
41239
|
+
},
|
|
41240
|
+
keyword: RegExp(`\\b(?:${z6})\\b`),
|
|
41241
|
+
boolean: /\b(?:true|false)\b/,
|
|
41242
|
+
number: {
|
|
41243
|
+
pattern: /[+-]?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?/,
|
|
41244
|
+
greedy: !0
|
|
41245
|
+
},
|
|
41246
|
+
"color-hex": /#[0-9a-fA-F]{6,8}\b/,
|
|
41247
|
+
"function-definition": {
|
|
41248
|
+
pattern: /\b[a-zA-Z_]\w*(?=\s*\()/,
|
|
41249
|
+
alias: "function"
|
|
41250
|
+
},
|
|
41251
|
+
property: {
|
|
41252
|
+
pattern: /(\.)[a-zA-Z_]\w*/,
|
|
41253
|
+
lookbehind: !0,
|
|
41254
|
+
alias: "property"
|
|
41255
|
+
},
|
|
41256
|
+
operator: /\+=|-=|\*=|\/=|%=|==|!=|<=|>=|=>|:=|[+\-*/%<>=?:,]/,
|
|
41257
|
+
punctuation: new RegExp(B6),
|
|
41258
|
+
bracket: /[()[\]{}]/,
|
|
41259
|
+
identifier: /\b[a-zA-Z_]\w*\b/
|
|
41260
|
+
};
|
|
41054
41261
|
// src/components/markdown-text.tsx
|
|
41055
|
-
K();
|
|
41056
|
-
var
|
|
41262
|
+
M6.default.languages.mine = V6, K();
|
|
41263
|
+
var H6 = ["className", "children"], U6 = ["className"], W6 = ["className"], G6 = ["className"], K6 = ["className"], q6 = ["className"], J6 = ["className"], Y6 = ["className"], X6 = ["className"], Z6 = ["className"], Q6 = ["className"], $6 = ["className"], e8 = ["className"], t8 = ["className"], n8 = ["className"], r8 = ["className"], i8 = ["className"], a8 = ["className"], o8 = ["className"], s8 = ["className"], c8 = ["className"], l8 = (e) => {
|
|
41057
41264
|
let t = h(e);
|
|
41058
41265
|
if (e !== t.current) {
|
|
41059
41266
|
let n = t.current;
|
|
41060
41267
|
e !== void 0 && n !== void 0 && Object.keys(n).length === Object.keys(e).length && Object.keys(e).every((t) => n[t] === e[t]) || (t.current = e);
|
|
41061
41268
|
}
|
|
41062
41269
|
return t.current;
|
|
41063
|
-
},
|
|
41064
|
-
let { className: t, children: n } = e, r = q(e,
|
|
41065
|
-
if (!i || !a) return null;
|
|
41066
|
-
let e = M6.default.languages.mine;
|
|
41067
|
-
return e ? M6.default.highlight(o, e, N6) : null;
|
|
41068
|
-
}, [
|
|
41270
|
+
}, u8 = (e) => {
|
|
41271
|
+
let { className: t, children: n } = e, r = q(e, H6), i = gJ(), a = /\blanguage-mine\b/.test(t == null ? "" : t) || !t, o = String(n == null ? "" : n).replace(/\n$/, ""), s = m(() => !i || !a ? null : M6.default.highlight(o, V6, N6), [
|
|
41069
41272
|
o,
|
|
41070
41273
|
i,
|
|
41071
41274
|
a
|
|
41072
41275
|
]), c = Q("font-mono", i ? "tcc-code text-inherit" : Q("aui-md-inline-code", "rounded-md border border-border/60", "bg-muted px-1.5 py-0.5", "text-[0.85em] text-foreground"), t);
|
|
41073
41276
|
return !i || !a || s === null ? /* @__PURE__ */ (0, Z.jsx)("code", G(G({ className: c }, r), {}, { children: n })) : /* @__PURE__ */ (0, Z.jsx)("code", G(G({ className: c }, r), {}, { dangerouslySetInnerHTML: { __html: s } }));
|
|
41074
|
-
},
|
|
41075
|
-
let n =
|
|
41277
|
+
}, d8 = o(({ components: e, componentsByLanguage: t }) => {
|
|
41278
|
+
let n = l8(e), r = l8(t), i = m(() => n ? G(G({}, f8), pJ(n)) : f8, [n]);
|
|
41076
41279
|
return /* @__PURE__ */ (0, Z.jsx)(d2, {
|
|
41077
41280
|
remarkPlugins: [A6],
|
|
41078
41281
|
className: Q("aui-md", "min-w-0 break-words", "text-[15px] leading-[1.75] text-foreground", "[&_img]:max-w-full", "[&_svg]:max-w-full"),
|
|
@@ -41080,91 +41283,91 @@ var P6 = ["className", "children"], F6 = ["className"], I6 = ["className"], L6 =
|
|
|
41080
41283
|
componentsByLanguage: r,
|
|
41081
41284
|
defer: !0
|
|
41082
41285
|
});
|
|
41083
|
-
}),
|
|
41286
|
+
}), f8 = pJ({
|
|
41084
41287
|
h1: (e) => {
|
|
41085
|
-
let { className: t } = e, n = q(e,
|
|
41288
|
+
let { className: t } = e, n = q(e, U6);
|
|
41086
41289
|
return /* @__PURE__ */ (0, Z.jsx)("h1", G({ className: Q("aui-md-h1", "mt-7 mb-3 scroll-m-20", "text-2xl font-semibold tracking-tight", "leading-tight text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41087
41290
|
},
|
|
41088
41291
|
h2: (e) => {
|
|
41089
|
-
let { className: t } = e, n = q(e,
|
|
41292
|
+
let { className: t } = e, n = q(e, W6);
|
|
41090
41293
|
return /* @__PURE__ */ (0, Z.jsx)("h2", G({ className: Q("aui-md-h2", "mt-6 mb-3 scroll-m-20", "text-xl font-semibold tracking-tight", "leading-snug text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41091
41294
|
},
|
|
41092
41295
|
h3: (e) => {
|
|
41093
|
-
let { className: t } = e, n = q(e,
|
|
41296
|
+
let { className: t } = e, n = q(e, G6);
|
|
41094
41297
|
return /* @__PURE__ */ (0, Z.jsx)("h3", G({ className: Q("aui-md-h3", "mt-5 mb-2 scroll-m-20", "text-lg font-semibold", "leading-snug text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41095
41298
|
},
|
|
41096
41299
|
h4: (e) => {
|
|
41097
|
-
let { className: t } = e, n = q(e,
|
|
41300
|
+
let { className: t } = e, n = q(e, K6);
|
|
41098
41301
|
return /* @__PURE__ */ (0, Z.jsx)("h4", G({ className: Q("aui-md-h4", "mt-4 mb-2 scroll-m-20", "text-base font-semibold text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41099
41302
|
},
|
|
41100
41303
|
h5: (e) => {
|
|
41101
|
-
let { className: t } = e, n = q(e,
|
|
41304
|
+
let { className: t } = e, n = q(e, q6);
|
|
41102
41305
|
return /* @__PURE__ */ (0, Z.jsx)("h5", G({ className: Q("aui-md-h5", "mt-3 mb-1", "text-sm font-semibold text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41103
41306
|
},
|
|
41104
41307
|
h6: (e) => {
|
|
41105
|
-
let { className: t } = e, n = q(e,
|
|
41308
|
+
let { className: t } = e, n = q(e, J6);
|
|
41106
41309
|
return /* @__PURE__ */ (0, Z.jsx)("h6", G({ className: Q("aui-md-h6", "mt-3 mb-1", "text-sm font-medium text-muted-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41107
41310
|
},
|
|
41108
41311
|
p: (e) => {
|
|
41109
|
-
let { className: t } = e, n = q(e,
|
|
41312
|
+
let { className: t } = e, n = q(e, Y6);
|
|
41110
41313
|
return /* @__PURE__ */ (0, Z.jsx)("p", G({ className: Q("aui-md-p", "my-3", "text-[15px] leading-[1.75] text-foreground", "first:mt-0 last:mb-0", t) }, n));
|
|
41111
41314
|
},
|
|
41112
41315
|
a: (e) => {
|
|
41113
|
-
let { className: t } = e, n = q(e,
|
|
41316
|
+
let { className: t } = e, n = q(e, X6);
|
|
41114
41317
|
return /* @__PURE__ */ (0, Z.jsx)("a", G({ className: Q("aui-md-a", "text-primary underline decoration-primary/40", "underline-offset-4 transition-colors", "hover:decoration-primary", t) }, n));
|
|
41115
41318
|
},
|
|
41116
41319
|
blockquote: (e) => {
|
|
41117
|
-
let { className: t } = e, n = q(e,
|
|
41320
|
+
let { className: t } = e, n = q(e, Z6);
|
|
41118
41321
|
return /* @__PURE__ */ (0, Z.jsx)("blockquote", G({ className: Q("aui-md-blockquote", "my-4 border-s-2 border-border ps-4", "text-muted-foreground", "[&>p]:my-1", t) }, n));
|
|
41119
41322
|
},
|
|
41120
41323
|
ul: (e) => {
|
|
41121
|
-
let { className: t } = e, n = q(e,
|
|
41324
|
+
let { className: t } = e, n = q(e, Q6);
|
|
41122
41325
|
return /* @__PURE__ */ (0, Z.jsx)("ul", G({ className: Q("aui-md-ul", "my-3 ms-6 list-disc", "space-y-1", "marker:text-muted-foreground", "[&_ul]:my-1", t) }, n));
|
|
41123
41326
|
},
|
|
41124
41327
|
ol: (e) => {
|
|
41125
|
-
let { className: t } = e, n = q(e,
|
|
41328
|
+
let { className: t } = e, n = q(e, $6);
|
|
41126
41329
|
return /* @__PURE__ */ (0, Z.jsx)("ol", G({ className: Q("aui-md-ol", "my-3 ms-6 list-decimal", "space-y-1", "marker:text-muted-foreground", "[&_ol]:my-1", t) }, n));
|
|
41127
41330
|
},
|
|
41128
41331
|
hr: (e) => {
|
|
41129
|
-
let { className: t } = e, n = q(e,
|
|
41332
|
+
let { className: t } = e, n = q(e, e8);
|
|
41130
41333
|
return /* @__PURE__ */ (0, Z.jsx)("hr", G({ className: Q("aui-md-hr", "my-6 border-0 border-t border-border", t) }, n));
|
|
41131
41334
|
},
|
|
41132
41335
|
table: (e) => {
|
|
41133
|
-
let { className: t } = e, n = q(e,
|
|
41336
|
+
let { className: t } = e, n = q(e, t8);
|
|
41134
41337
|
return /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
41135
41338
|
className: "aui-md-table-wrapper my-4 w-full overflow-x-auto rounded-lg border border-border",
|
|
41136
41339
|
children: /* @__PURE__ */ (0, Z.jsx)("table", G({ className: Q("aui-md-table", "w-full border-collapse text-sm", t) }, n))
|
|
41137
41340
|
});
|
|
41138
41341
|
},
|
|
41139
41342
|
th: (e) => {
|
|
41140
|
-
let { className: t } = e, n = q(e,
|
|
41343
|
+
let { className: t } = e, n = q(e, n8);
|
|
41141
41344
|
return /* @__PURE__ */ (0, Z.jsx)("th", G({ className: Q("aui-md-th", "border-b border-border", "bg-muted/60 px-3 py-2.5", "text-start text-sm font-semibold text-foreground", "[[align=center]]:text-center", "[[align=right]]:text-right", t) }, n));
|
|
41142
41345
|
},
|
|
41143
41346
|
td: (e) => {
|
|
41144
|
-
let { className: t } = e, n = q(e,
|
|
41347
|
+
let { className: t } = e, n = q(e, r8);
|
|
41145
41348
|
return /* @__PURE__ */ (0, Z.jsx)("td", G({ className: Q("aui-md-td", "border-b border-border/70", "px-3 py-2.5", "text-start text-foreground", "[[align=center]]:text-center", "[[align=right]]:text-right", t) }, n));
|
|
41146
41349
|
},
|
|
41147
41350
|
tr: (e) => {
|
|
41148
|
-
let { className: t } = e, n = q(e,
|
|
41351
|
+
let { className: t } = e, n = q(e, i8);
|
|
41149
41352
|
return /* @__PURE__ */ (0, Z.jsx)("tr", G({ className: Q("aui-md-tr", "transition-colors", "last:[&>td]:border-b-0", "hover:bg-muted/30", t) }, n));
|
|
41150
41353
|
},
|
|
41151
41354
|
li: (e) => {
|
|
41152
|
-
let { className: t } = e, n = q(e,
|
|
41355
|
+
let { className: t } = e, n = q(e, a8);
|
|
41153
41356
|
return /* @__PURE__ */ (0, Z.jsx)("li", G({ className: Q("aui-md-li", "ps-0 leading-[1.75] text-foreground", "[&>p]:my-1", t) }, n));
|
|
41154
41357
|
},
|
|
41155
41358
|
strong: (e) => {
|
|
41156
|
-
let { className: t } = e, n = q(e,
|
|
41359
|
+
let { className: t } = e, n = q(e, o8);
|
|
41157
41360
|
return /* @__PURE__ */ (0, Z.jsx)("strong", G({ className: Q("aui-md-strong", "font-semibold text-foreground", t) }, n));
|
|
41158
41361
|
},
|
|
41159
41362
|
sup: (e) => {
|
|
41160
|
-
let { className: t } = e, n = q(e,
|
|
41363
|
+
let { className: t } = e, n = q(e, s8);
|
|
41161
41364
|
return /* @__PURE__ */ (0, Z.jsx)("sup", G({ className: Q("aui-md-sup", "text-muted-foreground", "[&>a]:text-xs [&>a]:no-underline", t) }, n));
|
|
41162
41365
|
},
|
|
41163
41366
|
pre: (e) => {
|
|
41164
|
-
let { className: t } = e, n = q(e,
|
|
41367
|
+
let { className: t } = e, n = q(e, c8);
|
|
41165
41368
|
return /* @__PURE__ */ (0, Z.jsx)("pre", G({ className: Q("aui-md-pre", "my-0 overflow-x-auto", "rounded-b-xl border border-border", "bg-[#f4f4f4] px-4 py-4", "font-mono text-[13px] leading-6", "text-[#242424]", "dark:bg-[#2f2f2f] dark:text-[#ededed]", "[&>code]:bg-transparent", "[&>code]:p-0", "[&>code]:text-inherit", "[&>code]:border-0", t) }, n));
|
|
41166
41369
|
},
|
|
41167
|
-
code:
|
|
41370
|
+
code: u8,
|
|
41168
41371
|
CodeHeader: ({ language: e, code: t }) => {
|
|
41169
41372
|
let { isCopied: n, copyToClipboard: r } = j6();
|
|
41170
41373
|
return /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
@@ -41184,7 +41387,7 @@ var P6 = ["className", "children"], F6 = ["className"], I6 = ["className"], L6 =
|
|
|
41184
41387
|
}
|
|
41185
41388
|
});
|
|
41186
41389
|
// node_modules/@base-ui/utils/useControlled.mjs
|
|
41187
|
-
function
|
|
41390
|
+
function p8({ controlled: t, default: n, name: r, state: i = "value" }) {
|
|
41188
41391
|
let { current: a } = e.useRef(t !== void 0), [o, s] = e.useState(() => n), c = a && t !== void 0 ? t : o;
|
|
41189
41392
|
if (process.env.NODE_ENV !== "production") {
|
|
41190
41393
|
e.useEffect(() => {
|
|
@@ -41202,14 +41405,14 @@ function a8({ controlled: t, default: n, name: r, state: i = "value" }) {
|
|
|
41202
41405
|
]);
|
|
41203
41406
|
let { current: o } = e.useRef(n);
|
|
41204
41407
|
e.useEffect(() => {
|
|
41205
|
-
!a &&
|
|
41408
|
+
!a && m8(o) !== m8(n) && aG([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join("\n"));
|
|
41206
41409
|
}, [n]);
|
|
41207
41410
|
}
|
|
41208
41411
|
return [c, e.useCallback((e) => {
|
|
41209
41412
|
a || s(e);
|
|
41210
41413
|
}, [])];
|
|
41211
41414
|
}
|
|
41212
|
-
function
|
|
41415
|
+
function m8(e) {
|
|
41213
41416
|
let t = 0, n = /* @__PURE__ */ new WeakMap();
|
|
41214
41417
|
try {
|
|
41215
41418
|
let r = JSON.stringify(e, function(e, r) {
|
|
@@ -41229,8 +41432,8 @@ function o8(e) {
|
|
|
41229
41432
|
}
|
|
41230
41433
|
}
|
|
41231
41434
|
// node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs
|
|
41232
|
-
function
|
|
41233
|
-
let { open: n, defaultOpen: r = !1, onOpenChange: i, disabled: a } = t, [o, s] =
|
|
41435
|
+
function h8(t) {
|
|
41436
|
+
let { open: n, defaultOpen: r = !1, onOpenChange: i, disabled: a } = t, [o, s] = p8({
|
|
41234
41437
|
controlled: n,
|
|
41235
41438
|
default: r,
|
|
41236
41439
|
name: "Collapsible",
|
|
@@ -41264,25 +41467,25 @@ function s8(t) {
|
|
|
41264
41467
|
]);
|
|
41265
41468
|
}
|
|
41266
41469
|
// node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs
|
|
41267
|
-
var
|
|
41268
|
-
process.env.NODE_ENV !== "production" && (
|
|
41269
|
-
function
|
|
41270
|
-
let t = e.useContext(
|
|
41470
|
+
var g8 = /*#__PURE__*/ e.createContext(void 0);
|
|
41471
|
+
process.env.NODE_ENV !== "production" && (g8.displayName = "CollapsibleRootContext");
|
|
41472
|
+
function _8() {
|
|
41473
|
+
let t = e.useContext(g8);
|
|
41271
41474
|
if (t === void 0) throw Error(process.env.NODE_ENV === "production" ? UL(15) : "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.");
|
|
41272
41475
|
return t;
|
|
41273
41476
|
}
|
|
41274
41477
|
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs
|
|
41275
|
-
var
|
|
41276
|
-
return e ? { [
|
|
41277
|
-
} },
|
|
41278
|
-
return e ?
|
|
41478
|
+
var v8 = "data-open", y8 = "data-closed", b8 = wR, x8 = "data-panel-open", S8 = { [v8]: "" }, C8 = { [y8]: "" }, w8 = { open(e) {
|
|
41479
|
+
return e ? { [x8]: "" } : null;
|
|
41480
|
+
} }, T8 = { open(e) {
|
|
41481
|
+
return e ? S8 : C8;
|
|
41279
41482
|
} };
|
|
41280
41483
|
// node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs
|
|
41281
41484
|
K();
|
|
41282
|
-
var
|
|
41485
|
+
var E8 = G(G({}, T8), OR);
|
|
41283
41486
|
// node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs
|
|
41284
41487
|
K();
|
|
41285
|
-
var
|
|
41488
|
+
var D8 = [
|
|
41286
41489
|
"render",
|
|
41287
41490
|
"className",
|
|
41288
41491
|
"defaultOpen",
|
|
@@ -41290,8 +41493,8 @@ var y8 = [
|
|
|
41290
41493
|
"onOpenChange",
|
|
41291
41494
|
"open",
|
|
41292
41495
|
"style"
|
|
41293
|
-
],
|
|
41294
|
-
let { render: r, className: i, defaultOpen: a = !1, disabled: o = !1, onOpenChange: s, open: c, style: l } = t, u = q(t,
|
|
41496
|
+
], O8 = /*#__PURE__*/ e.forwardRef(function(t, n) {
|
|
41497
|
+
let { render: r, className: i, defaultOpen: a = !1, disabled: o = !1, onOpenChange: s, open: c, style: l } = t, u = q(t, D8), d = Oz(s), f = h8({
|
|
41295
41498
|
open: c,
|
|
41296
41499
|
defaultOpen: a,
|
|
41297
41500
|
onOpenChange: d,
|
|
@@ -41315,23 +41518,23 @@ var y8 = [
|
|
|
41315
41518
|
state: p,
|
|
41316
41519
|
ref: n,
|
|
41317
41520
|
props: u,
|
|
41318
|
-
stateAttributesMapping:
|
|
41521
|
+
stateAttributesMapping: E8
|
|
41319
41522
|
});
|
|
41320
|
-
return /*#__PURE__*/ (0, Z.jsx)(
|
|
41523
|
+
return /*#__PURE__*/ (0, Z.jsx)(g8.Provider, {
|
|
41321
41524
|
value: m,
|
|
41322
41525
|
children: h
|
|
41323
41526
|
});
|
|
41324
41527
|
});
|
|
41325
41528
|
// node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs
|
|
41326
|
-
process.env.NODE_ENV !== "production" && (
|
|
41327
|
-
var
|
|
41529
|
+
process.env.NODE_ENV !== "production" && (O8.displayName = "CollapsibleRoot"), K();
|
|
41530
|
+
var k8 = [
|
|
41328
41531
|
"className",
|
|
41329
41532
|
"disabled",
|
|
41330
41533
|
"render",
|
|
41331
41534
|
"nativeButton",
|
|
41332
41535
|
"style"
|
|
41333
|
-
],
|
|
41334
|
-
let { panelId: n, open: r, handleTrigger: i, state: a, disabled: o } =
|
|
41536
|
+
], A8 = G(G({}, w8), OR), j8 = /*#__PURE__*/ e.forwardRef(function(e, t) {
|
|
41537
|
+
let { panelId: n, open: r, handleTrigger: i, state: a, disabled: o } = _8(), { className: s, disabled: c = o, render: l, nativeButton: u = !0, style: d } = e, f = q(e, k8), { getButtonProps: p, buttonRef: m } = dG({
|
|
41335
41538
|
disabled: c,
|
|
41336
41539
|
native: u
|
|
41337
41540
|
});
|
|
@@ -41347,17 +41550,17 @@ var x8 = [
|
|
|
41347
41550
|
f,
|
|
41348
41551
|
p
|
|
41349
41552
|
],
|
|
41350
|
-
stateAttributesMapping:
|
|
41553
|
+
stateAttributesMapping: A8
|
|
41351
41554
|
});
|
|
41352
41555
|
});
|
|
41353
41556
|
// node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs
|
|
41354
|
-
process.env.NODE_ENV !== "production" && (
|
|
41355
|
-
var
|
|
41557
|
+
process.env.NODE_ENV !== "production" && (j8.displayName = "CollapsibleTrigger"), K();
|
|
41558
|
+
var M8 = {
|
|
41356
41559
|
height: void 0,
|
|
41357
41560
|
width: void 0
|
|
41358
41561
|
};
|
|
41359
|
-
function
|
|
41360
|
-
let { externalRef: n, hiddenUntilFound: r, id: i, keepMounted: a, mounted: o, onOpenChange: s, open: c, setMounted: l, setOpen: u, transitionStatus: d } = t, f = e.useRef(null), p = e.useRef(null), [m, h] = e.useState(
|
|
41562
|
+
function N8(t) {
|
|
41563
|
+
let { externalRef: n, hiddenUntilFound: r, id: i, keepMounted: a, mounted: o, onOpenChange: s, open: c, setMounted: l, setOpen: u, transitionStatus: d } = t, f = e.useRef(null), p = e.useRef(null), [m, h] = e.useState(M8), g = e.useRef(M8), _ = e.useRef(!1), v = e.useRef(c), y = e.useRef(!1), [b, x] = e.useState(!1), S = e.useRef(null), C = _z(n, f), w = Cz(c), T = JV(f), E = !c && !o, D = b ? "idle" : d, O = c && (v.current || y.current), k = !c && o && p.current === "css-animation" && m.height === void 0 && m.width === void 0 ? g.current : m, A = r && E && p.current !== "css-animation", j = Oz((e, t = !0) => {
|
|
41361
41564
|
t && (g.current = e), h(e);
|
|
41362
41565
|
}), M = Oz(() => {
|
|
41363
41566
|
var e;
|
|
@@ -41378,39 +41581,39 @@ function T8(t) {
|
|
|
41378
41581
|
let e = f.current;
|
|
41379
41582
|
if (!e) return;
|
|
41380
41583
|
!c && S.current && M();
|
|
41381
|
-
let t =
|
|
41584
|
+
let t = F8(e, O);
|
|
41382
41585
|
if (p.current = t, c && d === "idle" && v.current && t === "css-animation") {
|
|
41383
|
-
g.current =
|
|
41586
|
+
g.current = P8(e);
|
|
41384
41587
|
return;
|
|
41385
41588
|
}
|
|
41386
41589
|
if (c && d === "starting") {
|
|
41387
41590
|
let n = _.current;
|
|
41388
41591
|
if (_.current = !1, t === "none") {
|
|
41389
|
-
j(
|
|
41592
|
+
j(P8(e)), x(!0);
|
|
41390
41593
|
return;
|
|
41391
41594
|
}
|
|
41392
41595
|
if (t === "css-transition") {
|
|
41393
|
-
let t =
|
|
41394
|
-
if (j(
|
|
41395
|
-
let r =
|
|
41596
|
+
let t = R8(e);
|
|
41597
|
+
if (j(P8(e)), !n) return t;
|
|
41598
|
+
let r = L8(e, "transition-duration", "0s");
|
|
41396
41599
|
return N(r), x(!0), t;
|
|
41397
41600
|
}
|
|
41398
|
-
j(
|
|
41399
|
-
let r =
|
|
41601
|
+
j(P8(e));
|
|
41602
|
+
let r = L8(e, "animation-name", "none");
|
|
41400
41603
|
if (!n) {
|
|
41401
41604
|
r();
|
|
41402
41605
|
return;
|
|
41403
41606
|
}
|
|
41404
|
-
let i =
|
|
41607
|
+
let i = L8(e, "animation-duration", "0s");
|
|
41405
41608
|
r(), N(i), x(!0);
|
|
41406
41609
|
return;
|
|
41407
41610
|
}
|
|
41408
41611
|
if (!c && o && (d === "idle" || d === "starting")) {
|
|
41409
41612
|
if (t === "none") {
|
|
41410
|
-
j(
|
|
41613
|
+
j(M8, !1), l(!1);
|
|
41411
41614
|
return;
|
|
41412
41615
|
}
|
|
41413
|
-
j(
|
|
41616
|
+
j(P8(e));
|
|
41414
41617
|
return;
|
|
41415
41618
|
}
|
|
41416
41619
|
if (d !== "ending") return;
|
|
@@ -41418,8 +41621,8 @@ function T8(t) {
|
|
|
41418
41621
|
l(!1);
|
|
41419
41622
|
return;
|
|
41420
41623
|
}
|
|
41421
|
-
let n =
|
|
41422
|
-
n.height > 0 || n.width > 0 ? (j(n), t === "css-animation" &&
|
|
41624
|
+
let n = P8(e);
|
|
41625
|
+
n.height > 0 || n.width > 0 ? (j(n), t === "css-animation" && L8(e, "animation-name", "none")()) : l(!1);
|
|
41423
41626
|
}, [
|
|
41424
41627
|
o,
|
|
41425
41628
|
c,
|
|
@@ -41434,17 +41637,17 @@ function T8(t) {
|
|
|
41434
41637
|
open: !0,
|
|
41435
41638
|
ref: f,
|
|
41436
41639
|
onComplete() {
|
|
41437
|
-
c && j(
|
|
41640
|
+
c && j(M8, !1);
|
|
41438
41641
|
}
|
|
41439
41642
|
}), e.useEffect(() => {
|
|
41440
41643
|
if (c || !o || D !== "ending") return;
|
|
41441
41644
|
if (!f.current) {
|
|
41442
|
-
l(!1), j(
|
|
41645
|
+
l(!1), j(M8, !1);
|
|
41443
41646
|
return;
|
|
41444
41647
|
}
|
|
41445
41648
|
let e = new AbortController(), t = -1;
|
|
41446
41649
|
function n() {
|
|
41447
|
-
w.current || (l(!1), j(
|
|
41650
|
+
w.current || (l(!1), j(M8, !1));
|
|
41448
41651
|
}
|
|
41449
41652
|
return t = Pz.request(() => {
|
|
41450
41653
|
T(n, e.signal);
|
|
@@ -41468,7 +41671,7 @@ function T8(t) {
|
|
|
41468
41671
|
let t = JL.create(), n = -1, r = (r, i) => {
|
|
41469
41672
|
t.start(0, () => {
|
|
41470
41673
|
w.current || (n = Pz.request(() => {
|
|
41471
|
-
w.current || (r && (_.current = !1), i && e.setAttribute(
|
|
41674
|
+
w.current || (r && (_.current = !1), i && e.setAttribute(b8, ""), e.setAttribute("hidden", "until-found"));
|
|
41472
41675
|
}));
|
|
41473
41676
|
});
|
|
41474
41677
|
}, i = hz(e, "beforematch", (t) => {
|
|
@@ -41478,8 +41681,8 @@ function T8(t) {
|
|
|
41478
41681
|
return;
|
|
41479
41682
|
}
|
|
41480
41683
|
_.current = !0;
|
|
41481
|
-
let i = e.hasAttribute(
|
|
41482
|
-
e.removeAttribute(
|
|
41684
|
+
let i = e.hasAttribute(b8);
|
|
41685
|
+
e.removeAttribute(b8), u(!0), r(!0, i);
|
|
41483
41686
|
});
|
|
41484
41687
|
return () => {
|
|
41485
41688
|
t.clear(), Pz.cancel(n), i();
|
|
@@ -41492,7 +41695,7 @@ function T8(t) {
|
|
|
41492
41695
|
let F = a || r || o || c;
|
|
41493
41696
|
return {
|
|
41494
41697
|
height: k.height,
|
|
41495
|
-
props: G(G({}, A ? { [
|
|
41698
|
+
props: G(G({}, A ? { [b8]: "" } : void 0), {}, {
|
|
41496
41699
|
hidden: E,
|
|
41497
41700
|
id: i
|
|
41498
41701
|
}),
|
|
@@ -41503,28 +41706,28 @@ function T8(t) {
|
|
|
41503
41706
|
width: k.width
|
|
41504
41707
|
};
|
|
41505
41708
|
}
|
|
41506
|
-
function
|
|
41709
|
+
function P8(e) {
|
|
41507
41710
|
return {
|
|
41508
41711
|
height: e.scrollHeight,
|
|
41509
41712
|
width: e.scrollWidth
|
|
41510
41713
|
};
|
|
41511
41714
|
}
|
|
41512
|
-
function
|
|
41513
|
-
let n = lC(e).getComputedStyle(e), r = (n.animationName.split(",").map((e) => e.trim()).some((e) => e !== "" && e !== "none") || t) &&
|
|
41715
|
+
function F8(e, t) {
|
|
41716
|
+
let n = lC(e).getComputedStyle(e), r = (n.animationName.split(",").map((e) => e.trim()).some((e) => e !== "" && e !== "none") || t) && I8(n.animationDuration), i = I8(n.transitionDuration);
|
|
41514
41717
|
return r && i ?
|
|
41515
41718
|
/* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */
|
|
41516
41719
|
(process.env.NODE_ENV !== "production" && LB("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used."), "css-transition") : i ? "css-transition" : r ? "css-animation" : "none";
|
|
41517
41720
|
}
|
|
41518
|
-
function
|
|
41721
|
+
function I8(e) {
|
|
41519
41722
|
return e.split(",").map((e) => e.trim()).some((e) => e !== "" && Number.parseFloat(e) > 0);
|
|
41520
41723
|
}
|
|
41521
|
-
function
|
|
41724
|
+
function L8(e, t, n) {
|
|
41522
41725
|
let r = e.style.getPropertyValue(t), i = e.style.getPropertyPriority(t);
|
|
41523
41726
|
return e.style.setProperty(t, n), () => {
|
|
41524
41727
|
r === "" ? e.style.removeProperty(t) : e.style.setProperty(t, r, i);
|
|
41525
41728
|
};
|
|
41526
41729
|
}
|
|
41527
|
-
function
|
|
41730
|
+
function R8(e) {
|
|
41528
41731
|
let t = {
|
|
41529
41732
|
"justify-content": e.style.justifyContent,
|
|
41530
41733
|
"align-items": e.style.alignItems,
|
|
@@ -41545,27 +41748,27 @@ function A8(e) {
|
|
|
41545
41748
|
};
|
|
41546
41749
|
}
|
|
41547
41750
|
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs
|
|
41548
|
-
var
|
|
41751
|
+
var z8 = "--collapsible-panel-height", B8 = "--collapsible-panel-width";
|
|
41549
41752
|
// node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs
|
|
41550
41753
|
K();
|
|
41551
|
-
var
|
|
41754
|
+
var V8 = [
|
|
41552
41755
|
"className",
|
|
41553
41756
|
"hiddenUntilFound",
|
|
41554
41757
|
"keepMounted",
|
|
41555
41758
|
"render",
|
|
41556
41759
|
"id",
|
|
41557
41760
|
"style"
|
|
41558
|
-
],
|
|
41559
|
-
let { className: r, hiddenUntilFound: i, keepMounted: a, render: o, id: s, style: c } = t, l = q(t,
|
|
41761
|
+
], H8 = /*#__PURE__*/ e.forwardRef(function(t, n) {
|
|
41762
|
+
let { className: r, hiddenUntilFound: i, keepMounted: a, render: o, id: s, style: c } = t, l = q(t, V8);
|
|
41560
41763
|
/* istanbul ignore else -- `process.env.NODE_ENV` is a build-time constant under test */
|
|
41561
41764
|
process.env.NODE_ENV !== "production" && e.useEffect(() => {
|
|
41562
41765
|
i && a === !1 && LB("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.");
|
|
41563
41766
|
}, [i, a]);
|
|
41564
|
-
let { defaultPanelId: u, mounted: d, onOpenChange: f, open: p, setMounted: m, setPanelIdState: h, setOpen: g, state: _, transitionStatus: v } =
|
|
41767
|
+
let { defaultPanelId: u, mounted: d, onOpenChange: f, open: p, setMounted: m, setPanelIdState: h, setOpen: g, state: _, transitionStatus: v } = _8(), y = i != null && i, b = a != null && a, x = s || void 0, S = x == null ? u : x;
|
|
41565
41768
|
VL(() => (h((e) => x == null ? e === null ? void 0 : e : x), () => {
|
|
41566
41769
|
h((e) => e === x ? null : e);
|
|
41567
41770
|
}), [x, h]);
|
|
41568
|
-
let { height: C, props: w, ref: T, shouldPreventOpenAnimation: E, shouldRender: D, transitionStatus: O, width: k } =
|
|
41771
|
+
let { height: C, props: w, ref: T, shouldPreventOpenAnimation: E, shouldRender: D, transitionStatus: O, width: k } = N8({
|
|
41569
41772
|
externalRef: n,
|
|
41570
41773
|
hiddenUntilFound: y,
|
|
41571
41774
|
id: S,
|
|
@@ -41582,36 +41785,36 @@ var N8 = [
|
|
|
41582
41785
|
props: [
|
|
41583
41786
|
w,
|
|
41584
41787
|
{ style: {
|
|
41585
|
-
[
|
|
41586
|
-
[
|
|
41788
|
+
[z8]: C === void 0 ? "auto" : `${C}px`,
|
|
41789
|
+
[B8]: k === void 0 ? "auto" : `${k}px`
|
|
41587
41790
|
} },
|
|
41588
41791
|
l,
|
|
41589
41792
|
j ? { style: j } : void 0,
|
|
41590
41793
|
E ? { style: { animationName: "none" } } : void 0
|
|
41591
41794
|
],
|
|
41592
|
-
stateAttributesMapping:
|
|
41795
|
+
stateAttributesMapping: E8
|
|
41593
41796
|
});
|
|
41594
41797
|
return D ? M : null;
|
|
41595
41798
|
});
|
|
41596
41799
|
// src/components/collapsible-root.tsx
|
|
41597
|
-
process.env.NODE_ENV !== "production" && (
|
|
41598
|
-
var
|
|
41599
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
41800
|
+
process.env.NODE_ENV !== "production" && (H8.displayName = "CollapsiblePanel"), K();
|
|
41801
|
+
var U8 = i(function(e, t) {
|
|
41802
|
+
return /* @__PURE__ */ (0, Z.jsx)(O8, G({
|
|
41600
41803
|
ref: t,
|
|
41601
41804
|
"data-slot": "collapsible"
|
|
41602
41805
|
}, e));
|
|
41603
41806
|
});
|
|
41604
|
-
function
|
|
41807
|
+
function W8(e) {
|
|
41605
41808
|
let t = JW({}, (qW(e), e));
|
|
41606
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
41809
|
+
return /* @__PURE__ */ (0, Z.jsx)(j8, G({ "data-slot": "collapsible-trigger" }, t));
|
|
41607
41810
|
}
|
|
41608
|
-
function
|
|
41811
|
+
function G8(e) {
|
|
41609
41812
|
let t = JW({}, (qW(e), e));
|
|
41610
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
41813
|
+
return /* @__PURE__ */ (0, Z.jsx)(H8, G({ "data-slot": "collapsible-content" }, t));
|
|
41611
41814
|
}
|
|
41612
41815
|
// src/components/reasoning.tsx
|
|
41613
41816
|
K();
|
|
41614
|
-
var
|
|
41817
|
+
var K8 = [
|
|
41615
41818
|
"className",
|
|
41616
41819
|
"variant",
|
|
41617
41820
|
"open",
|
|
@@ -41622,22 +41825,22 @@ var R8 = [
|
|
|
41622
41825
|
"onAnimationStart",
|
|
41623
41826
|
"style",
|
|
41624
41827
|
"children"
|
|
41625
|
-
],
|
|
41828
|
+
], q8 = ["side", "className"], J8 = [
|
|
41626
41829
|
"active",
|
|
41627
41830
|
"duration",
|
|
41628
41831
|
"className"
|
|
41629
|
-
],
|
|
41832
|
+
], Y8 = ["className", "children"], X8 = ["className", "children"], Z8 = n({
|
|
41630
41833
|
isPreview: !1,
|
|
41631
41834
|
showContent: !0
|
|
41632
|
-
}),
|
|
41835
|
+
}), Q8 = aK("aui-reasoning-root mb-0 w-full", {
|
|
41633
41836
|
variants: { variant: {
|
|
41634
41837
|
outline: "rounded-lg px-0 py-2",
|
|
41635
41838
|
ghost: "",
|
|
41636
41839
|
muted: "bg-muted/50 rounded-lg px-3 py-2"
|
|
41637
41840
|
} },
|
|
41638
41841
|
defaultVariants: { variant: "outline" }
|
|
41639
|
-
}),
|
|
41640
|
-
let { className: n, variant: r, open: i, onOpenChange: a, defaultOpen: o = !1, streaming: c, showContent: l = !0, onAnimationStart: u, style: d, children: f } = e, p = q(e,
|
|
41842
|
+
}), $8 = i(function(e, t) {
|
|
41843
|
+
let { className: n, variant: r, open: i, onOpenChange: a, defaultOpen: o = !1, streaming: c, showContent: l = !0, onAnimationStart: u, style: d, children: f } = e, p = q(e, K8), [m] = g(o), [_, v] = g(null), y = i !== void 0, b = y ? i : _ == null ? c || m : _, x = c === !0 && b, S = h(c);
|
|
41641
41844
|
eq(() => {
|
|
41642
41845
|
S.current !== c && (S.current = c, y || _ !== null || m || u == null || u());
|
|
41643
41846
|
}, [
|
|
@@ -41657,36 +41860,36 @@ var R8 = [
|
|
|
41657
41860
|
isPreview: l && x,
|
|
41658
41861
|
showContent: l
|
|
41659
41862
|
};
|
|
41660
|
-
return l ? /* @__PURE__ */ (0, Z.jsx)(
|
|
41863
|
+
return l ? /* @__PURE__ */ (0, Z.jsx)(U8, G(G({
|
|
41661
41864
|
ref: t,
|
|
41662
41865
|
"data-slot": "reasoning-root",
|
|
41663
41866
|
"data-variant": r,
|
|
41664
41867
|
open: b,
|
|
41665
41868
|
onOpenChange: C,
|
|
41666
|
-
className: Q("group/reasoning-root",
|
|
41869
|
+
className: Q("group/reasoning-root", Q8({
|
|
41667
41870
|
variant: r,
|
|
41668
41871
|
className: n
|
|
41669
41872
|
})),
|
|
41670
41873
|
style: G({ "--animation-duration": "200ms" }, typeof d == "object" && d || {})
|
|
41671
|
-
}, p), {}, { children: /* @__PURE__ */ (0, Z.jsx)(
|
|
41874
|
+
}, p), {}, { children: /* @__PURE__ */ (0, Z.jsx)(Z8.Provider, {
|
|
41672
41875
|
value: w,
|
|
41673
41876
|
children: f
|
|
41674
41877
|
}) })) : /* @__PURE__ */ (0, Z.jsx)("div", G(G({
|
|
41675
41878
|
ref: t,
|
|
41676
41879
|
"data-slot": "reasoning-root",
|
|
41677
41880
|
"data-variant": r,
|
|
41678
|
-
className: Q("group/reasoning-root",
|
|
41881
|
+
className: Q("group/reasoning-root", Q8({
|
|
41679
41882
|
variant: r,
|
|
41680
41883
|
className: n
|
|
41681
41884
|
})),
|
|
41682
41885
|
style: typeof d == "function" ? void 0 : d
|
|
41683
|
-
}, p), {}, { children: /* @__PURE__ */ (0, Z.jsx)(
|
|
41886
|
+
}, p), {}, { children: /* @__PURE__ */ (0, Z.jsx)(Z8.Provider, {
|
|
41684
41887
|
value: w,
|
|
41685
41888
|
children: f
|
|
41686
41889
|
}) }));
|
|
41687
41890
|
});
|
|
41688
|
-
function
|
|
41689
|
-
let { side: t = "bottom", className: n } = e, r = q(e,
|
|
41891
|
+
function e5(e) {
|
|
41892
|
+
let { side: t = "bottom", className: n } = e, r = q(e, q8);
|
|
41690
41893
|
return t === "top" ? /* @__PURE__ */ (0, Z.jsx)("div", G({
|
|
41691
41894
|
"data-slot": "reasoning-fade",
|
|
41692
41895
|
className: Q("aui-reasoning-fade pointer-events-none absolute inset-x-0 top-0 z-10 h-8", "bg-[linear-gradient(to_bottom,var(--color-background),transparent)]", "group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_bottom,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]", "fade-in-0 animate-in", "animation-duration-(--animation-duration)", n)
|
|
@@ -41695,8 +41898,8 @@ function K8(e) {
|
|
|
41695
41898
|
className: Q("aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-8", "bg-[linear-gradient(to_top,var(--color-background),transparent)]", "group-data-[variant=muted]/reasoning-root:bg-[linear-gradient(to_top,color-mix(in_oklab,var(--color-muted)_50%,var(--color-background)),transparent)]", "fade-in-0 animate-in", "animation-duration-(--animation-duration)", n)
|
|
41696
41899
|
}, r));
|
|
41697
41900
|
}
|
|
41698
|
-
function
|
|
41699
|
-
let { active: t, duration: n, className: r } = e, i = q(e,
|
|
41901
|
+
function t5(e) {
|
|
41902
|
+
let { active: t, duration: n, className: r } = e, i = q(e, J8), { showContent: a } = c(Z8), o = t ? "正在思考..." : n === void 0 ? "思考过程" : `思考了 ${n} 秒`, s = Q("aui-reasoning-trigger flex max-w-[75%] origin-left items-center gap-2 py-1.5 text-sm text-muted-foreground", t && a && "hover:text-foreground transition-colors active:scale-[0.98]", r), l = /* @__PURE__ */ (0, Z.jsxs)(Z.Fragment, { children: [/* @__PURE__ */ (0, Z.jsx)(gI, {
|
|
41700
41903
|
"data-slot": "reasoning-trigger-icon",
|
|
41701
41904
|
className: "aui-reasoning-trigger-icon size-4 shrink-0"
|
|
41702
41905
|
}), /* @__PURE__ */ (0, Z.jsx)("span", {
|
|
@@ -41708,20 +41911,20 @@ function q8(e) {
|
|
|
41708
41911
|
"data-slot": "reasoning-trigger",
|
|
41709
41912
|
className: s,
|
|
41710
41913
|
children: l
|
|
41711
|
-
}) : /* @__PURE__ */ (0, Z.jsx)(
|
|
41914
|
+
}) : /* @__PURE__ */ (0, Z.jsx)(W8, G(G({
|
|
41712
41915
|
"data-slot": "reasoning-trigger",
|
|
41713
41916
|
className: s
|
|
41714
41917
|
}, i), {}, { children: l }));
|
|
41715
41918
|
}
|
|
41716
|
-
function
|
|
41717
|
-
let { className: t, children: n } = e, r = q(e,
|
|
41718
|
-
return i ? /* @__PURE__ */ (0, Z.jsx)(
|
|
41919
|
+
function n5(e) {
|
|
41920
|
+
let { className: t, children: n } = e, r = q(e, Y8), { showContent: i } = c(Z8);
|
|
41921
|
+
return i ? /* @__PURE__ */ (0, Z.jsx)(G8, G(G({
|
|
41719
41922
|
"data-slot": "reasoning-content",
|
|
41720
41923
|
className: Q("aui-reasoning-content relative overflow-hidden text-sm text-muted-foreground outline-none", "group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none", "data-closed:animate-collapsible-up", "data-open:animate-collapsible-down", "data-closed:fill-mode-forwards", "data-closed:pointer-events-none", "[--tw-duration:var(--animation-duration)]", t)
|
|
41721
41924
|
}, r), {}, { children: n })) : null;
|
|
41722
41925
|
}
|
|
41723
|
-
function
|
|
41724
|
-
let { className: t, children: n } = e, r = q(e,
|
|
41926
|
+
function r5(e) {
|
|
41927
|
+
let { className: t, children: n } = e, r = q(e, X8), { showContent: i } = c(Z8);
|
|
41725
41928
|
return i ? /* @__PURE__ */ (0, Z.jsx)("div", G(G({
|
|
41726
41929
|
"data-slot": "reasoning-text",
|
|
41727
41930
|
className: Q("aui-reasoning-text relative z-0 max-h-64 overflow-y-auto ps-6 pt-2 pb-2 leading-relaxed text-pretty", "motion-reduce:animate-none", t)
|
|
@@ -41732,8 +41935,8 @@ function Y8(e) {
|
|
|
41732
41935
|
}
|
|
41733
41936
|
// src/components/reasoning.aui.tsx
|
|
41734
41937
|
K();
|
|
41735
|
-
var
|
|
41736
|
-
let { onAnimationStart: n } = e, r = q(e,
|
|
41938
|
+
var i5 = ["onAnimationStart"], a5 = i(function(e, t) {
|
|
41939
|
+
let { onAnimationStart: n } = e, r = q(e, i5), i = h(null), a = hF(i, 200), o = s(() => {
|
|
41737
41940
|
a(), n == null || n();
|
|
41738
41941
|
}, [a, n]), c = s((e) => {
|
|
41739
41942
|
if (i.current = e, typeof t == "function") {
|
|
@@ -41743,11 +41946,11 @@ var X8 = ["onAnimationStart"], Z8 = i(function(e, t) {
|
|
|
41743
41946
|
};
|
|
41744
41947
|
} else t && (t.current = e);
|
|
41745
41948
|
}, [t]);
|
|
41746
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
41949
|
+
return /* @__PURE__ */ (0, Z.jsx)($8, G({
|
|
41747
41950
|
ref: c,
|
|
41748
41951
|
onAnimationStart: o
|
|
41749
41952
|
}, r));
|
|
41750
|
-
}),
|
|
41953
|
+
}), o5 = () => /* @__PURE__ */ (0, Z.jsx)(d8, {}), s5 = ({ children: e, startIndex: t, endIndex: n }) => {
|
|
41751
41954
|
let r = X((e) => {
|
|
41752
41955
|
var r;
|
|
41753
41956
|
if (((r = e.message.status) == null ? void 0 : r.type) !== "running") return !1;
|
|
@@ -41757,23 +41960,23 @@ var X8 = ["onAnimationStart"], Z8 = i(function(e, t) {
|
|
|
41757
41960
|
}
|
|
41758
41961
|
return !1;
|
|
41759
41962
|
});
|
|
41760
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
41963
|
+
return /* @__PURE__ */ (0, Z.jsxs)(a5, {
|
|
41761
41964
|
streaming: r,
|
|
41762
41965
|
showContent: !1,
|
|
41763
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
41966
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(t5, { active: r }), /* @__PURE__ */ (0, Z.jsx)(n5, {
|
|
41764
41967
|
"aria-busy": r,
|
|
41765
41968
|
"aria-label": "AI 思考过程",
|
|
41766
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
41969
|
+
children: /* @__PURE__ */ (0, Z.jsx)(r5, { children: e })
|
|
41767
41970
|
})]
|
|
41768
41971
|
});
|
|
41769
|
-
},
|
|
41770
|
-
|
|
41771
|
-
var
|
|
41972
|
+
}, c5 = o(o5);
|
|
41973
|
+
c5.displayName = "Reasoning", c5.Root = a5, c5.Trigger = t5, c5.Content = n5, c5.Text = r5, c5.Fade = e5;
|
|
41974
|
+
var l5 = o(s5);
|
|
41772
41975
|
// src/components/ui/textarea.tsx
|
|
41773
|
-
|
|
41774
|
-
var
|
|
41775
|
-
function
|
|
41776
|
-
let { className: t } = e, n = q(e,
|
|
41976
|
+
l5.displayName = "ReasoningGroup", K();
|
|
41977
|
+
var u5 = ["className"];
|
|
41978
|
+
function d5(e) {
|
|
41979
|
+
let { className: t } = e, n = q(e, u5);
|
|
41777
41980
|
return /* @__PURE__ */ (0, Z.jsx)("textarea", G({
|
|
41778
41981
|
"data-slot": "textarea",
|
|
41779
41982
|
className: Q("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", t)
|
|
@@ -41781,23 +41984,23 @@ function r5(e) {
|
|
|
41781
41984
|
}
|
|
41782
41985
|
// src/components/tool-fallback.aui.tsx
|
|
41783
41986
|
K();
|
|
41784
|
-
var
|
|
41987
|
+
var f5 = [
|
|
41785
41988
|
"className",
|
|
41786
41989
|
"open",
|
|
41787
41990
|
"onOpenChange",
|
|
41788
41991
|
"defaultOpen",
|
|
41789
41992
|
"children"
|
|
41790
|
-
],
|
|
41993
|
+
], p5 = ["className"], m5 = [
|
|
41791
41994
|
"toolName",
|
|
41792
41995
|
"status",
|
|
41793
41996
|
"responseDeliveryStatus",
|
|
41794
41997
|
"className"
|
|
41795
|
-
],
|
|
41998
|
+
], h5 = ["className", "children"], g5 = ["argsText", "className"], _5 = ["result", "className"], v5 = ["status", "className"], y5 = [
|
|
41796
41999
|
"approval",
|
|
41797
42000
|
"className",
|
|
41798
42001
|
"focusReceiptRef",
|
|
41799
42002
|
"receiptRef"
|
|
41800
|
-
],
|
|
42003
|
+
], b5 = [
|
|
41801
42004
|
"className",
|
|
41802
42005
|
"forwardedRef",
|
|
41803
42006
|
"carryFocusRef",
|
|
@@ -41807,45 +42010,45 @@ var i5 = [
|
|
|
41807
42010
|
"approval",
|
|
41808
42011
|
"respondToApproval",
|
|
41809
42012
|
"status"
|
|
41810
|
-
],
|
|
41811
|
-
function
|
|
41812
|
-
let { className: t, open: n, onOpenChange: r, defaultOpen: i = !1, children: a } = e, o = q(e,
|
|
42013
|
+
], x5 = 200, S5 = "active:scale-[0.98]";
|
|
42014
|
+
function C5(e) {
|
|
42015
|
+
let { className: t, open: n, onOpenChange: r, defaultOpen: i = !1, children: a } = e, o = q(e, f5), c = h(null), [l, u] = g(i), d = hF(c, x5), f = n !== void 0, p = f ? n : l, m = s((e) => {
|
|
41813
42016
|
d(), f || u(e), r == null || r(e);
|
|
41814
42017
|
}, [
|
|
41815
42018
|
d,
|
|
41816
42019
|
f,
|
|
41817
42020
|
r
|
|
41818
42021
|
]);
|
|
41819
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42022
|
+
return /* @__PURE__ */ (0, Z.jsx)(U8, G(G({
|
|
41820
42023
|
ref: c,
|
|
41821
42024
|
"data-slot": "tool-fallback-root",
|
|
41822
42025
|
open: p,
|
|
41823
42026
|
onOpenChange: m,
|
|
41824
42027
|
className: Q("aui-tool-fallback-root group/tool-fallback-root w-full", t),
|
|
41825
|
-
style: { "--animation-duration": `${
|
|
42028
|
+
style: { "--animation-duration": `${x5}ms` }
|
|
41826
42029
|
}, o), {}, { children: a }));
|
|
41827
42030
|
}
|
|
41828
|
-
var
|
|
42031
|
+
var w5 = {
|
|
41829
42032
|
running: XI,
|
|
41830
42033
|
complete: vI,
|
|
41831
42034
|
incomplete: AI,
|
|
41832
42035
|
"requires-action": EI
|
|
41833
|
-
},
|
|
42036
|
+
}, T5 = (e) => {
|
|
41834
42037
|
if (e < 1e3) return "<1秒";
|
|
41835
42038
|
let t = e / 1e3;
|
|
41836
42039
|
return t < 10 ? `${(Math.floor(t * 10) / 10).toFixed(1)}秒` : t < 60 ? `${Math.floor(t)}秒` : `${Math.floor(t / 60)}分 ${Math.floor(t % 60)}秒`;
|
|
41837
42040
|
};
|
|
41838
|
-
function
|
|
41839
|
-
let { className: t } = e, n = q(e,
|
|
42041
|
+
function E5(e) {
|
|
42042
|
+
let { className: t } = e, n = q(e, p5), r = Jy();
|
|
41840
42043
|
return r === void 0 ? null : /* @__PURE__ */ (0, Z.jsx)("span", G(G({
|
|
41841
42044
|
"data-slot": "tool-fallback-duration",
|
|
41842
42045
|
className: Q("aui-tool-fallback-duration text-muted-foreground text-xs tabular-nums", t)
|
|
41843
|
-
}, n), {}, { children:
|
|
42046
|
+
}, n), {}, { children: T5(r) }));
|
|
41844
42047
|
}
|
|
41845
|
-
function
|
|
42048
|
+
function D5(e) {
|
|
41846
42049
|
var t;
|
|
41847
|
-
let { toolName: n, status: r, responseDeliveryStatus: i, className: a } = e, o = q(e,
|
|
41848
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
42050
|
+
let { toolName: n, status: r, responseDeliveryStatus: i, className: a } = e, o = q(e, m5), s = (t = r == null ? void 0 : r.type) == null ? "complete" : t, c = s === "running", l = (r == null ? void 0 : r.type) === "incomplete" && r.reason === "cancelled", u = w5[s], d = i === "queued" ? "回复已排队,尚未发送" : s === "running" ? "正在执行工具" : s === "requires-action" ? "等待工具操作" : s === "incomplete" ? l ? "已取消工具调用" : "工具执行失败" : "已调用工具";
|
|
42051
|
+
return /* @__PURE__ */ (0, Z.jsxs)(W8, G(G({
|
|
41849
42052
|
"data-slot": "tool-fallback-trigger",
|
|
41850
42053
|
className: Q("aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit max-w-full origin-left items-center gap-2 py-1.5 text-sm transition-[color,scale] active:scale-[0.98]", a)
|
|
41851
42054
|
}, o), {}, { children: [
|
|
@@ -41862,16 +42065,16 @@ function y5(e) {
|
|
|
41862
42065
|
/* @__PURE__ */ (0, Z.jsx)("b", { children: n })
|
|
41863
42066
|
]
|
|
41864
42067
|
}),
|
|
41865
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42068
|
+
/* @__PURE__ */ (0, Z.jsx)(E5, {}),
|
|
41866
42069
|
/* @__PURE__ */ (0, Z.jsx)(bI, {
|
|
41867
42070
|
"data-slot": "tool-fallback-trigger-chevron",
|
|
41868
42071
|
className: Q("aui-tool-fallback-trigger-chevron size-4 shrink-0", "transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none", "-rotate-90", "group-data-open/trigger:rotate-0", "group-data-panel-open/trigger:rotate-0")
|
|
41869
42072
|
})
|
|
41870
42073
|
] }));
|
|
41871
42074
|
}
|
|
41872
|
-
function
|
|
41873
|
-
let { className: t, children: n } = e, r = q(e,
|
|
41874
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42075
|
+
function O5(e) {
|
|
42076
|
+
let { className: t, children: n } = e, r = q(e, h5);
|
|
42077
|
+
return /* @__PURE__ */ (0, Z.jsx)(G8, G(G({
|
|
41875
42078
|
"data-slot": "tool-fallback-content",
|
|
41876
42079
|
className: Q("aui-tool-fallback-content relative overflow-hidden text-sm outline-none", "group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none", "data-closed:animate-collapsible-up", "data-open:animate-collapsible-down", "data-closed:fill-mode-forwards", "data-closed:pointer-events-none", "[--tw-duration:var(--animation-duration)]", t)
|
|
41877
42080
|
}, r), {}, { children: /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
@@ -41879,8 +42082,8 @@ function b5(e) {
|
|
|
41879
42082
|
children: n
|
|
41880
42083
|
}) }));
|
|
41881
42084
|
}
|
|
41882
|
-
function
|
|
41883
|
-
let { argsText: t, className: n } = e, r = q(e,
|
|
42085
|
+
function k5(e) {
|
|
42086
|
+
let { argsText: t, className: n } = e, r = q(e, g5);
|
|
41884
42087
|
return t ? /* @__PURE__ */ (0, Z.jsx)("div", G(G({
|
|
41885
42088
|
"data-slot": "tool-fallback-args",
|
|
41886
42089
|
className: Q("aui-tool-fallback-args", n)
|
|
@@ -41889,7 +42092,7 @@ function x5(e) {
|
|
|
41889
42092
|
children: t
|
|
41890
42093
|
}) })) : null;
|
|
41891
42094
|
}
|
|
41892
|
-
var
|
|
42095
|
+
var A5 = (e, t) => {
|
|
41893
42096
|
if (typeof e == "string") return e;
|
|
41894
42097
|
try {
|
|
41895
42098
|
if (e instanceof Error) return String(e);
|
|
@@ -41902,8 +42105,8 @@ var S5 = (e, t) => {
|
|
|
41902
42105
|
return "[无法序列化的数据]";
|
|
41903
42106
|
}
|
|
41904
42107
|
};
|
|
41905
|
-
function
|
|
41906
|
-
let { result: t, className: n } = e, r = q(e,
|
|
42108
|
+
function j5(e) {
|
|
42109
|
+
let { result: t, className: n } = e, r = q(e, _5);
|
|
41907
42110
|
return t === void 0 ? null : /* @__PURE__ */ (0, Z.jsxs)("div", G(G({
|
|
41908
42111
|
"data-slot": "tool-fallback-result",
|
|
41909
42112
|
className: Q("aui-tool-fallback-result", n)
|
|
@@ -41912,13 +42115,13 @@ function C5(e) {
|
|
|
41912
42115
|
children: "执行结果:"
|
|
41913
42116
|
}), /* @__PURE__ */ (0, Z.jsx)("pre", {
|
|
41914
42117
|
className: "aui-tool-fallback-result-content bg-muted/50 text-foreground/90 mt-1 rounded-md p-2.5 text-xs break-words whitespace-pre-wrap",
|
|
41915
|
-
children:
|
|
42118
|
+
children: A5(t, 2)
|
|
41916
42119
|
})] }));
|
|
41917
42120
|
}
|
|
41918
|
-
function
|
|
41919
|
-
let { status: t, className: n } = e, r = q(e,
|
|
42121
|
+
function M5(e) {
|
|
42122
|
+
let { status: t, className: n } = e, r = q(e, v5);
|
|
41920
42123
|
if ((t == null ? void 0 : t.type) !== "incomplete") return null;
|
|
41921
|
-
let i = t.error, a = i == null ? null :
|
|
42124
|
+
let i = t.error, a = i == null ? null : A5(i);
|
|
41922
42125
|
if (!a) return null;
|
|
41923
42126
|
let o = t.reason === "cancelled" ? "取消原因:" : "错误信息:";
|
|
41924
42127
|
return /* @__PURE__ */ (0, Z.jsxs)("div", G(G({
|
|
@@ -41932,30 +42135,30 @@ function w5(e) {
|
|
|
41932
42135
|
children: a
|
|
41933
42136
|
})] }));
|
|
41934
42137
|
}
|
|
41935
|
-
var
|
|
42138
|
+
var N5 = "Approved by user", P5 = "User denied tool execution", F5 = {
|
|
41936
42139
|
"allow-once": "允许一次",
|
|
41937
42140
|
"allow-always": "始终允许",
|
|
41938
42141
|
"reject-once": "拒绝一次",
|
|
41939
42142
|
"reject-always": "始终拒绝"
|
|
41940
|
-
},
|
|
42143
|
+
}, I5 = (e) => Object.hasOwn(F5, e), L5 = (e) => e === "allow-once" || e === "allow-always", R5 = (e) => {
|
|
41941
42144
|
var t, n;
|
|
41942
|
-
return (t = (n = e.label) == null ?
|
|
41943
|
-
},
|
|
42145
|
+
return (t = (n = e.label) == null ? I5(e.kind) ? F5[e.kind] : void 0 : n) == null ? e.id : t;
|
|
42146
|
+
}, z5 = (e) => (e == null ? void 0 : e.display) === "select" || (e == null ? void 0 : e.display) === "text" || (e == null ? void 0 : e.display) === "questions", B5 = (e) => {
|
|
41944
42147
|
var t;
|
|
41945
42148
|
return !((t = e.options) != null && t.length) || e.allowFreeform === !0;
|
|
41946
|
-
},
|
|
42149
|
+
}, V5 = (e, t) => {
|
|
41947
42150
|
var n, r;
|
|
41948
42151
|
return [...((n = t == null ? void 0 : t.optionIds) == null ? [] : n).map((t) => {
|
|
41949
42152
|
var n, r;
|
|
41950
42153
|
return (n = (r = e.options) == null || (r = r.find((e) => e.id === t)) == null ? void 0 : r.label) == null ? t : n;
|
|
41951
42154
|
}), ...t != null && (r = t.text) != null && r.trim() ? [t.text] : []];
|
|
41952
|
-
},
|
|
42155
|
+
}, H5 = (e) => e != null && (e.approved !== void 0 || e.resolution !== void 0), U5 = (e) => {
|
|
41953
42156
|
var t;
|
|
41954
42157
|
if (e.resolution !== void 0) return {
|
|
41955
42158
|
outcome: "closed",
|
|
41956
42159
|
label: e.resolution === "cancelled" ? "已取消,未作出决定" : "已过期,未作出决定"
|
|
41957
42160
|
};
|
|
41958
|
-
let n = e.optionId === void 0 || (t = e.options) == null ? void 0 : t.find((t) => t.id === e.optionId), r = n === void 0 ? e.optionId === void 0 ? void 0 : e.optionId :
|
|
42161
|
+
let n = e.optionId === void 0 || (t = e.options) == null ? void 0 : t.find((t) => t.id === e.optionId), r = n === void 0 ? e.optionId === void 0 ? void 0 : e.optionId : R5(n), i = z5(e) || n !== void 0 && !I5(n.kind), a = e.isAutomatic ? "(自动处理)" : "";
|
|
41959
42162
|
return e.approved ? {
|
|
41960
42163
|
outcome: "allowed",
|
|
41961
42164
|
label: `${i ? "已回答" : "已允许"}${a}`,
|
|
@@ -41965,14 +42168,14 @@ var T5 = "Approved by user", E5 = "User denied tool execution", D5 = {
|
|
|
41965
42168
|
label: `${i ? "已关闭" : "已拒绝"}${a}`,
|
|
41966
42169
|
option: r
|
|
41967
42170
|
};
|
|
41968
|
-
},
|
|
42171
|
+
}, W5 = {
|
|
41969
42172
|
allowed: vI,
|
|
41970
42173
|
refused: AI,
|
|
41971
42174
|
closed: OI
|
|
41972
42175
|
};
|
|
41973
|
-
function
|
|
42176
|
+
function G5(e) {
|
|
41974
42177
|
var t;
|
|
41975
|
-
let { approval: n, className: r, focusReceiptRef: i, receiptRef: a } = e, o = q(e,
|
|
42178
|
+
let { approval: n, className: r, focusReceiptRef: i, receiptRef: a } = e, o = q(e, y5);
|
|
41976
42179
|
p(() => {
|
|
41977
42180
|
var e;
|
|
41978
42181
|
let t = i.current === n.id;
|
|
@@ -41982,7 +42185,7 @@ function L5(e) {
|
|
|
41982
42185
|
i,
|
|
41983
42186
|
a
|
|
41984
42187
|
]);
|
|
41985
|
-
let s =
|
|
42188
|
+
let s = U5(n), c = W5[s.outcome], l = [...new Set([n.text, n.reason].filter((e) => typeof e == "string" && e !== ""))];
|
|
41986
42189
|
return /* @__PURE__ */ (0, Z.jsxs)("div", G(G({
|
|
41987
42190
|
ref: a,
|
|
41988
42191
|
"data-slot": "tool-fallback-approval-receipt",
|
|
@@ -42013,7 +42216,7 @@ function L5(e) {
|
|
|
42013
42216
|
}),
|
|
42014
42217
|
n.answers && ((t = n.questions) == null ? void 0 : t.map((e) => {
|
|
42015
42218
|
var t;
|
|
42016
|
-
let r =
|
|
42219
|
+
let r = V5(e, n.answers && Object.hasOwn(n.answers, e.id) ? n.answers[e.id] : void 0);
|
|
42017
42220
|
return r.length === 0 ? null : /* @__PURE__ */ (0, Z.jsxs)("p", {
|
|
42018
42221
|
className: "aui-tool-fallback-approval-receipt-answer whitespace-pre-line",
|
|
42019
42222
|
children: [
|
|
@@ -42033,7 +42236,7 @@ function L5(e) {
|
|
|
42033
42236
|
}, e))
|
|
42034
42237
|
] }));
|
|
42035
42238
|
}
|
|
42036
|
-
function
|
|
42239
|
+
function K5({ questions: e, dismissible: t, locked: n, onSend: r, onDismiss: i }) {
|
|
42037
42240
|
let [a, o] = g(() => /* @__PURE__ */ new Map()), [s, c] = g(() => /* @__PURE__ */ new Map()), l = (e, t) => o((n) => {
|
|
42038
42241
|
var r;
|
|
42039
42242
|
let i = (r = n.get(e.id)) == null ? [] : r, a = i.includes(t) ? i.filter((e) => e !== t) : e.multiple ? [...i, t] : [t];
|
|
@@ -42069,7 +42272,7 @@ function R5({ questions: e, dismissible: t, locked: n, onSend: r, onDismiss: i }
|
|
|
42069
42272
|
return /* @__PURE__ */ (0, Z.jsxs)(cK, {
|
|
42070
42273
|
size: "sm",
|
|
42071
42274
|
variant: r ? "default" : "outline",
|
|
42072
|
-
className: Q(
|
|
42275
|
+
className: Q(S5, f && "h-auto flex-col items-start gap-0.5 py-2 text-start whitespace-normal"),
|
|
42073
42276
|
"aria-pressed": r,
|
|
42074
42277
|
onClick: () => l(e, t.id),
|
|
42075
42278
|
disabled: n,
|
|
@@ -42080,7 +42283,7 @@ function R5({ questions: e, dismissible: t, locked: n, onSend: r, onDismiss: i }
|
|
|
42080
42283
|
}, t.id);
|
|
42081
42284
|
})
|
|
42082
42285
|
}) : null,
|
|
42083
|
-
|
|
42286
|
+
B5(e) ? /* @__PURE__ */ (0, Z.jsx)(d5, {
|
|
42084
42287
|
value: (o = s.get(e.id)) == null ? "" : o,
|
|
42085
42288
|
onChange: (t) => c((n) => new Map(n).set(e.id, t.target.value)),
|
|
42086
42289
|
disabled: n,
|
|
@@ -42093,7 +42296,7 @@ function R5({ questions: e, dismissible: t, locked: n, onSend: r, onDismiss: i }
|
|
|
42093
42296
|
className: "flex items-center gap-2",
|
|
42094
42297
|
children: [/* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42095
42298
|
size: "sm",
|
|
42096
|
-
className:
|
|
42299
|
+
className: S5,
|
|
42097
42300
|
onClick: () => {
|
|
42098
42301
|
!n && d && r(Object.fromEntries(e.map((e) => [e.id, u(e)])));
|
|
42099
42302
|
},
|
|
@@ -42102,24 +42305,24 @@ function R5({ questions: e, dismissible: t, locked: n, onSend: r, onDismiss: i }
|
|
|
42102
42305
|
}), t ? /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42103
42306
|
size: "sm",
|
|
42104
42307
|
variant: "outline",
|
|
42105
|
-
className:
|
|
42308
|
+
className: S5,
|
|
42106
42309
|
onClick: i,
|
|
42107
42310
|
disabled: n,
|
|
42108
42311
|
children: "关闭"
|
|
42109
42312
|
}) : null]
|
|
42110
42313
|
})] });
|
|
42111
42314
|
}
|
|
42112
|
-
var
|
|
42315
|
+
var q5 = (e, t, n) => (e == null ? void 0 : e.type) !== "requires-action" || e.reason !== "interrupt" || t != null || n != null, J5 = i(function(e, t) {
|
|
42113
42316
|
var n;
|
|
42114
42317
|
let r = h(!1);
|
|
42115
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42318
|
+
return /* @__PURE__ */ (0, Z.jsx)(Y5, G({
|
|
42116
42319
|
carryFocusRef: r,
|
|
42117
42320
|
forwardedRef: t
|
|
42118
42321
|
}, e), (n = e.approval) == null ? void 0 : n.id);
|
|
42119
42322
|
});
|
|
42120
|
-
function
|
|
42323
|
+
function Y5(e) {
|
|
42121
42324
|
var t;
|
|
42122
|
-
let { className: n, forwardedRef: r, carryFocusRef: i, addResult: a, resume: o, interrupt: c, approval: l, respondToApproval: u, status: f } = e, m = q(e,
|
|
42325
|
+
let { className: n, forwardedRef: r, carryFocusRef: i, addResult: a, resume: o, interrupt: c, approval: l, respondToApproval: u, status: f } = e, m = q(e, b5), [_, v] = g(!1), y = X((e) => e.thread.voice !== void 0), b = X((e) => e.thread.capabilities.answerToolCall), x = _ || y, [S, C] = g(null), [w, T] = g(""), [E, D] = g(null), O = (f == null ? void 0 : f.type) === "requires-action", [k, A] = g(O), [j, M] = g(0), N = h(j);
|
|
42123
42326
|
p(() => {
|
|
42124
42327
|
N.current = j;
|
|
42125
42328
|
}, [j]), O !== k && (A(O), O && (v(!1), C(null), T(""), D(null), M(j + 1)));
|
|
@@ -42141,7 +42344,7 @@ function V5(e) {
|
|
|
42141
42344
|
let L = s((e) => {
|
|
42142
42345
|
let t = P.current;
|
|
42143
42346
|
I.current = !e && t != null && t.contains(t.ownerDocument.activeElement) ? l == null ? void 0 : l.id : null, P.current = e;
|
|
42144
|
-
}, [l == null ? void 0 : l.id]), R = l != null && !
|
|
42347
|
+
}, [l == null ? void 0 : l.id]), R = l != null && !H5(l) && f !== void 0 && f.type !== "requires-action" && !(_ && f.type === "running");
|
|
42145
42348
|
p(() => {
|
|
42146
42349
|
R && (I.current = null);
|
|
42147
42350
|
}, [R]);
|
|
@@ -42149,13 +42352,13 @@ function V5(e) {
|
|
|
42149
42352
|
let e = P.current;
|
|
42150
42353
|
e != null && e.contains(e.ownerDocument.activeElement) && e.focus({ preventScroll: !0 });
|
|
42151
42354
|
};
|
|
42152
|
-
if (l != null &&
|
|
42355
|
+
if (l != null && H5(l)) return /* @__PURE__ */ (0, Z.jsx)(G5, G({
|
|
42153
42356
|
approval: l,
|
|
42154
42357
|
receiptRef: F,
|
|
42155
42358
|
focusReceiptRef: I,
|
|
42156
42359
|
className: n
|
|
42157
42360
|
}, m));
|
|
42158
|
-
if (R || !
|
|
42361
|
+
if (R || !q5(f, l, c)) return null;
|
|
42159
42362
|
let B = l != null && l.prompt ? /* @__PURE__ */ (0, Z.jsx)("p", {
|
|
42160
42363
|
className: "aui-tool-fallback-approval-prompt text-foreground whitespace-pre-line",
|
|
42161
42364
|
children: l.prompt
|
|
@@ -42182,10 +42385,10 @@ function V5(e) {
|
|
|
42182
42385
|
if (l != null && l.approved === void 0 && u) U(() => u(G({ approved: e }, te())));
|
|
42183
42386
|
else if (c) U(() => o == null ? void 0 : o({ approved: e }));
|
|
42184
42387
|
else if ((f == null ? void 0 : f.type) === "requires-action" && f.reason === "interrupt") return;
|
|
42185
|
-
else U(() => a == null ? void 0 : a(e ?
|
|
42388
|
+
else U(() => a == null ? void 0 : a(e ? N5 : P5));
|
|
42186
42389
|
}
|
|
42187
42390
|
}, K = (e) => {
|
|
42188
|
-
x || U(() => u == null ? void 0 : u(
|
|
42391
|
+
x || U(() => u == null ? void 0 : u(I5(e.kind) ? G({ optionId: e.id }, te()) : G({
|
|
42189
42392
|
optionId: e.id,
|
|
42190
42393
|
approved: !0
|
|
42191
42394
|
}, te())));
|
|
@@ -42195,10 +42398,10 @@ function V5(e) {
|
|
|
42195
42398
|
x || U(() => u == null ? void 0 : u({ approved: !1 }));
|
|
42196
42399
|
}, ie = (e) => {
|
|
42197
42400
|
e.confirm ? (z(), C(e.id)) : K(e);
|
|
42198
|
-
}, ae = S == null || V == null ? void 0 : V.find((e) => e.id === S), oe =
|
|
42401
|
+
}, ae = S == null || V == null ? void 0 : V.find((e) => e.id === S), oe = z5(l), se = oe && u != null && (l == null ? void 0 : l.dismissible) === !0 ? /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42199
42402
|
size: "sm",
|
|
42200
42403
|
variant: "outline",
|
|
42201
|
-
className:
|
|
42404
|
+
className: S5,
|
|
42202
42405
|
onClick: re,
|
|
42203
42406
|
disabled: x,
|
|
42204
42407
|
children: "关闭"
|
|
@@ -42208,7 +42411,7 @@ function V5(e) {
|
|
|
42208
42411
|
children: E
|
|
42209
42412
|
}) : null, le = H ? /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42210
42413
|
className: "aui-tool-fallback-approval-answer flex flex-col items-start gap-2",
|
|
42211
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
42414
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(d5, {
|
|
42212
42415
|
value: w,
|
|
42213
42416
|
onChange: (e) => T(e.target.value),
|
|
42214
42417
|
disabled: x,
|
|
@@ -42218,7 +42421,7 @@ function V5(e) {
|
|
|
42218
42421
|
className: "flex items-center gap-2",
|
|
42219
42422
|
children: [/* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42220
42423
|
size: "sm",
|
|
42221
|
-
className:
|
|
42424
|
+
className: S5,
|
|
42222
42425
|
onClick: ne,
|
|
42223
42426
|
disabled: x,
|
|
42224
42427
|
children: "发送"
|
|
@@ -42235,7 +42438,7 @@ function V5(e) {
|
|
|
42235
42438
|
ref: L,
|
|
42236
42439
|
children: [
|
|
42237
42440
|
B,
|
|
42238
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42441
|
+
/* @__PURE__ */ (0, Z.jsx)(K5, {
|
|
42239
42442
|
questions: (ue = l.questions) == null ? [] : ue,
|
|
42240
42443
|
dismissible: l.dismissible === !0,
|
|
42241
42444
|
locked: x,
|
|
@@ -42258,7 +42461,7 @@ function V5(e) {
|
|
|
42258
42461
|
children: [
|
|
42259
42462
|
/* @__PURE__ */ (0, Z.jsx)("p", {
|
|
42260
42463
|
className: "aui-tool-fallback-approval-confirm-title font-semibold",
|
|
42261
|
-
children: (fe = e == null ? void 0 : e.title) == null ? `${
|
|
42464
|
+
children: (fe = e == null ? void 0 : e.title) == null ? `${R5(ae)}?` : fe
|
|
42262
42465
|
}),
|
|
42263
42466
|
t && /* @__PURE__ */ (0, Z.jsx)("p", {
|
|
42264
42467
|
className: "aui-tool-fallback-approval-confirm-description text-muted-foreground whitespace-pre-line",
|
|
@@ -42275,14 +42478,14 @@ function V5(e) {
|
|
|
42275
42478
|
className: "flex items-center gap-2",
|
|
42276
42479
|
children: [/* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42277
42480
|
size: "sm",
|
|
42278
|
-
className:
|
|
42481
|
+
className: S5,
|
|
42279
42482
|
onClick: () => K(ae),
|
|
42280
42483
|
disabled: x,
|
|
42281
42484
|
children: "确认"
|
|
42282
42485
|
}), /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42283
42486
|
size: "sm",
|
|
42284
42487
|
variant: "outline",
|
|
42285
|
-
className:
|
|
42488
|
+
className: S5,
|
|
42286
42489
|
onClick: () => {
|
|
42287
42490
|
z(), C(null);
|
|
42288
42491
|
},
|
|
@@ -42294,7 +42497,7 @@ function V5(e) {
|
|
|
42294
42497
|
}));
|
|
42295
42498
|
}
|
|
42296
42499
|
if (V && V.length > 0) {
|
|
42297
|
-
let e = V.filter((e) =>
|
|
42500
|
+
let e = V.filter((e) => L5(e.kind)), t = V.filter((e) => !I5(e.kind)), r = V.filter((e) => I5(e.kind) && !L5(e.kind));
|
|
42298
42501
|
return /* @__PURE__ */ (0, Z.jsxs)("div", G(G({
|
|
42299
42502
|
"data-slot": "tool-fallback-approval",
|
|
42300
42503
|
tabIndex: -1,
|
|
@@ -42313,15 +42516,15 @@ function V5(e) {
|
|
|
42313
42516
|
].map((t) => /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42314
42517
|
size: "sm",
|
|
42315
42518
|
variant: t === e[0] ? "default" : "outline",
|
|
42316
|
-
className:
|
|
42519
|
+
className: S5,
|
|
42317
42520
|
onClick: () => ie(t),
|
|
42318
42521
|
disabled: x,
|
|
42319
|
-
children:
|
|
42522
|
+
children: R5(t)
|
|
42320
42523
|
}, t.id)),
|
|
42321
42524
|
r.length === 0 && !oe && /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42322
42525
|
size: "sm",
|
|
42323
42526
|
variant: "outline",
|
|
42324
|
-
className:
|
|
42527
|
+
className: S5,
|
|
42325
42528
|
onClick: () => ee(!1),
|
|
42326
42529
|
disabled: x,
|
|
42327
42530
|
children: "拒绝"
|
|
@@ -42361,14 +42564,14 @@ function V5(e) {
|
|
|
42361
42564
|
className: "flex items-center gap-2",
|
|
42362
42565
|
children: [/* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42363
42566
|
size: "sm",
|
|
42364
|
-
className:
|
|
42567
|
+
className: S5,
|
|
42365
42568
|
onClick: () => ee(!0),
|
|
42366
42569
|
disabled: x,
|
|
42367
42570
|
children: "允许"
|
|
42368
42571
|
}), /* @__PURE__ */ (0, Z.jsx)(cK, {
|
|
42369
42572
|
size: "sm",
|
|
42370
42573
|
variant: "outline",
|
|
42371
|
-
className:
|
|
42574
|
+
className: S5,
|
|
42372
42575
|
onClick: () => ee(!1),
|
|
42373
42576
|
disabled: x,
|
|
42374
42577
|
children: "拒绝"
|
|
@@ -42379,14 +42582,14 @@ function V5(e) {
|
|
|
42379
42582
|
]
|
|
42380
42583
|
}));
|
|
42381
42584
|
}
|
|
42382
|
-
var
|
|
42383
|
-
let u = (r == null ? void 0 : r.type) === "incomplete" && r.reason === "cancelled", d = (r == null ? void 0 : r.type) === "requires-action", f = c != null || d &&
|
|
42585
|
+
var X5 = o(({ toolName: e, argsText: t, result: n, status: r, responseDeliveryStatus: i, addResult: a, resume: o, interrupt: s, approval: c, respondToApproval: l }) => {
|
|
42586
|
+
let u = (r == null ? void 0 : r.type) === "incomplete" && r.reason === "cancelled", d = (r == null ? void 0 : r.type) === "requires-action", f = c != null || d && q5(r, c, s), [m, _] = g(d), [v, y] = g(d);
|
|
42384
42587
|
d !== v && (y(d), d && _(!0));
|
|
42385
42588
|
let b = h(!1), x = h(null), S = h(null);
|
|
42386
42589
|
return p(() => {
|
|
42387
42590
|
let e = x.current;
|
|
42388
42591
|
if (!e || e.isConnected || d || !b.current) return;
|
|
42389
|
-
let t = c == null || !
|
|
42592
|
+
let t = c == null || !H5(c);
|
|
42390
42593
|
b.current = !1;
|
|
42391
42594
|
let { activeElement: n, body: r } = e.ownerDocument;
|
|
42392
42595
|
if (t && (n == null || n === r)) {
|
|
@@ -42397,20 +42600,20 @@ var H5 = o(({ toolName: e, argsText: t, result: n, status: r, responseDeliverySt
|
|
|
42397
42600
|
c,
|
|
42398
42601
|
d,
|
|
42399
42602
|
r == null ? void 0 : r.type
|
|
42400
|
-
]), /* @__PURE__ */ (0, Z.jsxs)(
|
|
42603
|
+
]), /* @__PURE__ */ (0, Z.jsxs)(C5, {
|
|
42401
42604
|
open: m,
|
|
42402
42605
|
onOpenChange: _,
|
|
42403
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
42606
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(D5, {
|
|
42404
42607
|
toolName: e,
|
|
42405
42608
|
status: r,
|
|
42406
42609
|
responseDeliveryStatus: i
|
|
42407
|
-
}), /* @__PURE__ */ (0, Z.jsxs)(
|
|
42408
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42409
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42610
|
+
}), /* @__PURE__ */ (0, Z.jsxs)(O5, { children: [
|
|
42611
|
+
/* @__PURE__ */ (0, Z.jsx)(M5, { status: r }),
|
|
42612
|
+
/* @__PURE__ */ (0, Z.jsx)(k5, {
|
|
42410
42613
|
argsText: t,
|
|
42411
42614
|
className: Q(u && "opacity-60")
|
|
42412
42615
|
}),
|
|
42413
|
-
f && /* @__PURE__ */ (0, Z.jsx)(
|
|
42616
|
+
f && /* @__PURE__ */ (0, Z.jsx)(J5, {
|
|
42414
42617
|
addResult: a,
|
|
42415
42618
|
resume: o,
|
|
42416
42619
|
interrupt: s,
|
|
@@ -42427,24 +42630,24 @@ var H5 = o(({ toolName: e, argsText: t, result: n, status: r, responseDeliverySt
|
|
|
42427
42630
|
(t ? e.currentTarget.contains(t) : e.currentTarget.contains(e.currentTarget.ownerDocument.activeElement)) || (b.current = !1);
|
|
42428
42631
|
}
|
|
42429
42632
|
}),
|
|
42430
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42633
|
+
/* @__PURE__ */ (0, Z.jsx)(j5, { result: n })
|
|
42431
42634
|
] })]
|
|
42432
42635
|
});
|
|
42433
42636
|
});
|
|
42434
42637
|
// src/components/tool-group.aui.tsx
|
|
42435
|
-
|
|
42436
|
-
var
|
|
42638
|
+
X5.displayName = "ToolFallback", X5.Root = C5, X5.Trigger = D5, X5.Content = O5, X5.Args = k5, X5.Result = j5, X5.Error = M5, X5.Approval = J5, K();
|
|
42639
|
+
var Z5 = [
|
|
42437
42640
|
"className",
|
|
42438
42641
|
"variant",
|
|
42439
42642
|
"open",
|
|
42440
42643
|
"onOpenChange",
|
|
42441
42644
|
"defaultOpen",
|
|
42442
42645
|
"children"
|
|
42443
|
-
],
|
|
42646
|
+
], Q5 = [
|
|
42444
42647
|
"count",
|
|
42445
42648
|
"active",
|
|
42446
42649
|
"className"
|
|
42447
|
-
],
|
|
42650
|
+
], $5 = ["className", "children"], e7 = 200, t7 = aK("aui-tool-group-root group/tool-group w-full", {
|
|
42448
42651
|
variants: { variant: {
|
|
42449
42652
|
outline: "rounded-lg border py-3",
|
|
42450
42653
|
ghost: "",
|
|
@@ -42452,27 +42655,27 @@ var U5 = [
|
|
|
42452
42655
|
} },
|
|
42453
42656
|
defaultVariants: { variant: "outline" }
|
|
42454
42657
|
});
|
|
42455
|
-
function
|
|
42456
|
-
let { className: t, variant: n, open: r, onOpenChange: i, defaultOpen: a = !1, children: o } = e, c = q(e,
|
|
42658
|
+
function n7(e) {
|
|
42659
|
+
let { className: t, variant: n, open: r, onOpenChange: i, defaultOpen: a = !1, children: o } = e, c = q(e, Z5), l = h(null), [u, d] = g(a), f = hF(l, e7), p = r !== void 0, m = p ? r : u, _ = s((e) => {
|
|
42457
42660
|
f(), p || d(e), i == null || i(e);
|
|
42458
42661
|
}, [
|
|
42459
42662
|
f,
|
|
42460
42663
|
p,
|
|
42461
42664
|
i
|
|
42462
42665
|
]);
|
|
42463
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42666
|
+
return /* @__PURE__ */ (0, Z.jsx)(U8, G(G({
|
|
42464
42667
|
ref: l,
|
|
42465
42668
|
"data-slot": "tool-group-root",
|
|
42466
42669
|
"data-variant": n == null ? "outline" : n,
|
|
42467
42670
|
open: m,
|
|
42468
42671
|
onOpenChange: _,
|
|
42469
|
-
className: Q(
|
|
42470
|
-
style: { "--animation-duration": `${
|
|
42672
|
+
className: Q(t7({ variant: n }), "group/tool-group-root", t),
|
|
42673
|
+
style: { "--animation-duration": `${e7}ms` }
|
|
42471
42674
|
}, c), {}, { children: o }));
|
|
42472
42675
|
}
|
|
42473
|
-
function
|
|
42474
|
-
let { count: t, active: n = !1, className: r } = e, i = q(e,
|
|
42475
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
42676
|
+
function r7(e) {
|
|
42677
|
+
let { count: t, active: n = !1, className: r } = e, i = q(e, Q5), a = `${t} 次工具调用`;
|
|
42678
|
+
return /* @__PURE__ */ (0, Z.jsxs)(W8, G(G({
|
|
42476
42679
|
"data-slot": "tool-group-trigger",
|
|
42477
42680
|
className: Q("aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 text-sm transition-[color,scale] active:scale-[0.98]", "group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:py-1.5", "group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4", "group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4", r)
|
|
42478
42681
|
}, i), {}, { children: [
|
|
@@ -42491,9 +42694,9 @@ function Y5(e) {
|
|
|
42491
42694
|
})
|
|
42492
42695
|
] }));
|
|
42493
42696
|
}
|
|
42494
|
-
function
|
|
42495
|
-
let { className: t, children: n } = e, r = q(e,
|
|
42496
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42697
|
+
function i7(e) {
|
|
42698
|
+
let { className: t, children: n } = e, r = q(e, $5);
|
|
42699
|
+
return /* @__PURE__ */ (0, Z.jsx)(G8, G(G({
|
|
42497
42700
|
"data-slot": "tool-group-content",
|
|
42498
42701
|
className: Q("aui-tool-group-content relative overflow-hidden text-sm outline-none", "group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none", "data-closed:animate-collapsible-up", "data-open:animate-collapsible-down", "data-closed:fill-mode-forwards", "data-closed:pointer-events-none", "[--tw-duration:var(--animation-duration)]", t)
|
|
42499
42702
|
}, r), {}, { children: /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
@@ -42501,15 +42704,15 @@ function X5(e) {
|
|
|
42501
42704
|
children: n
|
|
42502
42705
|
}) }));
|
|
42503
42706
|
}
|
|
42504
|
-
var
|
|
42707
|
+
var a7 = o(({ children: e, startIndex: t, endIndex: n }) => {
|
|
42505
42708
|
let r = n - t + 1;
|
|
42506
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
42709
|
+
return /* @__PURE__ */ (0, Z.jsxs)(n7, { children: [/* @__PURE__ */ (0, Z.jsx)(r7, { count: r }), /* @__PURE__ */ (0, Z.jsx)(i7, { children: e })] });
|
|
42507
42710
|
});
|
|
42508
42711
|
// src/components/ui/skeleton.tsx
|
|
42509
|
-
|
|
42510
|
-
var
|
|
42511
|
-
function
|
|
42512
|
-
let { className: t } = e, n = q(e,
|
|
42712
|
+
a7.displayName = "ToolGroup", a7.Root = n7, a7.Trigger = r7, a7.Content = i7, K();
|
|
42713
|
+
var o7 = ["className"];
|
|
42714
|
+
function s7(e) {
|
|
42715
|
+
let { className: t } = e, n = q(e, o7);
|
|
42513
42716
|
return /* @__PURE__ */ (0, Z.jsx)("div", G({
|
|
42514
42717
|
"data-slot": "skeleton",
|
|
42515
42718
|
className: Q("animate-pulse rounded-md bg-muted", t)
|
|
@@ -42517,26 +42720,26 @@ function $5(e) {
|
|
|
42517
42720
|
}
|
|
42518
42721
|
// src/components/thread.aui.tsx
|
|
42519
42722
|
K();
|
|
42520
|
-
var
|
|
42723
|
+
var c7 = ["className"], l7 = ({ group: e, children: t }) => {
|
|
42521
42724
|
let [n, r] = g(!1);
|
|
42522
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
42725
|
+
return /* @__PURE__ */ (0, Z.jsxs)(n7, {
|
|
42523
42726
|
variant: "ghost",
|
|
42524
42727
|
open: n || e.counts.requiresAction > 0,
|
|
42525
42728
|
onOpenChange: r,
|
|
42526
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
42729
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(r7, {
|
|
42527
42730
|
count: e.indices.length,
|
|
42528
42731
|
active: e.status.type === "running"
|
|
42529
|
-
}), /* @__PURE__ */ (0, Z.jsx)(
|
|
42732
|
+
}), /* @__PURE__ */ (0, Z.jsx)(i7, { children: t })]
|
|
42530
42733
|
});
|
|
42531
|
-
},
|
|
42734
|
+
}, u7 = (e) => !!e.thread.canResume && e.composer.type === "thread" && e.composer.isEmpty, d7 = (e) => (e == null ? void 0 : e.completedAt) === void 0 ? void 0 : Number(((e.completedAt - e.startedAt) / 1e3).toFixed(1)), f7 = P_({
|
|
42532
42735
|
reasoning: ["group-chainOfThought", "group-reasoning"],
|
|
42533
42736
|
"tool-call": ["group-chainOfThought", "group-reasoning"],
|
|
42534
42737
|
"standalone-tool-call": []
|
|
42535
|
-
}),
|
|
42738
|
+
}), p7 = ["group-chainOfThought", "group-task"], m7 = (e, t) => {
|
|
42536
42739
|
var n;
|
|
42537
|
-
let r =
|
|
42538
|
-
return e.type === "tool-call" && e.messages !== void 0 && r.length > 0 && !(t != null && (n = t.toolUIs) != null && (n = n[e.toolName]) != null && n.length) ?
|
|
42539
|
-
},
|
|
42740
|
+
let r = f7(e, t);
|
|
42741
|
+
return e.type === "tool-call" && e.messages !== void 0 && r.length > 0 && !(t != null && (n = t.toolUIs) != null && (n = n[e.toolName]) != null && n.length) ? p7 : r;
|
|
42742
|
+
}, h7 = {}, g7 = n(h7), _7 = (e) => e.thread.messages.length === 0 && (!e.thread.isLoading || e.threads.isLoading), v7 = (e) => e.thread.messages.length === 0 && e.thread.isLoading && !e.thread.isDisabled && !e.threads.isLoading, y7 = () => /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42540
42743
|
"data-slot": "aui_thread-history-skeleton",
|
|
42541
42744
|
role: "status",
|
|
42542
42745
|
className: "animate-in fade-in fill-mode-both flex flex-col gap-y-6 [animation-delay:150ms] [animation-duration:200ms]",
|
|
@@ -42545,32 +42748,32 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42545
42748
|
className: "sr-only",
|
|
42546
42749
|
children: "正在加载对话"
|
|
42547
42750
|
}),
|
|
42548
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42751
|
+
/* @__PURE__ */ (0, Z.jsx)(s7, { className: "ml-auto h-9 w-2/5 rounded-xl motion-reduce:animate-none" }),
|
|
42549
42752
|
/* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42550
42753
|
className: "flex flex-col gap-y-2",
|
|
42551
42754
|
children: [
|
|
42552
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42553
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42554
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42755
|
+
/* @__PURE__ */ (0, Z.jsx)(s7, { className: "h-4 w-11/12 motion-reduce:animate-none" }),
|
|
42756
|
+
/* @__PURE__ */ (0, Z.jsx)(s7, { className: "h-4 w-4/5 motion-reduce:animate-none" }),
|
|
42757
|
+
/* @__PURE__ */ (0, Z.jsx)(s7, { className: "h-4 w-3/5 motion-reduce:animate-none" })
|
|
42555
42758
|
]
|
|
42556
42759
|
}),
|
|
42557
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42760
|
+
/* @__PURE__ */ (0, Z.jsx)(s7, { className: "ml-auto h-9 w-1/3 rounded-xl motion-reduce:animate-none" }),
|
|
42558
42761
|
/* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42559
42762
|
className: "flex flex-col gap-y-2",
|
|
42560
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
42763
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(s7, { className: "h-4 w-10/12 motion-reduce:animate-none" }), /* @__PURE__ */ (0, Z.jsx)(s7, { className: "h-4 w-2/3 motion-reduce:animate-none" })]
|
|
42561
42764
|
})
|
|
42562
42765
|
]
|
|
42563
|
-
}),
|
|
42564
|
-
let n = X(
|
|
42565
|
-
return /* @__PURE__ */ (0, Z.jsx)(
|
|
42766
|
+
}), b7 = ({ components: e = h7, autoFocus: t = !0 }) => {
|
|
42767
|
+
let n = X(_7);
|
|
42768
|
+
return /* @__PURE__ */ (0, Z.jsx)(g7.Provider, {
|
|
42566
42769
|
value: e,
|
|
42567
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
42770
|
+
children: /* @__PURE__ */ (0, Z.jsx)(x7, {
|
|
42568
42771
|
isEmpty: n,
|
|
42569
42772
|
autoFocus: t
|
|
42570
42773
|
})
|
|
42571
42774
|
});
|
|
42572
|
-
},
|
|
42573
|
-
let { Welcome: n =
|
|
42775
|
+
}, x7 = ({ isEmpty: e, autoFocus: t }) => {
|
|
42776
|
+
let { Welcome: n = j7 } = c(g7);
|
|
42574
42777
|
return /* @__PURE__ */ (0, Z.jsx)(zP.Root, {
|
|
42575
42778
|
className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
42576
42779
|
style: {
|
|
@@ -42587,23 +42790,23 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42587
42790
|
className: Q("mx-auto flex w-full max-w-(--thread-max-width) flex-1 flex-col px-4 pt-4", e && "justify-center"),
|
|
42588
42791
|
children: [
|
|
42589
42792
|
/* @__PURE__ */ (0, Z.jsx)(Vd, {
|
|
42590
|
-
condition:
|
|
42793
|
+
condition: _7,
|
|
42591
42794
|
children: /* @__PURE__ */ (0, Z.jsx)(n, {})
|
|
42592
42795
|
}),
|
|
42593
42796
|
/* @__PURE__ */ (0, Z.jsx)(Vd, {
|
|
42594
|
-
condition:
|
|
42595
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
42797
|
+
condition: v7,
|
|
42798
|
+
children: /* @__PURE__ */ (0, Z.jsx)(y7, {})
|
|
42596
42799
|
}),
|
|
42597
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42800
|
+
/* @__PURE__ */ (0, Z.jsx)(k7, {}),
|
|
42598
42801
|
/* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42599
42802
|
"data-slot": "aui_message-group",
|
|
42600
42803
|
className: "mb-14 flex flex-col gap-y-6 empty:hidden",
|
|
42601
|
-
children: /* @__PURE__ */ (0, Z.jsx)(zP.Messages, { children: () => /* @__PURE__ */ (0, Z.jsx)(
|
|
42804
|
+
children: /* @__PURE__ */ (0, Z.jsx)(zP.Messages, { children: () => /* @__PURE__ */ (0, Z.jsx)(S7, {}) })
|
|
42602
42805
|
}),
|
|
42603
42806
|
/* @__PURE__ */ (0, Z.jsxs)(zP.ViewportFooter, {
|
|
42604
42807
|
className: Q("aui-thread-viewport-footer bg-background flex flex-col gap-2 overflow-visible pb-4 md:pb-6", !e && "sticky bottom-0 mt-auto rounded-t-(--composer-radius)"),
|
|
42605
42808
|
children: [
|
|
42606
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42809
|
+
/* @__PURE__ */ (0, Z.jsx)(A7, {}),
|
|
42607
42810
|
/* @__PURE__ */ (0, Z.jsx)(Fq, {}),
|
|
42608
42811
|
!e && /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42609
42812
|
className: "mx-auto flex w-full max-w-(--thread-max-width) justify-start",
|
|
@@ -42615,10 +42818,10 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42615
42818
|
children: [/* @__PURE__ */ (0, Z.jsx)(fL, { className: "size-3" }), "新建对话"]
|
|
42616
42819
|
})
|
|
42617
42820
|
}),
|
|
42618
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42821
|
+
/* @__PURE__ */ (0, Z.jsx)(P7, { autoFocus: t }),
|
|
42619
42822
|
/* @__PURE__ */ (0, Z.jsx)(Vd, {
|
|
42620
|
-
condition: (e) =>
|
|
42621
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
42823
|
+
condition: (e) => _7(e) && e.composer.isEmpty,
|
|
42824
|
+
children: /* @__PURE__ */ (0, Z.jsx)(M7, {})
|
|
42622
42825
|
})
|
|
42623
42826
|
]
|
|
42624
42827
|
})
|
|
@@ -42626,18 +42829,18 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42626
42829
|
})
|
|
42627
42830
|
})
|
|
42628
42831
|
});
|
|
42629
|
-
},
|
|
42630
|
-
let { AssistantMessage: e =
|
|
42631
|
-
return n ? /* @__PURE__ */ (0, Z.jsx)(
|
|
42632
|
-
},
|
|
42832
|
+
}, S7 = () => {
|
|
42833
|
+
let { AssistantMessage: e = L7 } = c(g7), t = X((e) => e.message.role), n = X((e) => e.message.composer.isEditing), r = X((e) => e.message.metadata.modality === "voice");
|
|
42834
|
+
return n ? /* @__PURE__ */ (0, Z.jsx)(W7, {}) : r ? /* @__PURE__ */ (0, Z.jsx)(T7, {}) : t === "user" ? /* @__PURE__ */ (0, Z.jsx)(H7, {}) : /* @__PURE__ */ (0, Z.jsx)(e, {});
|
|
42835
|
+
}, C7 = () => X((e) => {
|
|
42633
42836
|
var t, n;
|
|
42634
42837
|
let r = ((t = e.thread.messages[e.message.index - 1]) == null ? void 0 : t.metadata.modality) === "voice", i = ((n = e.thread.messages[e.message.index + 1]) == null ? void 0 : n.metadata.modality) === "voice";
|
|
42635
42838
|
return r ? i ? "middle" : "end" : i ? "start" : "single";
|
|
42636
|
-
}),
|
|
42839
|
+
}), w7 = ({ text: e }) => /* @__PURE__ */ (0, Z.jsx)("p", {
|
|
42637
42840
|
className: "aui-spoken-message-text m-0",
|
|
42638
42841
|
children: e
|
|
42639
|
-
}),
|
|
42640
|
-
let e = X((e) => e.message.role), t =
|
|
42842
|
+
}), T7 = () => {
|
|
42843
|
+
let e = X((e) => e.message.role), t = C7(), n = X((e) => {
|
|
42641
42844
|
var t;
|
|
42642
42845
|
return e.message.role === "assistant" && ((t = e.message.status) == null ? void 0 : t.type) === "running";
|
|
42643
42846
|
}), r = t === "start" || t === "single";
|
|
@@ -42668,7 +42871,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42668
42871
|
}),
|
|
42669
42872
|
/* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42670
42873
|
className: "min-w-0 flex-1 wrap-break-word",
|
|
42671
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(JN.Parts, { components: { Text:
|
|
42874
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(JN.Parts, { components: { Text: w7 } }), n && /* @__PURE__ */ (0, Z.jsx)("span", {
|
|
42672
42875
|
"data-slot": "aui_spoken-message-indicator",
|
|
42673
42876
|
role: "status",
|
|
42674
42877
|
className: "text-muted-foreground ms-1 animate-pulse font-sans",
|
|
@@ -42676,11 +42879,11 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42676
42879
|
children: "●"
|
|
42677
42880
|
})]
|
|
42678
42881
|
}),
|
|
42679
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
42882
|
+
/* @__PURE__ */ (0, Z.jsx)(E7, {})
|
|
42680
42883
|
]
|
|
42681
42884
|
})]
|
|
42682
42885
|
});
|
|
42683
|
-
},
|
|
42886
|
+
}, E7 = () => /* @__PURE__ */ (0, Z.jsx)(Lk.Root, {
|
|
42684
42887
|
hideWhenRunning: !0,
|
|
42685
42888
|
autohide: "always",
|
|
42686
42889
|
className: "aui-spoken-action-bar text-muted-foreground flex shrink-0 gap-1",
|
|
@@ -42697,13 +42900,13 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42697
42900
|
children: /* @__PURE__ */ (0, Z.jsx)(MI, { className: "animate-in zoom-in-75 fade-in duration-150" })
|
|
42698
42901
|
})]
|
|
42699
42902
|
})
|
|
42700
|
-
}),
|
|
42903
|
+
}), D7 = "a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1']):not([disabled])", O7 = (e) => {
|
|
42701
42904
|
for (let t = e.nextElementSibling; t; t = t.nextElementSibling) {
|
|
42702
|
-
let e = t.matches(
|
|
42905
|
+
let e = t.matches(D7) ? t : t.querySelector(D7);
|
|
42703
42906
|
if (e instanceof HTMLElement) return e;
|
|
42704
42907
|
}
|
|
42705
42908
|
return null;
|
|
42706
|
-
},
|
|
42909
|
+
}, k7 = () => {
|
|
42707
42910
|
let e = po(), t = X((e) => e.thread.hasEarlier), n = X((e) => e.thread.isLoadingEarlier), r = t || n, i = h(null), a = h(null), o = h(null), s = h(!1);
|
|
42708
42911
|
return u(() => {
|
|
42709
42912
|
if (!t || n) {
|
|
@@ -42737,7 +42940,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42737
42940
|
if (r || !t || t.isConnected || !n) return;
|
|
42738
42941
|
o.current = null;
|
|
42739
42942
|
let a = document.activeElement;
|
|
42740
|
-
a && a !== document.body || (e =
|
|
42943
|
+
a && a !== document.body || (e = O7(n)) == null || e.focus();
|
|
42741
42944
|
}, [r]), /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42742
42945
|
ref: i,
|
|
42743
42946
|
className: "contents",
|
|
@@ -42769,23 +42972,23 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42769
42972
|
})
|
|
42770
42973
|
]
|
|
42771
42974
|
});
|
|
42772
|
-
},
|
|
42975
|
+
}, A7 = () => /* @__PURE__ */ (0, Z.jsx)(zP.ScrollToBottom, {
|
|
42773
42976
|
render: /* @__PURE__ */ (0, Z.jsx)(IK, {
|
|
42774
42977
|
tooltip: "滚动到底部",
|
|
42775
42978
|
variant: "outline",
|
|
42776
42979
|
className: "aui-thread-scroll-to-bottom dark:border-border dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible"
|
|
42777
42980
|
}),
|
|
42778
42981
|
children: /* @__PURE__ */ (0, Z.jsx)(cI, {})
|
|
42779
|
-
}),
|
|
42982
|
+
}), j7 = () => /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42780
42983
|
className: "aui-thread-welcome-root mb-6 flex flex-col px-2",
|
|
42781
42984
|
children: /* @__PURE__ */ (0, Z.jsx)("p", {
|
|
42782
42985
|
className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-medium tracking-tight text-foreground duration-200 text-center",
|
|
42783
42986
|
children: "今天有什么可以帮你?"
|
|
42784
42987
|
})
|
|
42785
|
-
}),
|
|
42988
|
+
}), M7 = () => /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42786
42989
|
className: "aui-thread-welcome-suggestions flex w-full flex-col",
|
|
42787
|
-
children: /* @__PURE__ */ (0, Z.jsx)(zP.Suggestions, { children: () => /* @__PURE__ */ (0, Z.jsx)(
|
|
42788
|
-
}),
|
|
42990
|
+
children: /* @__PURE__ */ (0, Z.jsx)(zP.Suggestions, { children: () => /* @__PURE__ */ (0, Z.jsx)(N7, {}) })
|
|
42991
|
+
}), N7 = () => /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42789
42992
|
className: "aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200",
|
|
42790
42993
|
children: /* @__PURE__ */ (0, Z.jsxs)(KP.Trigger, {
|
|
42791
42994
|
send: !0,
|
|
@@ -42806,7 +43009,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42806
43009
|
]
|
|
42807
43010
|
})]
|
|
42808
43011
|
})
|
|
42809
|
-
}),
|
|
43012
|
+
}), P7 = ({ autoFocus: e }) => /* @__PURE__ */ (0, Z.jsx)(NM.Root, {
|
|
42810
43013
|
className: "aui-composer-root relative flex w-full flex-col",
|
|
42811
43014
|
children: /* @__PURE__ */ (0, Z.jsxs)(NM.AttachmentDropzone, {
|
|
42812
43015
|
render: /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
@@ -42823,11 +43026,11 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42823
43026
|
enterKeyHint: "send",
|
|
42824
43027
|
"aria-label": "消息输入框"
|
|
42825
43028
|
}),
|
|
42826
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
43029
|
+
/* @__PURE__ */ (0, Z.jsx)(F7, {})
|
|
42827
43030
|
]
|
|
42828
43031
|
})
|
|
42829
|
-
}),
|
|
42830
|
-
let { ComposerExtra: e } = c(
|
|
43032
|
+
}), F7 = () => {
|
|
43033
|
+
let { ComposerExtra: e } = c(g7), t = X((e) => e.composer.submission !== void 0 && !(e.thread.isRunning && e.thread.capabilities.cancel));
|
|
42831
43034
|
return /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42832
43035
|
className: "aui-composer-action-wrapper relative flex items-center justify-between",
|
|
42833
43036
|
children: [e ? /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
@@ -42869,7 +43072,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42869
43072
|
})]
|
|
42870
43073
|
}),
|
|
42871
43074
|
/* @__PURE__ */ (0, Z.jsx)(Vd, {
|
|
42872
|
-
condition: (e) => (!e.composer.canCancel || e.thread.voice !== void 0 && e.composer.submission === void 0) && !
|
|
43075
|
+
condition: (e) => (!e.composer.canCancel || e.thread.voice !== void 0 && e.composer.submission === void 0) && !u7(e),
|
|
42873
43076
|
children: /* @__PURE__ */ (0, Z.jsx)(NM.Send, {
|
|
42874
43077
|
render: /* @__PURE__ */ (0, Z.jsx)(IK, {
|
|
42875
43078
|
tooltip: "发送消息",
|
|
@@ -42884,7 +43087,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42884
43087
|
})
|
|
42885
43088
|
}),
|
|
42886
43089
|
/* @__PURE__ */ (0, Z.jsx)(Vd, {
|
|
42887
|
-
condition:
|
|
43090
|
+
condition: u7,
|
|
42888
43091
|
children: /* @__PURE__ */ (0, Z.jsx)(NM.Resume, {
|
|
42889
43092
|
render: /* @__PURE__ */ (0, Z.jsx)(IK, {
|
|
42890
43093
|
tooltip: "继续生成",
|
|
@@ -42914,11 +43117,11 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42914
43117
|
]
|
|
42915
43118
|
})]
|
|
42916
43119
|
});
|
|
42917
|
-
},
|
|
43120
|
+
}, I7 = () => /* @__PURE__ */ (0, Z.jsx)(JN.Error, { children: /* @__PURE__ */ (0, Z.jsx)(sN.Root, {
|
|
42918
43121
|
className: "aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200",
|
|
42919
43122
|
children: /* @__PURE__ */ (0, Z.jsx)(sN.Message, { className: "aui-message-error-message line-clamp-2" })
|
|
42920
|
-
}) }),
|
|
42921
|
-
let { ToolFallback: e =
|
|
43123
|
+
}) }), L7 = () => {
|
|
43124
|
+
let { ToolFallback: e = X5, ToolGroup: t, ReasoningGroup: n, TaskGroup: r } = c(g7), i = r ? m7 : f7;
|
|
42922
43125
|
return /* @__PURE__ */ (0, Z.jsxs)(JN.Root, {
|
|
42923
43126
|
"data-slot": "aui_assistant-message-root",
|
|
42924
43127
|
"data-role": "assistant",
|
|
@@ -42938,7 +43141,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42938
43141
|
case "group-tool": return t ? /* @__PURE__ */ (0, Z.jsx)(t, {
|
|
42939
43142
|
group: i,
|
|
42940
43143
|
children: a
|
|
42941
|
-
}) : /* @__PURE__ */ (0, Z.jsx)(
|
|
43144
|
+
}) : /* @__PURE__ */ (0, Z.jsx)(l7, {
|
|
42942
43145
|
group: i,
|
|
42943
43146
|
children: a
|
|
42944
43147
|
});
|
|
@@ -42948,19 +43151,19 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42948
43151
|
children: a
|
|
42949
43152
|
});
|
|
42950
43153
|
let e = i.status.type === "running";
|
|
42951
|
-
return /* @__PURE__ */ (0, Z.jsxs)(
|
|
43154
|
+
return /* @__PURE__ */ (0, Z.jsxs)(a5, {
|
|
42952
43155
|
streaming: e,
|
|
42953
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
43156
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(t5, {
|
|
42954
43157
|
active: e,
|
|
42955
|
-
duration:
|
|
42956
|
-
}), /* @__PURE__ */ (0, Z.jsx)(
|
|
43158
|
+
duration: d7(i.timing)
|
|
43159
|
+
}), /* @__PURE__ */ (0, Z.jsx)(n5, {
|
|
42957
43160
|
"aria-busy": e,
|
|
42958
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43161
|
+
children: /* @__PURE__ */ (0, Z.jsx)(r5, { children: a })
|
|
42959
43162
|
})]
|
|
42960
43163
|
});
|
|
42961
43164
|
}
|
|
42962
|
-
case "text": return /* @__PURE__ */ (0, Z.jsx)(
|
|
42963
|
-
case "reasoning": return /* @__PURE__ */ (0, Z.jsx)(
|
|
43165
|
+
case "text": return /* @__PURE__ */ (0, Z.jsx)(d8, {});
|
|
43166
|
+
case "reasoning": return /* @__PURE__ */ (0, Z.jsx)(c5, G({}, i));
|
|
42964
43167
|
case "tool-call":
|
|
42965
43168
|
var o;
|
|
42966
43169
|
return (o = i.toolUI) == null ? /* @__PURE__ */ (0, Z.jsx)(e, G({}, i)) : o;
|
|
@@ -42968,7 +43171,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42968
43171
|
case "file": return /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42969
43172
|
"data-slot": "aui_assistant-message-file",
|
|
42970
43173
|
className: "py-1",
|
|
42971
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43174
|
+
children: /* @__PURE__ */ (0, Z.jsx)(z7, G({}, i))
|
|
42972
43175
|
});
|
|
42973
43176
|
case "image": return /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
42974
43177
|
"data-slot": "aui_assistant-message-image",
|
|
@@ -42984,14 +43187,14 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
42984
43187
|
default: return null;
|
|
42985
43188
|
}
|
|
42986
43189
|
}
|
|
42987
|
-
}), /* @__PURE__ */ (0, Z.jsx)(
|
|
43190
|
+
}), /* @__PURE__ */ (0, Z.jsx)(I7, {})]
|
|
42988
43191
|
}), /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
42989
43192
|
"data-slot": "aui_assistant-message-footer",
|
|
42990
43193
|
className: Q("ms-2 flex items-center", "min-h-7.5 pt-1.5"),
|
|
42991
|
-
children: [/* @__PURE__ */ (0, Z.jsx)(
|
|
43194
|
+
children: [/* @__PURE__ */ (0, Z.jsx)(G7, {}), /* @__PURE__ */ (0, Z.jsx)(R7, {})]
|
|
42992
43195
|
})]
|
|
42993
43196
|
});
|
|
42994
|
-
},
|
|
43197
|
+
}, R7 = () => /* @__PURE__ */ (0, Z.jsxs)(Lk.Root, {
|
|
42995
43198
|
hideWhenRunning: !0,
|
|
42996
43199
|
autohide: "not-last",
|
|
42997
43200
|
className: "aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-200",
|
|
@@ -43043,22 +43246,22 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
43043
43246
|
})
|
|
43044
43247
|
})] })
|
|
43045
43248
|
]
|
|
43046
|
-
}),
|
|
43249
|
+
}), z7 = (e) => {
|
|
43047
43250
|
let t = e.mimeType.toLowerCase().startsWith("image/") ? xq(e.data, e.mimeType, e.sourceType) : null;
|
|
43048
43251
|
return t ? /* @__PURE__ */ (0, Z.jsx)(cJ, G({
|
|
43049
43252
|
type: "image",
|
|
43050
43253
|
image: t,
|
|
43051
43254
|
status: e.status
|
|
43052
43255
|
}, e.filename !== void 0 && { filename: e.filename })) : /* @__PURE__ */ (0, Z.jsx)(Nq, G({}, e));
|
|
43053
|
-
},
|
|
43256
|
+
}, B7 = (e) => /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43054
43257
|
"data-slot": "aui_user-message-file",
|
|
43055
43258
|
className: "py-1",
|
|
43056
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43057
|
-
}),
|
|
43259
|
+
children: /* @__PURE__ */ (0, Z.jsx)(z7, G({}, e))
|
|
43260
|
+
}), V7 = (e) => /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43058
43261
|
"data-slot": "aui_user-message-image",
|
|
43059
43262
|
className: "py-1",
|
|
43060
43263
|
children: /* @__PURE__ */ (0, Z.jsx)(cJ, G({}, e))
|
|
43061
|
-
}),
|
|
43264
|
+
}), H7 = () => /* @__PURE__ */ (0, Z.jsxs)(JN.Root, {
|
|
43062
43265
|
"data-slot": "aui_user-message-root",
|
|
43063
43266
|
className: "fade-in slide-in-from-bottom-1 animate-in grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto] [&:where(>*)]:col-start-2",
|
|
43064
43267
|
"data-role": "user",
|
|
@@ -43069,21 +43272,21 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
43069
43272
|
children: /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43070
43273
|
className: "aui-user-message-content peer rounded-(--composer-radius) bg-muted px-4 py-2 text-foreground wrap-break-word empty:hidden",
|
|
43071
43274
|
children: /* @__PURE__ */ (0, Z.jsx)(JN.Parts, { components: {
|
|
43072
|
-
File:
|
|
43073
|
-
Image:
|
|
43275
|
+
File: B7,
|
|
43276
|
+
Image: V7
|
|
43074
43277
|
} })
|
|
43075
43278
|
})
|
|
43076
43279
|
}),
|
|
43077
43280
|
/* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43078
43281
|
className: "col-start-2 -mt-1 flex justify-end min-h-8",
|
|
43079
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43282
|
+
children: /* @__PURE__ */ (0, Z.jsx)(U7, {})
|
|
43080
43283
|
}),
|
|
43081
|
-
/* @__PURE__ */ (0, Z.jsx)(
|
|
43284
|
+
/* @__PURE__ */ (0, Z.jsx)(G7, {
|
|
43082
43285
|
"data-slot": "aui_user-branch-picker",
|
|
43083
43286
|
className: "col-span-full col-start-1 -me-1 justify-end"
|
|
43084
43287
|
})
|
|
43085
43288
|
]
|
|
43086
|
-
}),
|
|
43289
|
+
}), U7 = () => /* @__PURE__ */ (0, Z.jsxs)(Lk.Root, {
|
|
43087
43290
|
hideWhenRunning: !0,
|
|
43088
43291
|
autohide: "not-last",
|
|
43089
43292
|
className: "aui-user-action-bar-root flex flex-row items-center gap-1",
|
|
@@ -43106,7 +43309,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
43106
43309
|
}),
|
|
43107
43310
|
children: /* @__PURE__ */ (0, Z.jsx)(oL, { className: "size-4" })
|
|
43108
43311
|
})]
|
|
43109
|
-
}),
|
|
43312
|
+
}), W7 = () => /* @__PURE__ */ (0, Z.jsx)(JN.Root, {
|
|
43110
43313
|
"data-slot": "aui_edit-composer-wrapper",
|
|
43111
43314
|
className: "flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
|
|
43112
43315
|
children: /* @__PURE__ */ (0, Z.jsxs)(NM.Root, {
|
|
@@ -43132,8 +43335,8 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
43132
43335
|
})]
|
|
43133
43336
|
})]
|
|
43134
43337
|
})
|
|
43135
|
-
}),
|
|
43136
|
-
let { className: t } = e, n = q(e,
|
|
43338
|
+
}), G7 = (e) => {
|
|
43339
|
+
let { className: t } = e, n = q(e, c7);
|
|
43137
43340
|
return /* @__PURE__ */ (0, Z.jsxs)(_A.Root, G(G({
|
|
43138
43341
|
hideWhenSingleBranch: !0,
|
|
43139
43342
|
className: Q("aui-branch-picker-root text-muted-foreground -ms-2 me-2 inline-flex items-center text-xs", t)
|
|
@@ -43158,7 +43361,7 @@ var e7 = ["className"], t7 = ({ group: e, children: t }) => {
|
|
|
43158
43361
|
] }));
|
|
43159
43362
|
};
|
|
43160
43363
|
// src/components/conversation-list.tsx
|
|
43161
|
-
function
|
|
43364
|
+
function K7({ onSelect: e }) {
|
|
43162
43365
|
return /* @__PURE__ */ (0, Z.jsxs)("div", {
|
|
43163
43366
|
className: "flex h-full flex-col bg-background text-foreground",
|
|
43164
43367
|
children: [/* @__PURE__ */ (0, Z.jsx)("div", {
|
|
@@ -43201,7 +43404,7 @@ function R7({ onSelect: e }) {
|
|
|
43201
43404
|
});
|
|
43202
43405
|
}
|
|
43203
43406
|
// src/chat/ChatApp.tsx
|
|
43204
|
-
function
|
|
43407
|
+
function q7() {
|
|
43205
43408
|
let [e, t] = g("chat"), n = () => {
|
|
43206
43409
|
t("chat");
|
|
43207
43410
|
};
|
|
@@ -43226,14 +43429,14 @@ function z7() {
|
|
|
43226
43429
|
className: `min-h-0 flex-1 flex-col overflow-hidden ${e === "chat" ? "flex" : "hidden"}`,
|
|
43227
43430
|
children: /* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43228
43431
|
className: "min-h-0 flex-1",
|
|
43229
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43432
|
+
children: /* @__PURE__ */ (0, Z.jsx)(b7, {})
|
|
43230
43433
|
})
|
|
43231
43434
|
}),
|
|
43232
43435
|
/* @__PURE__ */ (0, Z.jsx)("div", {
|
|
43233
43436
|
className: `min-h-0 flex-1 overflow-hidden ${e === "conversations" ? "block" : "hidden"}`,
|
|
43234
|
-
children: /* @__PURE__ */ (0, Z.jsx)(
|
|
43437
|
+
children: /* @__PURE__ */ (0, Z.jsx)(K7, { onSelect: n })
|
|
43235
43438
|
})
|
|
43236
43439
|
]
|
|
43237
43440
|
});
|
|
43238
43441
|
}
|
|
43239
|
-
export {
|
|
43442
|
+
export { q7 as ChatApp, WF as ChatRuntimeProvider };
|